20 #include <config_features.h>
26 #include <officecfg/Office/Common.hxx>
47 #include <inputwin.hxx>
54 #include <mediash.hxx>
60 #include <drformsh.hxx>
76 #include <drawdoc.hxx>
83 #include <com/sun/star/frame/FrameSearchFlag.hpp>
84 #include <com/sun/star/frame/XLayoutManager.hpp>
85 #include <com/sun/star/scanner/ScannerContext.hpp>
86 #include <com/sun/star/scanner/XScannerManager2.hpp>
95 #include <com/sun/star/document/XDocumentProperties.hpp>
96 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
100 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
109 #define SWVIEWFLAGS SfxViewShellFlags::HAS_PRINTOPTIONS
147 SetVerbs( Sequence< embed::VerbDescriptor >() );
165 const_cast< SwView*
>( this )->AttrChangedNotify(
nullptr);
170 if ( pAsAnnotationShell )
173 const_cast< SwView*
>( this )->AttrChangedNotify(
nullptr);
198 SdrView *pSdrView = m_pWrtShell ? m_pWrtShell->GetDrawView() :
nullptr;
202 AttrChangedNotify(
nullptr);
208 uno::Reference<frame::XLayoutManager> getLayoutManager(
const SfxViewFrame& rViewFrame)
210 uno::Reference<frame::XLayoutManager> xLayoutManager;
217 xLayoutManager.set(xPropSet->getPropertyValue(
"LayoutManager"), uno::UNO_QUERY);
219 catch (
const Exception& e)
221 SAL_WARN(
"sw.ui",
"Failure getting layout manager: " + e.Message);
224 return xLayoutManager;
230 if (
auto xLayoutManager = getLayoutManager(*
GetViewFrame()))
232 if (!xLayoutManager->getElement(sElementURL).is())
234 xLayoutManager->createElement(sElementURL);
235 xLayoutManager->showElement(sElementURL);
248 bool bUpdateTable =
false;
282 if (eId != ToolbarId::None)
285 for ( sal_uInt16
i = 0;
true; ++
i )
288 if ( dynamic_cast< const SwBaseShell *>( pSfxShell ) !=
nullptr
289 || dynamic_cast< const SwDrawTextShell *>( pSfxShell ) !=
nullptr
290 || dynamic_cast< const svx::ExtrusionBar*>( pSfxShell ) !=
nullptr
291 || dynamic_cast< const svx::FontworkBar*>( pSfxShell ) !=
nullptr
292 || dynamic_cast< const SwAnnotationShell *>( pSfxShell ) !=
nullptr
295 rDispatcher.
Pop( *pSfxShell, SfxDispatcherPopFlags::POP_DELETE );
297 else if ( dynamic_cast< const FmFormShell *>( pSfxShell ) !=
nullptr )
299 rDispatcher.
Pop( *pSfxShell );
306 bool bInitFormShell =
false;
309 bInitFormShell =
true;
315 bool bSetExtInpCntxt =
false;
356 #if HAVE_FEATURE_AVMEDIA
386 bSetExtInpCntxt =
true;
400 bSetExtInpCntxt =
true;
427 if( bSetExtInpCntxt &&
GetWrtShell().HasReadonlySel() )
428 bSetExtInpCntxt =
false;
433 ( InputContextFlags::Text |
434 InputContextFlags::ExtText ))
436 InputContextFlags( InputContextFlags::Text |
437 InputContextFlags::ExtText )) );
456 if ( bInitFormShell && pDView )
461 if (
GetDocShell()->GetDoc()->IsOLEPrtNotifyPending() )
481 static int lcl_CmpIds(
const void *pFirst,
const void *pSecond)
483 return *
static_cast<sal_uInt16
const *
>(pFirst) - *static_cast<sal_uInt16 const *>(pSecond);
489 if ( GetEditWin().IsChainMode() )
490 GetEditWin().SetChainMode(
false );
494 GetDocShell()->IsReadOnly() )
495 CheckReadonlyState();
498 CheckReadonlySelection();
500 if( !m_bAttrChgNotified )
504 GetViewFrame()->GetBindings().IsInUpdate() )
506 m_bAttrChgNotified =
true;
510 if ( SfxItemState::SET != GetObjectShell()->GetMedium()->
GetItemSet()->
511 GetItemState( SID_HIDDEN,
false, &pItem ) ||
512 !static_cast<const SfxBoolItem*>(pItem)->
GetValue() )
514 GetViewFrame()->GetBindings().ENTERREGISTRATIONS();
515 m_bAttrChgNotifiedWithRegistrations =
true;
529 m_pPostItMgr->SetShadowState( m_pWrtShell->GetPostItFieldAtCursor() );
541 if ( m_bAttrChgNotifiedWithRegistrations )
543 GetViewFrame()->GetBindings().LEAVEREGISTRATIONS();
544 m_bAttrChgNotifiedWithRegistrations =
false;
547 CheckReadonlyState();
548 CheckReadonlySelection();
550 bool bOldUndo = m_pWrtShell->DoesUndo();
551 m_pWrtShell->DoUndo(
false );
553 m_pWrtShell->DoUndo( bOldUndo );
554 m_bAttrChgNotified =
false;
555 GetViewImpl()->GetUNOObject_Impl()->NotifySelChanged();
572 static sal_uInt16 aROIds[] =
576 SID_REDO, SID_REPEAT, SID_PASTE,
580 SID_CHARMAP, SID_EMOJI_CONTROL, FN_INSERT_SOFT_HYPHEN,
581 FN_INSERT_HARDHYPHEN, FN_INSERT_HARD_SPACE, FN_INSERT_NNBSP,
589 SID_ATTR_PARA_ADJUST_RIGHT, SID_ATTR_PARA_ADJUST_CENTER,SID_ATTR_PARA_ADJUST_BLOCK,
590 SID_ATTR_PARA_LINESPACE_10, SID_ATTR_PARA_LINESPACE_15, SID_ATTR_PARA_LINESPACE_20,
591 SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_FONTHEIGHT, SID_ATTR_CHAR_COLOR_BACKGROUND,
592 SID_ATTR_CHAR_COLOR_BACKGROUND_EXT, SID_ATTR_CHAR_COLOR_EXT,
593 SID_ATTR_CHAR_COLOR, SID_ATTR_CHAR_WEIGHT, SID_ATTR_CHAR_POSTURE,
594 SID_ATTR_CHAR_OVERLINE,
595 SID_ATTR_CHAR_UNDERLINE, SID_ATTR_FLASH, SID_ATTR_CHAR_STRIKEOUT,
596 SID_ULINE_VAL_SINGLE, SID_ULINE_VAL_DOUBLE, SID_ULINE_VAL_DOTTED,
597 SID_ATTR_CHAR_CONTOUR, SID_ATTR_CHAR_SHADOWED,
600 SID_ATTR_CHAR_KERNING, SID_CHAR_DLG, SID_ATTR_CHAR_WORDLINEMODE,
603 SID_ATTR_PARA_SPLIT, SID_ATTR_PARA_KEEP, SID_ATTR_PARA_WIDOWS,
604 SID_ATTR_PARA_ORPHANS,
605 SID_ATTR_PARA_MODEL, SID_PARA_DLG,
609 static bool bFirst =
true;
615 if ( SfxItemState::DISABLED == eStateRO )
617 rDis.
SetSlotFilter( SfxSlotFilterState::ENABLED_READONLY, aROIds );
623 if ( SfxItemState::DISABLED == eStateProtAll )
625 static sal_uInt16 aAllProtIds[] = { SID_SAVEDOC,
FN_EDIT_REGION };
626 static bool bAllProtFirst =
true;
630 bAllProtFirst =
false;
632 rDis.
SetSlotFilter( SfxSlotFilterState::ENABLED_READONLY, aAllProtIds );
636 else if ( SfxItemState::DISABLED != eStateRO ||
637 SfxItemState::DISABLED != eStateProtAll )
653 !
m_pWrtShell->GetDrawView()->GetMarkedObjectList().GetMarkCount() ))
654 nDisableFlags |= SfxDisableFlags::SwOnProtectedCursor;
656 if( (SfxDisableFlags::SwOnProtectedCursor & nDisableFlags ) !=
678 aCntxt.
SetOptions( SfxDisableFlags::SwOnProtectedCursor & nDisableFlags
680 InputContextFlags( InputContextFlags::Text |
681 InputContextFlags::ExtText ))
683 ( InputContextFlags::Text |
684 InputContextFlags::ExtText )) );
705 m_pNumRuleNodeFromDoc(nullptr),
708 m_pFormShell(nullptr),
709 m_pHScrollbar(nullptr),
710 m_pVScrollbar(nullptr),
715 GetViewFrame()->GetBindings(),
717 m_pLastTableFormat(nullptr),
725 m_nLeftBorderDistance( 0 ),
726 m_nRightBorderDistance( 0 ),
727 m_eLastSearchCommand( static_cast<
SvxSearchCmd>(0xFFFF) ),
728 m_bWheelScrollInProgress(false),
729 m_bCenterCursor(false),
731 m_bTabColFromDoc(false),
732 m_bTabRowFromDoc(false),
733 m_bSetTabColFromDoc(false),
734 m_bSetTabRowFromDoc(false),
735 m_bAttrChgNotified(false),
736 m_bAttrChgNotifiedWithRegistrations(false),
737 m_bVerbsActive(false),
738 m_bDrawRotate(false),
739 m_bDrawSelMode(true),
740 m_bShowAtResize(true),
741 m_bInOuterResizePixel(false),
742 m_bInInnerResizePixel(false),
743 m_bPasteState(false),
744 m_bPasteSpecialState(false),
745 m_bInMailMerge(false),
747 m_bOldShellWasPagePreview(false),
748 m_bIsPreviewDoubleClick(false),
749 m_bMakeSelectionVisible(false),
750 m_bForceChangesToolbar(true),
751 m_nLOKPageUpDownOffset(0)
753 static bool bRequestDoubleBuffering = getenv(
"VCL_DOUBLEBUFFERING_ENABLE");
754 if (bRequestDoubleBuffering)
785 bool bWebDShell =
dynamic_cast<const SwWebDocShell*
>(&rDocSh) !=
nullptr;
795 bool bOldShellWasSrcView =
false;
802 pExistingSh = pOldSh;
804 if (
SwPagePreview* pPagePreview = dynamic_cast<SwPagePreview *>(pExistingSh))
812 else if (dynamic_cast<const SwSrcView *>(pExistingSh) !=
nullptr)
813 bOldShellWasSrcView =
true;
816 SAL_INFO(
"sw.ui",
"before create WrtShell" );
817 if (
SwView *pView = dynamic_cast<SwView*>(pExistingSh))
862 if ( static_cast<SwPagePreview*>(pExistingSh)->ResetFormDesignMode() &&
866 pDrawView->
SetDesignMode( static_cast<SwPagePreview*>(pExistingSh)->FormDesignModeToReset() );
870 SAL_INFO(
"sw.ui",
"after create WrtShell" );
872 SvxRulerSupportFlags::TABS |
873 SvxRulerSupportFlags::PARAGRAPH_MARGINS |
874 SvxRulerSupportFlags::BORDERS |
875 SvxRulerSupportFlags::NEGATIVE_MARGINS|
876 SvxRulerSupportFlags::REDUCED_METRIC,
882 const bool bIsDocModified =
m_pWrtShell->GetDoc()->getIDocumentState().IsModified();
889 if( SfxObjectCreateMode::EMBEDDED != rDocSh.
GetCreateMode() )
933 if (rDocSh.
GetCreateMode() == SfxObjectCreateMode::EMBEDDED &&
939 "sw.ui",
"/org.openoffice.Office.Common/Undo/Steps <= 0");
945 const bool bBrowse =
m_pWrtShell->GetViewOptions()->getBrowseMode();
962 if(
m_pWrtShell->GetDoc()->getIDocumentState().IsUpdateExpField() )
964 if (
m_pWrtShell->GetDoc()->GetDocumentFieldsManager().containsUpdatableFields())
969 m_pWrtShell->GetDoc()->getIDocumentFieldsAccess().UpdateFields(
false);
972 m_pWrtShell->GetDoc()->getIDocumentState().SetUpdateExpFieldStat(
false );
993 if (!
m_pWrtShell->GetDoc()->GetIDocumentUndoRedo().IsUndoNoResetModified() &&
994 ( !pFirst || pFirst == pVFrame ) &&
1003 if( dynamic_cast<const SwGlobalDocShell*>(&rDocSh) !=
nullptr &&
1012 uno::Reference< frame::XFrame > xBeamerFrame = xFrame->findFrame(
1013 "_beamer", frame::FrameSearchFlag::CHILDREN);
1014 if(xBeamerFrame.is())
1057 SW_MOD()->SetView(
nullptr);
1102 static bool bRequestDoubleBuffering = getenv(
"VCL_DOUBLEBUFFERING_ENABLE");
1103 if (bRequestDoubleBuffering)
1113 return dynamic_cast<SwDocShell*
>( pDocShell );
1127 rUserData = OUString::number( rRect.
Left() );
1129 rUserData += OUString::number( rRect.
Top() );
1131 rUserData += OUString::number(
m_pWrtShell->GetViewOptions()->GetZoom() );
1133 rUserData += OUString::number( rVis.
Left() );
1135 rUserData += OUString::number( rVis.
Top() );
1141 rUserData += OUString::number(
1142 static_cast<sal_uInt16>(
m_pWrtShell->GetViewOptions()->GetZoomType()));
1151 uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
1153 uno::Reference<document::XDocumentProperties> xDocProps
1154 = xDPS->getDocumentProperties();
1155 OUString Created = xDocProps->getAuthor();
1156 OUString
Changed = xDocProps->getModifiedBy();
1158 return (!FullName.isEmpty() &&
1159 (!Changed.isEmpty() && Changed == FullName )) ||
1160 (Changed.isEmpty() && !Created.isEmpty() && Created == FullName );
1165 if ( !(rUserData.indexOf(
';')>=0 &&
1179 tools::Long nX = rUserData.getToken( 0,
';', nPos ).toInt32(),
1180 nY = rUserData.getToken( 0,
';', nPos ).toInt32();
1181 Point aCursorPos( nX, nY );
1183 sal_uInt16 nZoomFactor =
1184 static_cast< sal_uInt16
>( rUserData.getToken(0,
';', nPos ).toInt32() );
1186 tools::Long nLeft = rUserData.getToken(0,
';', nPos ).toInt32(),
1187 nTop = rUserData.getToken(0,
';', nPos ).toInt32(),
1188 nRight = rUserData.getToken(0,
';', nPos ).toInt32(),
1189 nBottom= rUserData.getToken(0,
';', nPos ).toInt32();
1192 if ( nBottom > (
m_pWrtShell->GetDocSize().Height()+nAdd) )
1201 if( !
m_pWrtShell->GetViewOptions()->getBrowseMode() )
1202 eZoom = static_cast<SvxZoomType>(static_cast<sal_uInt16>(rUserData.getToken(nOff,
';', nPos ).toInt32()));
1205 eZoom = SvxZoomType::PERCENT;
1209 bool bSelectObj = (0 != rUserData.getToken( nOff,
';', nPos ).toInt32())
1213 m_pViewImpl->SetRestorePosition(aCursorPos, bSelectObj);
1215 bool bSavedFlagValue =
m_pWrtShell->IsMacroExecAllowed();
1221 m_pWrtShell->SwCursorShell::SetCursor( aCursorPos, !bSelectObj );
1230 m_pWrtShell->SetMacroExecAllowed( bSavedFlagValue );
1248 sal_Int32 nIdx{ 0 };
1251 Point aCursorPos2( nXTmp, nYTmp );
1252 bSelectObj =
m_pWrtShell->IsObjSelectable( aCursorPos2 );
1254 m_pWrtShell->SwCursorShell::SetCursor( aCursorPos2 );
1293 sal_Int64 nX = rRect.Left(), nY = rRect.Top(), nLeft = rVis.
Left(), nTop = rVis.
Top();
1294 sal_Int64 nRight = nLeft;
1295 sal_Int64 nBottom = LONG_MIN;
1296 sal_Int16 nZoomType =
static_cast< sal_Int16
>(pVOpt->
GetZoomType());
1297 sal_Int16 nZoomFactor = static_cast < sal_Int16 > (pVOpt->
GetZoom());
1302 bGotVisibleLeft =
false,
1303 bGotVisibleTop =
false, bGotVisibleRight =
false,
1304 bGotVisibleBottom =
false, bGotZoomType =
false,
1305 bGotZoomFactor =
false, bGotIsSelectedFrame =
false,
1306 bGotViewLayoutColumns =
false, bGotViewLayoutBookMode =
false,
1307 bBrowseMode =
false, bGotBrowseMode =
false;
1309 for (
const beans::PropertyValue&
rValue : rSequence)
1311 if (
rValue.Name ==
"ViewLeft" )
1316 else if (
rValue.Name ==
"ViewTop" )
1321 else if (
rValue.Name ==
"VisibleLeft" )
1325 bGotVisibleLeft =
true;
1327 else if (
rValue.Name ==
"VisibleTop" )
1331 bGotVisibleTop =
true;
1333 else if (
rValue.Name ==
"VisibleRight" )
1337 bGotVisibleRight =
true;
1339 else if (
rValue.Name ==
"VisibleBottom" )
1341 rValue.Value >>= nBottom;
1343 bGotVisibleBottom =
true;
1345 else if (
rValue.Name ==
"ZoomType" )
1347 rValue.Value >>= nZoomType;
1348 bGotZoomType =
true;
1350 else if (
rValue.Name ==
"ZoomFactor" )
1352 rValue.Value >>= nZoomFactor;
1353 bGotZoomFactor =
true;
1355 else if (
rValue.Name ==
"ViewLayoutColumns" )
1357 rValue.Value >>= nViewLayoutColumns;
1358 bGotViewLayoutColumns =
true;
1360 else if (
rValue.Name ==
"ViewLayoutBookMode" )
1362 bViewLayoutBookMode = *o3tl::doAccess<bool>(
rValue.Value);
1363 bGotViewLayoutBookMode =
true;
1365 else if (
rValue.Name ==
"IsSelectedFrame" )
1367 rValue.Value >>= bSelectedFrame;
1368 bGotIsSelectedFrame =
true;
1370 else if (
rValue.Name ==
"ShowOnlineLayout")
1372 rValue.Value >>= bBrowseMode;
1373 bGotBrowseMode =
true;
1387 if (!bGotVisibleBottom)
1390 Point aCursorPos( nX, nY );
1392 if (nBottom > (
m_pWrtShell->GetDocSize().Height()+nAdd) )
1399 if ( !
m_pWrtShell->GetViewOptions()->getBrowseMode() )
1400 eZoom = static_cast < SvxZoomType > ( nZoomType );
1403 eZoom = SvxZoomType::PERCENT;
1405 if (bGotIsSelectedFrame)
1407 bool bSelectObj = bSelectedFrame &&
m_pWrtShell->IsObjSelectable( aCursorPos );
1410 bool bSavedFlagValue =
m_pWrtShell->IsMacroExecAllowed();
1414 m_pViewImpl->SetRestorePosition(aCursorPos, bSelectObj);
1417 m_pWrtShell->SwCursorShell::SetCursor( aCursorPos, !bSelectObj );
1420 bool bInHeader =
true;
1421 if (
m_pWrtShell->IsInHeaderFooter( &bInHeader ) )
1448 m_pWrtShell->SetMacroExecAllowed( bSavedFlagValue );
1452 const bool bSetViewLayoutSettings = bGotViewLayoutColumns && bGotViewLayoutBookMode &&
1455 const bool bSetViewSettings = bGotZoomType && bGotZoomFactor &&
1462 const bool bZoomNeedsViewLayout = bSetViewLayoutSettings &&
1463 1 < nViewLayoutColumns &&
1465 eZoom != SvxZoomType::PERCENT;
1467 if ( !bZoomNeedsViewLayout )
1470 if ( bSetViewLayoutSettings )
1471 SetViewLayout( nViewLayoutColumns, bViewLayoutBookMode,
true );
1473 if ( bZoomNeedsViewLayout )
1476 if ( bSetViewSettings )
1477 SetZoom( eZoom, nZoomFactor,
true );
1483 if ( bGotVisibleLeft && bGotVisibleTop )
1490 aTopLeft.setX( (
m_aDocSz.
Width() + lBorder - nEditWidth ) / 2 );
1495 if( aTopLeft.X() > nXMax )
1496 aTopLeft.setX( nXMax < 0 ? 0 : nXMax );
1500 else if (bGotVisibleLeft && bGotVisibleTop && bGotVisibleRight && bGotVisibleBottom )
1516 std::vector<beans::PropertyValue> aVector;
1537 const sal_Int16 nZoomType =
static_cast< sal_Int16
>(
m_pWrtShell->GetViewOptions()->GetZoomType());
1540 const sal_Int16 nViewLayoutColumns =
static_cast< sal_Int16
>(
m_pWrtShell->GetViewOptions()->GetViewLayoutColumns());
1586 return bText ?
GetWrtShell().SwCursorShell::HasSelection()
1616 bool bCallBase =
true;
1617 if(
auto pChangedHint = dynamic_cast<const FmDesignModeChangedHint*>(&rHint))
1619 bool bDesignMode = pChangedHint->GetDesignMode();
1625 AttrChangedNotify(
nullptr);
1635 case SfxHintId::Dying:
1643 case SfxHintId::ModeChanged:
1653 case SfxHintId::TitleChanged:
1679 SfxBoolItem aItem( SID_FM_DESIGN_MODE, !bReadonly);
1681 SfxCallMode::ASYNCHRON, { &aItem });
1685 case SfxHintId::SwDrawViewsCreated:
1693 SfxCallMode::SYNCHRON, { &aItem });
1697 case SfxHintId::RedlineChanged:
1699 static sal_uInt16
const aSlotRedLine[] = {
1720 #if defined(_WIN32) || defined UNX
1724 uno::Reference< XScannerManager2 > xScanMgr =
SW_MOD()->GetScannerManager();
1727 const ScannerContext aContext( xScanMgr->getAvailableScanners().getConstArray()[ 0 ] );
1728 const ScanError eError = xScanMgr->getError( aContext );
1730 if( ScanError_ScanErrorNone == eError )
1732 const uno::Reference< awt::XBitmap > xBitmap( xScanMgr->getBitmap( aContext ) );
1741 m_pWrtShell->Insert( OUString(), OUString(), aGrf );
1770 pVFrame->
SetChildWindow( SwInputChild::GetChildWindowId(),
false );
1842 return aDataHelper.
HasFormat( SotClipboardFormatId::SYLK ) || aDataHelper.
HasFormat( SotClipboardFormatId::SYLK_BIGCAPS );
1869 o_rData = *
SW_MOD()->GetPrtOptions(bWeb);
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
void SetOptions(InputContextFlags nOptions)
OString stripEnd(const OString &rIn, char c)
SfxViewFrame * GetViewFrame() const
#define LINK(Instance, Class, Member)
SfxObjectShellLock CreateTmpSelectionDoc()
static bool IsPasteOwnFormat(const TransferableDataHelper &)
static void ShowDBObj(SwView const &rView, const SwDBData &rData)
static void notifyOtherViews(const SfxViewShell *pThisView, int nType, std::string_view rKey, const OString &rPayload)
#define FN_REDLINE_ACCEPT_ALL
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 * >())
std::unique_ptr< SwFormatClipboard > m_pFormatClipboard
SwXTextView * GetUNOObject_Impl()
#define FN_REDLINE_REJECT_ALL
virtual void ApplyViewOptions(const SwViewOption &rOpt)
bool IsPasteSpecialAllowed()
void SetActive(bool bOn=true)
std::unique_ptr< SwViewGlueDocShell > m_xGlueDocShell
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false)
SfxChildWindow * GetChildWindow(sal_uInt16)
FieldUnit GetVScrollMetric() const
void SetReadonly(bool bSet)
virtual void WriteUserDataSequence(css::uno::Sequence< css::beans::PropertyValue > &) override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
SAL_DLLPRIVATE void CheckReadonlyState()
void SetDesignMode(bool bOn=true)
constexpr WinBits WB_EXTRAFIELD
void InitPrintOptionsFromApplication(SwPrintData &o_rData, bool const bWeb)
SfxViewFrame * GetFrame() const
#define FN_SET_SUPER_SCRIPT
void SetZoom(sal_uInt16 n)
#define FN_DELETE_BACK_SENT
virtual ~SwView() override
std::unique_ptr< SwPostItMgr > m_pPostItMgr
void AddTransferable(SwTransferable &rTransferable)
std::unique_ptr< SwWrtShell > m_pWrtShell
constexpr auto WB_STDRULER
void SetViewLayout(sal_uInt16 nColumns, bool bBookMode, bool bViewOnly=false)
bool IsPasteSpreadsheet(bool bHasOwnTableCopied)
void Pop(SfxShell &rShell, SfxDispatcherPopFlags nMode=SfxDispatcherPopFlags::NONE)
void Left(const tools::Long nLeft)
VclPtr< SvxRuler > m_pHRuler
void SetDisableFlags(SfxDisableFlags nFlags)
void ImpSetVerb(SelectionType nSelType)
SfxDispatcher * GetDispatcher()
void GetSelectedText(OUString &rBuf, ParaBreakType nHndlParaBreak=ParaBreakType::ToBlank)
Query text within selection.
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getViewSettings() override
static bool IsPaste(const SwWrtShell &, const TransferableDataHelper &)
SAL_DLLPRIVATE void CheckReadonlySelection()
Reference< XFrame > xFrame
bool m_bOldShellWasPagePreview
void SetViewLayoutColumns(sal_uInt16 nNew)
void SetSlotFilter(SfxSlotFilterState nEnable=SfxSlotFilterState::DISABLED, o3tl::span< sal_uInt16 const > pSIDs=o3tl::span< sal_uInt16 const >())
static bool lcl_IsOwnDocument(SwView &rView)
#define FN_DELETE_WHOLE_LINE
virtual void WriteUserData(OUString &, bool bBrowse=false) override
void RemoveChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
static std::unique_ptr< SearchAttrItemList > s_xSearchList
void LaunchOLEObj(sal_Int32 nVerb=css::embed::EmbedVerbs::MS_OLEVERB_PRIMARY)
static std::unique_ptr< SearchAttrItemList > s_xReplaceList
Dialog to specify the properties of date form field.
#define FN_INSERT_COLUMN_BREAK
css::uno::Reference< css::frame::XModel > GetModel() const
Of course Writer needs its own rectangles.
const SwFrameFormat * m_pLastTableFormat
void Invalidate(sal_uInt16 nId)
bool IsShowHiddenPara() const
#define FN_INSERT_LINEBREAK
virtual SfxObjectShell * GetObjectShell() override
void AddTransferable(SwTransferable &rTransferable)
bool HasFormat(SotClipboardFormatId nFormat) const
#define FN_PASTE_NESTED_TABLE
SwView_Impl * GetViewImpl()
void SetVisArea(const tools::Rectangle &, bool bUpdateScrollbar=true)
FieldUnit GetHScrollMetric() const
SwWrtShell & GetWrtShell() const
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
SvxZoomType GetZoomType() const
constexpr auto convertTwipToMm100(N n)
bool m_bAttrChgNotifiedWithRegistrations
#define FN_DELETE_BACK_WORD
void SetDrawFuncPtr(std::unique_ptr< SwDrawBase > pFuncPtr)
Used by the UI to modify the document model.
css::uno::Any const & rValue
virtual void set(DocumentSettingId id, bool value)=0
Set the specified document setting.
vcl::Window & GetWindow() const
SelectionType m_nSelectionType
static BitmapEx GetBitmap(const css::uno::Reference< css::awt::XBitmap > &rxBitmap)
SfxShell * GetShell(sal_uInt16 nIdx) const
virtual void SelectShell()
bool m_bVScrollbarEnabled
#define FN_INSERT_BOOKMARK
constexpr OUStringLiteral IsReadOnly(u"IsReadOnly")
bool getBrowseMode() const
void PrtOLENotify(bool bAll)
SfxFrame & GetFrame() const
void setBrowseMode(bool bSet)
static TransferableDataHelper CreateFromSystemClipboard(vcl::Window *pWindow)
bool IsViewVScrollBar() const
virtual void ShowCursor(bool bOn=true) override
static bool s_bJustOpened
const IDocumentMarkAccess * getIDocumentMarkAccess() const
Provides access to the document bookmark interface.
FmFormShell * m_pFormShell
SfxObjectCreateMode GetCreateMode() const
static SotExchangeDest GetSotDestination(const SwWrtShell &rSh)
void DocSzChgd(const Size &rNewSize)
virtual void Deactivate()
bool IsViewHRuler(bool bDirect=false) const
VclPtr< SwEditWin > m_pEditWin
SotExchangeDest m_nLastPasteDestination
#define FN_SHRINK_FONT_SIZE
void WriteUserDataSequence(css::uno::Sequence< css::beans::PropertyValue > &rValues)
SfxItemPool & GetPool() const
virtual OUString GetSelectionText(bool bCompleteWords=false) override
SfxDispatcher & GetDispatcher()
IMPL_LINK_NOARG(SwView, FormControlActivated, LinkParamNone *, void)
constexpr OUStringLiteral aData
void SetDebugName(const char *pDebugName)
#define SAL_N_ELEMENTS(arr)
virtual void ReadUserData(const OUString &, bool bBrowse=false) override
#define FN_TABLE_PASTE_ROW_BEFORE
SwDoc * GetDoc()
returns Doc. But be careful!
SwView(SfxViewFrame *pFrame, SfxViewShell *)
#define FN_REDLINE_ACCEPT_DIRECT
virtual tools::Rectangle GetVisArea(sal_uInt16 nAspect) const override
virtual void ClearFieldActivation()=0
void SetView(SwView *pVw)
Set View for actions via Shell.
virtual FmFormShell * GetFormShell() override
#define FN_SET_SUB_SCRIPT
std::unique_ptr< SwGlossaryHdl > m_pGlosHdl
void SetZoomType(SvxZoomType eZoom_)
bool IsCursorInProtectedArea() const
bool HasSelection() const
bool m_bIsPreviewDoubleClick
bool SelWrd(const Point *=nullptr)
void SetInputContext(const InputContext &rInputContext)
void SetWindow(vcl::Window *pViewPort)
VclPtr< vcl::Window > m_pScrollFill
bool IsViewLayoutBookMode() const
void SetOnlineSpell(bool b)
void GetOptions(SvtLinguOptions &rOptions) const
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
css::uno::Reference< css::datatransfer::XTransferable > GetXTransferable() const
virtual void ReadUserDataSequence(const css::uno::Sequence< css::beans::PropertyValue > &) override
SwViewGlueDocShell(SwView &rView, SwDocShell &rDocSh)
SfxBindings & GetBindings()
Size GetOutputSize() const
#define FN_REDLINE_PREV_CHANGE
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
bool IsViewVRuler(bool bDirect=false) const
#define FN_INSERT_BREAK_DLG
tools::Long Width() const
void ShowUIElement(const OUString &sElementURL) const
static bool IsPasteSpecial(const SwWrtShell &rWrtShell, const TransferableDataHelper &)
constexpr auto convertMm100ToTwip(N n)
void ShowVScrollbar(bool bShow)
SfxDisableFlags GetDisableFlags() const
virtual void SetReadonlyOption(bool bSet) override
void SetName(const OUString &rName)
virtual bool PrepareClose(bool bUI=true) override
SfxItemState QueryState(sal_uInt16 nSID, const SfxPoolItem *&rpState)
void RequestDoubleBuffering(bool bRequest)
SwDrawBase * GetDrawFuncPtr() const
void SetTimeout(sal_uInt64 nTimeoutMs)
virtual ErrCode DoVerb(sal_Int32 nVerb) override
VclPtr< SvxRuler > m_pVRuler
InputContextFlags GetOptions() const
SfxViewShell * GetViewShell() const
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
const Size & GetMargin() const
SwDocShell * GetDocShell()
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
#define SFX_OBJECTBAR_OBJECT
void ShowHScrollbar(bool bShow)
Point PixelToLogic(const Point &rDevicePt) const
static int lcl_CmpIds(const void *pFirst, const void *pSecond)
WinBits const WB_SIZEABLE
#define FN_DELETE_BACK_LINE
void SetVerbs(const css::uno::Sequence< css::embed::VerbDescriptor > &aVerbs)
void SetZoom(SvxZoomType eZoomType, short nFactor=100, bool bViewOnly=false)
void SetViewLayoutBookMode(bool bNew)
SwWrtShell * GetWrtShellPtr() const
VclPtr< SwScrollbar > m_pVScrollbar
SfxDispatcher * GetDispatcher()
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
virtual bool IsTextEdit() const final override
#define SAL_WARN_IF(condition, area, stream)
std::unique_ptr< SwView_Impl > m_pViewImpl
virtual const SwViewShell * GetCurrentViewShell() const =0
Returns the layout set at the document.
#define FN_DELETE_BACK_PARA
const SwViewOption * GetViewOptions() const
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
#define FN_REDLINE_NEXT_CHANGE
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
virtual SAL_DLLPRIVATE void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
#define SAL_INFO(area, stream)
bool m_bPasteSpecialState
void UpdatePointer(const Point &, sal_uInt16 nButtons=0)
IDocumentSettingAccess const & getIDocumentSettingAccess() const
static VclPtr< reference_type > Create(Arg &&...arg)
void SetChildWindow(sal_uInt16 nId, bool bVisible, bool bSetFocus=true)
#define FN_TABLE_PASTE_COL_BEFORE
void Top(const tools::Long nTop)
OUString GetSelectionTextParam(bool bCompleteWords, bool bEraseTrail)
VclPtr< SwScrollbar > m_pHScrollbar
void Push(SfxShell &rShell)
sal_uInt16 GetZoom() const
bool IsInModalMode() const
void Execute(SfxRequest &)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
SfxObjectShellLock BuildTmpSelectionDoc()
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
SwGlossaryHdl * GetGlosHdl()
#define FN_GROW_FONT_SIZE
const tools::Rectangle & GetVisArea() const
bool IsEnableSetModified() const
#define FN_SHIFT_BACKSPACE
static SfxViewFrame * GetFirst(const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
void InvalidateAll(bool bWithMsg)
virtual void SetCurrentViewShell(SwViewShell *pNew)=0
!!!The old layout must be deleted!!!
#define SAL_WARN(area, stream)
const SwView * GetView() const
Point OutputToScreenPixel(const Point &rPos) const
bool IsShowHiddenChar(bool bHard=false) const
bool IsShowHiddenField() const
void EnableSetModified(bool bEnable=true)
virtual SdrView * GetDrawView() const override
SelectionType GetSelectionType() const
SAL_DLLPRIVATE void CreateScrollbar(bool bHori)
static SvxSearchItem * s_pSrchItem
bool IsViewHScrollBar() const
#define FN_REDLINE_REJECT_DIRECT
bool m_bHScrollbarEnabled
void ReadUserDataSequenceValue(const css::beans::PropertyValue *pValue)
ToolbarId GetObjectBarId(sal_uInt16 nPos) const
sal_uInt16 GetViewLayoutColumns() const
virtual bool HasSelection(bool bText=true) const override
void AddChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
virtual bool PrepareClose(bool bUI=true)
bool m_bInitOnceCompleted
void SetNewWindowAllowed(bool bSet)
#define FN_FORMAT_DROPCAPS