20#include <config_features.h>
21#include <config_fuzzers.h>
23#include <com/sun/star/util/SearchAlgorithms2.hpp>
26#include <com/sun/star/sdb/DatabaseContext.hpp>
27#include <com/sun/star/ui/dialogs/XFilePicker3.hpp>
28#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
29#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
30#include <com/sun/star/ui/dialogs/ListboxControlActions.hpp>
31#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
32#include <com/sun/star/linguistic2/XProofreadingIterator.hpp>
33#include <com/sun/star/linguistic2/XDictionary.hpp>
35#include <officecfg/Office/Common.hxx>
105#include <section.hxx>
110#include <sfx2/strings.hrc>
112#include <strings.hrc>
114#include <globals.hrc>
127#include <LibreOfficeKit/LibreOfficeKitEnums.h>
142#include <osl/diagnose.h>
147#include <viewimp.hxx>
151#include <string_view>
180 std::unique_ptr<weld::Label> m_xLabel1;
181 std::unique_ptr<weld::SpinButton> m_xSpinButton;
182 std::unique_ptr<weld::Label> m_xLabel2;
187 SwNumberInputDlg(
weld::Window* pParent,
const OUString& rTitle,
188 const OUString& rLabel1,
const sal_Int64
nValue,
const sal_Int64
min,
const sal_Int64
max,
189 OUString rLabel2 = OUString())
191 , m_xLabel1(m_xBuilder->weld_label(
"label1"))
192 , m_xSpinButton(m_xBuilder->weld_spin_button(
"spinbutton"))
193 , m_xLabel2(m_xBuilder->weld_label(
"label2"))
197 m_xLabel1->set_label(rLabel1);
198 m_xSpinButton->set_value(
nValue);
199 m_xSpinButton->set_range(
min,
max);
200 m_xSpinButton->set_position(-1);
201 m_xSpinButton->select_region(0, -1);
202 m_xSpinButton->connect_changed(
LINK(
this, SwNumberInputDlg, InputModifiedHdl));
203 if (!rLabel2.isEmpty())
205 m_xLabel2->set_label(rLabel2);
212 return m_xSpinButton->get_text().toInt32();
218 m_xOKButton->set_sensitive(!m_xSpinButton->get_text().isEmpty());
222 auto nValue = m_xSpinButton->get_text().toInt32();
223 if (nValue <= m_xSpinButton->get_min())
224 m_xSpinButton->set_value(m_xSpinButton->get_min());
225 else if (
nValue > m_xSpinButton->get_max())
226 m_xSpinButton->set_value(m_xSpinButton->get_max());
228 m_xSpinButton->set_value(
nValue);
230 m_xSpinButton->set_position(-1);
272 if (!rPgStr.isEmpty() && std::u16string_view(OUString::number(nPhyNum)) != rPgStr)
274 else if (nPhyNum != nVirtNum)
275 extra = OUString::number(nVirtNum);
278 sal_uInt16 nPrintedPhyNum = nPhyNum;
279 sal_uInt16 nPrintedPageCount = nPageCount;
280 if (!
GetWrtShell().getIDocumentDeviceAccess().getPrintData().IsPrintEmptyPages())
283 OUString
aStr( nPageCount != nPrintedPageCount
284 ?
SwResId(STR_PAGE_COUNT_PRINTED)
285 : (extra.isEmpty() ?
SwResId(STR_PAGE_COUNT) :
SwResId(STR_PAGE_COUNT_CUSTOM)));
286 aStr =
aStr.replaceFirst(
"%1", OUString::number(nPhyNum));
287 aStr =
aStr.replaceFirst(
"%2", OUString::number(nPageCount));
288 if (nPageCount != nPrintedPageCount)
290 aStr =
aStr.replaceFirst(
"%3", OUString::number(nPrintedPhyNum));
291 aStr =
aStr.replaceFirst(
"%4", OUString::number(nPrintedPageCount));
294 aStr =
aStr.replaceFirst(
"%3", extra);
315 if ( aMetadata.
read(aGraphic) )
321 aTransform.
rotate( aRotation );
335 bLink ? rPath : OUString(),
336 bLink ? rFilter : OUString(),
353 rShell.
InsertGraphic( sURL, rFilter, aGraphic, &aFrameManager );
357 rShell.
InsertGraphic( OUString(), OUString(), aGraphic, &aFrameManager );
369 bool bReturn =
false;
373 OUString sGraphicFormat =
SwResId(STR_POOLFRM_GRAPHIC);
377#if HAVE_FEATURE_DESKTOP
381 ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE,
383 pFileDlg->SetTitle(
SwResId(STR_INSERT_GRAPHIC ));
384 pFileDlg->SetContext( FileDialogHelper::WriterInsertImage );
386 uno::Reference < XFilePicker3 > xFP = pFileDlg->GetFilePicker();
387 uno::Reference < XFilePickerControlAccess > xCtrlAcc(xFP, UNO_QUERY);
390 xCtrlAcc->setValue( ExtendedFilePickerElementIds::CHECKBOX_LINK, 0,
Any(
true));
391 xCtrlAcc->enableControl( ExtendedFilePickerElementIds::CHECKBOX_LINK,
false);
394 std::vector<OUString> aFormats;
396 for(
size_t i = 0;
i < nArrLen; ++
i )
401 aFormats.push_back(pFormat->
GetName());
406 const std::vector<OUString>& rFramePoolArr(
408 for(
const auto &
i : rFramePoolArr)
410 aFormats.push_back(
i);
413 std::sort(aFormats.begin(), aFormats.end());
414 aFormats.erase(std::unique(aFormats.begin(), aFormats.end()), aFormats.end());
416 Sequence<OUString> aListBoxEntries(aFormats.size());
417 OUString* pEntries = aListBoxEntries.getArray();
418 sal_Int16 nSelect = 0;
419 for(
size_t i = 0;
i < aFormats.size(); ++
i )
421 pEntries[
i] = aFormats[
i];
422 if(pEntries[
i] == sGraphicFormat)
429 xCtrlAcc->setValue( ExtendedFilePickerElementIds::LISTBOX_IMAGE_TEMPLATE,
430 ListboxControlActions::ADD_ITEMS , aTemplates );
433 xCtrlAcc->setValue( ExtendedFilePickerElementIds::LISTBOX_IMAGE_TEMPLATE,
434 ListboxControlActions::SET_SELECT_ITEM, aSelectPos );
438 OSL_FAIL(
"control access failed");
443 bool bShowError = !
pName;
445#
if HAVE_FEATURE_DESKTOP
451 OUString aFileName, aFilterName;
454 aFileName =
pName->GetValue();
459#if HAVE_FEATURE_DESKTOP
462 aFileName = pFileDlg->GetPath();
463 aFilterName = pFileDlg->GetCurrentFilter();
467 bool bAsLink =
false;
474 Any aVal = xCtrlAcc->getValue( ExtendedFilePickerElementIds::CHECKBOX_LINK, 0);
475 OSL_ENSURE(aVal.hasValue(),
"Value CBX_INSERT_AS_LINK not found");
476 bAsLink = !aVal.hasValue() || *o3tl::doAccess<bool>(aVal);
477 Any aTemplateValue = xCtrlAcc->getValue(
478 ExtendedFilePickerElementIds::LISTBOX_IMAGE_TEMPLATE,
479 ListboxControlActions::GET_SELECTED_ITEM );
481 aTemplateValue >>= sTmpl;
486 OSL_FAIL(
"control access failed");
495 bool bAsLink =
false;
497#if HAVE_FEATURE_DESKTOP
506 if ( pStyle && !pStyle->GetValue().isEmpty() )
507 sGraphicFormat = pStyle->GetValue();
511 Any aVal = xCtrlAcc->getValue( ExtendedFilePickerElementIds::CHECKBOX_LINK, 0);
512 OSL_ENSURE(aVal.hasValue(),
"Value CBX_INSERT_AS_LINK not found");
513 bAsLink = !aVal.hasValue() || *o3tl::doAccess<bool>(aVal);
514 Any aTemplateValue = xCtrlAcc->getValue(
515 ExtendedFilePickerElementIds::LISTBOX_IMAGE_TEMPLATE,
516 ListboxControlActions::GET_SELECTED_ITEM );
518 aTemplateValue >>= sTmpl;
519 if( !sTmpl.isEmpty() )
520 sGraphicFormat = sTmpl;
529 if (aWarnDlg.run() !=
RET_OK)
567 pResId = STR_GRFILTER_OPENERROR;
569 pResId = STR_GRFILTER_IOERROR;
571 pResId = STR_GRFILTER_FORMATERROR;
573 pResId = STR_GRFILTER_VERSIONERROR;
575 pResId = STR_GRFILTER_FILTERERROR;
577 pResId = STR_GRFILTER_TOOBIG;
586 VclMessageType::Info, VclButtonsType::Ok,
608 const sal_uInt16 nSlot = rReq.
GetSlot();
611 bool bIgnore =
false;
614 case SID_CREATE_SW_DRAWVIEW:
615 m_pWrtShell->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
624 pDlg->StartExecuteAsync(aContext);
630 case SID_REFRESH_VIEW:
637 case FN_PAGEDOWN_SEL:
641 if (
FN_PAGEUP == nSlot || FN_PAGEUP_SEL == nSlot )
655 sal_uInt16 nFact =
m_pWrtShell->GetViewOptions()->GetZoom();
656 if (SID_ZOOM_IN == nSlot)
660 SetZoom(SvxZoomType::PERCENT, nFact);
666 sal_uInt16 nPage = 0;
677 sal_uInt16 nOldPage(nPage);
680 else if (
FN_TO_NEXT_PAGE == nSlot && nPage < m_pWrtShell->GetPageCount())
682 if (nPage != nOldPage)
692 if(aPt.
Y() != aAlPt.
Y())
732 pCursor =
m_pWrtShell->SwCursorShell::GetCursor_();
741 SfxItemState::SET == pArgs->
GetItemState(nSlot,
false, &pItem ))
745 if( aPasswd.hasElements() )
747 OSL_ENSURE( !
static_cast<const SfxBoolItem*
>(pItem)->
GetValue(),
"SwView::Execute(): password set and redlining off doesn't match!" );
753 (void)aPasswdDlg.
run();
757 bool bPasswordOk =
false;
758 if (aPasswd.getLength() == 1 && aPasswd[0] == 1)
762 const css::uno::Sequence< css::beans::PropertyValue > aDocumentProtection =
764 GetDocumentProtectionFromGrabBag();
769 !aDocumentProtection.hasElements() ||
787 VclMessageType::Info, VclButtonsType::Ok,
788 SfxResId(RID_SVXSTR_INCORRECT_PASSWORD)));
800 pViewFrame->GetBindings().Invalidate(FN_REDLINE_ON);
801 pViewFrame->GetBindings().Update(FN_REDLINE_ON);
806 case FN_REDLINE_PROTECT :
810 if( pArgs && SfxItemState::SET == pArgs->
GetItemState(nSlot,
false, &pItem )
818 if (!aPasswd.hasElements())
819 aPasswdDlg.
ShowExtras(SfxShowExtras::CONFIRM);
820 if (aPasswdDlg.
run())
824 Sequence <sal_Int8> aNewPasswd =
827 if(!aPasswd.hasElements())
847 SfxItemState::SET == pArgs->
GetItemState(nSlot,
false, &pItem))
854 if (
m_pWrtShell->GetViewOptions()->IsShowChangesInMargin() &&
855 m_pWrtShell->GetViewOptions()->IsShowChangesInMargin2() )
859 m_pWrtShell->GetLayout()->SetHideRedlines( !bShow );
878 if (pArgs && pArgs->
GetItemState(nSlot,
false, &pItem) == SfxItemState::SET)
883 if (nChangeId == rRedlineTable[
i]->
GetId())
895 if ( bTableSelection )
904 if ( bTableSelection )
905 rSh.
EndUndo( eUndoId, &aRewriter);
919 if (nRedline < rRedlineTable.
size())
920 pRedline = rRedlineTable[nRedline];
926 bool bTableChange =
false;
931 auto pTabLine = pTabBox->
GetUpper();
934 if ( RedlineType::None != pTabLine->GetRedlineType() )
936 nRedline = pTabLine->UpdateTextChangesOnly(nRedline);
946 rRedlineTable[nRedline]->GetType() == RedlineType::Delete
947 ? STR_REDLINE_TABLE_ROW_DELETE
948 : STR_REDLINE_TABLE_ROW_INSERT ));
958 pRedline = rRedlineTable[nRedline];
962 if ( !pTableBox || pTableBox->
GetUpper() != pTabLine )
970 rSh.
EndUndo( eUndoId, &aRewriter);
973 else if ( RedlineType::None != pTabBox->GetRedlineType() )
975 nRedline = pTabBox->GetRedline();
985 rRedlineTable[nRedline]->GetType() == RedlineType::Delete
986 ? STR_REDLINE_TABLE_COLUMN_DELETE
987 : STR_REDLINE_TABLE_COLUMN_INSERT ));
1001 pRedline = rRedlineTable[nRedline-1];
1006 if ( !pTableBox || pTableNode != pTableNd )
1015 pRedline = rRedlineTable[nRedline];
1020 if ( !pTableBox || pTableNode != pTableNd )
1039 rSh.
EndUndo( eUndoId, &aRewriter);
1045 assert(pRedline !=
nullptr);
1048 if (pRedline && !bTableChange)
1071 if (pArgs && pArgs->
GetItemState(nSlot,
false, &pItem) == SfxItemState::SET)
1076 if (nChangeId == rRedlineTable[
i]->
GetId())
1082 if (nRedline < rRedlineTable.
size())
1091 sal_uInt32 nRedlineId = pNext->
GetId();
1092 OString aPayload(
".uno:CurrentTrackedChangeId=" + OString::number(nRedlineId));
1110 sal_uInt32 nRedlineId = pPrev->
GetId();
1111 OString aPayload(
".uno:CurrentTrackedChangeId=" + OString::number(nRedlineId));
1120 case SID_DOCUMENT_COMPARE:
1121 case SID_DOCUMENT_MERGE:
1123 OUString sFileName, sFilterName;
1125 bool bHasFileName =
false;
1127 bool bNoAcceptDialog =
false;
1132 sFileName = pFileItem->GetValue();
1133 bHasFileName = !sFileName.isEmpty();
1136 sFilterName = pFilterNameItem->GetValue();
1140 nVersion = pVersionItem->GetValue();
1145 bNoAcceptDialog = pDialogItem->GetValue();
1156 if (nFound > 0 && !bNoAcceptDialog)
1162 const sal_uInt16
nId = SwRedlineAcceptChild::GetChildWindowId();
1186 AttrChangedNotify(
nullptr);
1201 Point aPt(LONG_MIN, LONG_MIN);
1208 AttrChangedNotify(
nullptr);
1236 SfxCallMode::RECORD, { &aItem });
1241 case SID_ATTR_BORDER_INNER:
1242 case SID_ATTR_BORDER_OUTER:
1243 case SID_ATTR_BORDER_SHADOW:
1249 case SID_ATTR_PAGE_SIZE:
1250 case SID_ATTR_PAGE_MAXSIZE:
1251 case SID_ATTR_PAGE_PAPERBIN:
1252 case SID_ATTR_PAGE_EXT1:
1257 const size_t nCurIdx =
m_pWrtShell->GetCurPageDesc();
1284 const bool bWasLocked =
m_pWrtShell->IsViewLocked();
1300 bool bOldCursorInReadOnly =
m_pWrtShell->IsReadOnlyAvailable();
1303 for(
int i = 0;
i < 2; ++
i )
1319 bool bAutoMarkApplied =
false;
1325 bAutoMarkApplied =
true;
1336 m_pWrtShell->SetReadOnlyAvailable( bOldCursorInReadOnly );
1340 case SID_ATTR_BRUSH:
1344 const size_t nCurIdx =
m_pWrtShell->GetCurPageDesc();
1352 case SID_CLEARHISTORY:
1362#if defined(_WIN32) || defined UNX
1363 case SID_TWAIN_SELECT:
1364 case SID_TWAIN_TRANSFER:
1369 case SID_ATTR_DEFTABSTOP:
1372 if(pArgs && (pTabStopItem = pArgs->
GetItemIfSet(SID_ATTR_DEFTABSTOP,
false)))
1375 const sal_uInt16 nTab = pTabStopItem->
GetValue();
1381 case SID_ATTR_LANGUAGE :
1384 if(pArgs && (pLangItem = pArgs->
GetItemIfSet(SID_ATTR_LANGUAGE,
false)))
1392 case SID_ATTR_CHAR_CTL_LANGUAGE:
1399 case SID_ATTR_CHAR_CJK_LANGUAGE:
1409 int nOutlineLevel = -1;
1414 SwResId(STR_OUTLINE_LEVELS_SHOWN_TITLE),
1415 SwResId(STR_OUTLINE_LEVELS_SHOWN_SPIN_LABEL),
1416 nOutlineLevel + 1, 1, 10,
1417 SwResId(STR_OUTLINE_LEVELS_SHOWN_HELP_LABEL));
1418 if (aDlg.run() ==
RET_OK)
1443 bool *pbNext =
new bool(
true);
1446 MoveNavigationHdl(pbNext);
1449 case SID_JUMPTOMARK:
1450 if( pArgs && SfxItemState::SET == pArgs->
GetItemState(SID_JUMPTOMARK,
false, &pItem))
1461 case SID_AVMEDIA_PLAYER :
1464 case SID_VIEW_DATA_SOURCE_BROWSER:
1479 SfxItemState::SET == pArgs->
GetItemState(nSlot,
false, &pItem ))
1485#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
1494 AttrChangedNotify(
nullptr);
1512 bool bUseCurrentDocument =
true;
1513 bool bQuery = !pArgs || SfxItemState::SET != pArgs->
GetItemState(nSlot);
1519 if (
RET_OK == pDlg->Execute())
1520 bUseCurrentDocument = pDlg->IsThisDocument();
1527 case SID_RECHECK_DOCUMENT:
1531 uno::Reference< linguistic2::XProofreadingIterator > xGCIterator( pDoc->
GetGCIterator() );
1532 if( xGCIterator.is() )
1534 xGCIterator->resetIgnoreRules();
1540 if( xDictionary.is() )
1541 xDictionary->clear();
1549 if (rReq.
GetArgs() !=
nullptr)
1560 case SID_ALIGN_ANY_LEFT :
1561 case SID_ALIGN_ANY_HCENTER :
1562 case SID_ALIGN_ANY_RIGHT :
1563 case SID_ALIGN_ANY_JUSTIFIED:
1564 case SID_ALIGN_ANY_TOP :
1565 case SID_ALIGN_ANY_VCENTER :
1566 case SID_ALIGN_ANY_BOTTOM :
1567 case SID_ALIGN_ANY_HDEFAULT :
1568 case SID_ALIGN_ANY_VDEFAULT :
1570 sal_uInt16 nAlias = 0;
1575 case SID_ALIGN_ANY_LEFT : nAlias = SID_ATTR_PARA_ADJUST_LEFT;
break;
1576 case SID_ALIGN_ANY_HCENTER : nAlias = SID_ATTR_PARA_ADJUST_CENTER;
break;
1577 case SID_ALIGN_ANY_RIGHT : nAlias = SID_ATTR_PARA_ADJUST_RIGHT;
break;
1578 case SID_ALIGN_ANY_JUSTIFIED: nAlias = SID_ATTR_PARA_ADJUST_BLOCK;
break;
1579 case SID_ALIGN_ANY_TOP : nAlias = SID_TABLE_VERT_NONE;
break;
1580 case SID_ALIGN_ANY_VCENTER : nAlias = SID_TABLE_VERT_CENTER;
break;
1581 case SID_ALIGN_ANY_BOTTOM : nAlias = SID_TABLE_VERT_BOTTOM;
break;
1588 case SID_ALIGN_ANY_LEFT : nAlias = SID_OBJECT_ALIGN_LEFT ;
break;
1589 case SID_ALIGN_ANY_HCENTER : nAlias = SID_OBJECT_ALIGN_CENTER ;
break;
1590 case SID_ALIGN_ANY_RIGHT : nAlias = SID_OBJECT_ALIGN_RIGHT ;
break;
1591 case SID_ALIGN_ANY_TOP : nAlias = SID_OBJECT_ALIGN_UP ;
break;
1592 case SID_ALIGN_ANY_VCENTER : nAlias = SID_OBJECT_ALIGN_MIDDLE ;
break;
1593 case SID_ALIGN_ANY_BOTTOM : nAlias = SID_OBJECT_ALIGN_DOWN ;
break;
1599 nAlias, SfxCallMode::ASYNCHRON);
1602 case SID_RESTORE_EDITING_VIEW:
1607 if(
m_pViewImpl->GetRestorePosition(aCursorPos, bSelectObj))
1609 m_pWrtShell->SwCursorShell::SetCursor( aCursorPos, !bSelectObj );
1618 case SID_INSERT_GRAPHIC:
1623 case SID_MOVE_SHAPE_HANDLE:
1625 if (pArgs && pArgs->
Count() >= 3)
1628 if (pSdrView ==
nullptr)
1636 const sal_uLong newPosX = newPosXTwips->GetValue();
1637 const sal_uLong newPosY = newPosYTwips->GetValue();
1638 const Point mPoint(newPosX, newPosY);
1645 if (handle->
GetKind() == SdrHdlKind::Anchor || handle->
GetKind() == SdrHdlKind::Anchor_TR)
1648 pSdrView->
MoveShapeHandle(handleNum, mPoint, OrdNum ? OrdNum->GetValue() : -1);
1654 OSL_ENSURE(
false,
"wrong dispatcher");
1696 OSL_ENSURE( nWhich,
"empty set");
1702 const OUString& sCurrentSectionName = CurrSect->
GetSectionName();
1730 m_pWrtShell->GetFirstLastVisPageNumbers(aVisiblePageNumbers);
1733 OUString sFirstPhy = OUString::number(aVisiblePageNumbers.
nFirstPhy);
1734 OUString sLastPhy = OUString::number(aVisiblePageNumbers.
nLastPhy);
1735 OUString sFirstVirt = OUString::number(aVisiblePageNumbers.
nFirstVirt);
1736 OUString sLastVirt = OUString::number(aVisiblePageNumbers.
nLastVirt);
1741 OUString sPageCount = OUString::number(
m_pWrtShell->GetPageCount());
1745 aTooltip =
SwResId(STR_BOOKCTRL_HINT);
1748 if (sFirstPhy == sFirstCustomPhy && sLastPhy == sLastCustomPhy)
1750 aPageStr =
SwResId(STR_PAGES_COUNT);
1751 aPageStr = aPageStr.replaceFirst(
"%1", sFirstPhy);
1752 aPageStr = aPageStr.replaceFirst(
"%2", sLastPhy);
1753 aPageStr = aPageStr.replaceFirst(
"%3", sPageCount);
1757 aPageStr =
SwResId(STR_PAGES_COUNT_CUSTOM);
1758 aPageStr = aPageStr.replaceFirst(
"%1", sFirstPhy);
1759 aPageStr = aPageStr.replaceFirst(
"%2", sLastPhy);
1760 aPageStr = aPageStr.replaceFirst(
"%3", sFirstCustomPhy);
1761 aPageStr = aPageStr.replaceFirst(
"%4", sLastCustomPhy);
1762 aPageStr = aPageStr.replaceFirst(
"%5", sPageCount);
1767 if (sFirstPhy == sFirstCustomPhy && sLastPhy == sLastCustomPhy)
1769 aPageStr =
SwResId(STR_PAGE_COUNT);
1770 aPageStr = aPageStr.replaceFirst(
"%1", sFirstPhy);
1771 aPageStr = aPageStr.replaceFirst(
"%2", sPageCount);
1775 aPageStr =
SwResId(STR_PAGE_COUNT_CUSTOM);
1776 aPageStr = aPageStr.replaceFirst(
"%1", sFirstPhy);
1777 aPageStr = aPageStr.replaceFirst(
"%2", sFirstCustomPhy);
1778 aPageStr = aPageStr.replaceFirst(
"%3", sPageCount);
1784 aTooltip =
SwResId(STR_BOOKCTRL_HINT_EXTENDED);
1787 if (sFirstPhy == sFirstCustomPhy && sLastPhy == sLastCustomPhy)
1789 aPageStr =
SwResId(STR_PAGES_COUNT_EXTENDED);
1790 aPageStr = aPageStr.replaceFirst(
"%1", sFirstPhy);
1791 aPageStr = aPageStr.replaceFirst(
"%2", sLastPhy);
1792 aPageStr = aPageStr.replaceFirst(
"%3", sPageCount);
1793 aPageStr = aPageStr.replaceFirst(
"%4", sFirstVirt);
1794 aPageStr = aPageStr.replaceFirst(
"%5", sLastVirt);
1798 aPageStr =
SwResId(STR_PAGES_COUNT_CUSTOM_EXTENDED);
1799 aPageStr = aPageStr.replaceFirst(
"%1", sFirstPhy);
1800 aPageStr = aPageStr.replaceFirst(
"%2", sLastPhy);
1801 aPageStr = aPageStr.replaceFirst(
"%3", sFirstCustomPhy);
1802 aPageStr = aPageStr.replaceFirst(
"%4", sLastCustomPhy);
1803 aPageStr = aPageStr.replaceFirst(
"%5", sPageCount);
1804 aPageStr = aPageStr.replaceFirst(
"%6", sFirstVirt);
1805 aPageStr = aPageStr.replaceFirst(
"%7", sLastVirt);
1806 aPageStr = aPageStr.replaceFirst(
"%8", sFirstCustomVirt);
1807 aPageStr = aPageStr.replaceFirst(
"%9", sLastCustomVirt);
1812 if (sFirstPhy == sFirstCustomPhy && sLastPhy == sLastCustomPhy)
1814 aPageStr =
SwResId(STR_PAGE_COUNT_EXTENDED);
1815 aPageStr = aPageStr.replaceFirst(
"%1", sFirstPhy);
1816 aPageStr = aPageStr.replaceFirst(
"%2", sPageCount);
1817 aPageStr = aPageStr.replaceFirst(
"%3", sFirstVirt);
1821 aPageStr =
SwResId(STR_PAGE_COUNT_CUSTOM_EXTENDED);
1822 aPageStr = aPageStr.replaceFirst(
"%1", sFirstPhy);
1823 aPageStr = aPageStr.replaceFirst(
"%2", sFirstCustomPhy);
1824 aPageStr = aPageStr.replaceFirst(
"%3", sPageCount);
1825 aPageStr = aPageStr.replaceFirst(
"%4", sFirstVirt);
1826 aPageStr = aPageStr.replaceFirst(
"%5", sFirstCustomVirt);
1833 aPageStr = aPageStr.replaceAll(
"-",
SwResId(STR_PAGES_TWO_CONJUNCTION));
1868 TranslateId pResId = selectionStats.
nWord ? STR_WORDCOUNT : STR_WORDCOUNT_NO_SELECTION;
1869 TranslateNId pWordResId = selectionStats.
nWord ? STR_WORDCOUNT_WORDARG : STR_WORDCOUNT_WORDARG_NO_SELECTION;
1870 TranslateNId pCharResId = selectionStats.
nWord ? STR_WORDCOUNT_CHARARG : STR_WORDCOUNT_CHARARG_NO_SELECTION;
1873 OUString aWordArg =
SwResId(pWordResId, nWord).replaceAll(
"$1", rLocaleData.
getNum(nWord, 0));
1874 OUString aCharArg =
SwResId(pCharResId, nChar).replaceAll(
"$1", rLocaleData.
getNum(nChar, 0));
1875 OUString aWordCount(
SwResId(pResId));
1876 aWordCount = aWordCount.replaceAll(
"$1", aWordArg);
1877 aWordCount = aWordCount.replaceAll(
"$2", aCharArg);
1886 pWrdCnt->
SetCounts(selectionStats, documentStats);
1892 if (rOnlineAccessibilityCheck)
1894 sal_Int32 nIssues = rOnlineAccessibilityCheck->getNumberOfAccessibilityIssues()
1895 + rOnlineAccessibilityCheck->getNumberOfDocumentLevelAccessibilityIssues();
1919 SvxZoomEnableFlags::N50|
1920 SvxZoomEnableFlags::N75|
1921 SvxZoomEnableFlags::N100|
1922 SvxZoomEnableFlags::N150|
1923 SvxZoomEnableFlags::N200);
1931 case SID_ATTR_VIEWLAYOUT:
1933 if ( (
GetDocShell()->GetCreateMode() != SfxObjectCreateMode::EMBEDDED ) || !
GetDocShell()->IsInPlaceActive() )
1945 case SID_ATTR_ZOOMSLIDER:
1947 if ( (
GetDocShell()->GetCreateMode() != SfxObjectCreateMode::EMBEDDED ) || !
GetDocShell()->IsInPlaceActive() )
1950 const sal_uInt16 nCurrentZoom = pVOpt->
GetZoom();
1957 const bool bAutomaticViewLayout = 0 == nColumns;
1973 const MapMode aTmpMap( MapUnit::MapTwip );
1975 const Size aWindowSize(
GetEditWin().PixelToLogic( rEditSize, aTmpMap ) );
1984 nFac =
std::min( nFac, nVisPercent );
1991 if ( bAutomaticViewLayout )
1994 nFac = aWindowSize.
Width() * 100 / nTmpWidth;
1995 nFac =
std::min( nFac, nVisPercent );
2009 case SID_ATTR_POSITION:
2019 if ( nWhich == SID_ATTR_POSITION )
2029 case SID_TABLE_CELL:
2046 eCategory = StatusCategory::TableCell;
2053 switch( pCurrSect->
GetType() )
2062 eCategory = StatusCategory::TableOfContents;
2067 "Unknown kind of section" );
2069 eCategory = StatusCategory::Section;
2075 eCategory = StatusCategory::Section;
2082 const bool bOutlineNum = pNumRule && pNumRule->
IsOutlineRule();
2084 if (pNumRule && !bOutlineNum )
2093 if(SfxItemState::DEFAULT <=
2096 const OUString& rNumStyle =
2098 if(!rNumStyle.isEmpty())
2102 if (eCategory == StatusCategory::NONE)
2103 eCategory = StatusCategory::ListStyle;
2108 if (!sStr.isEmpty())
2110 sStr +=
SwResId(STR_NUM_LEVEL) + OUString::number( nNumLevel + 1 );
2111 if (eCategory == StatusCategory::NONE)
2112 eCategory = StatusCategory::Numbering;
2116 if( nOutlineLevel != 0 )
2118 if (!sStr.isEmpty())
2122 sStr +=
SwResId(STR_OUTLINE_NUMBERING) +
2126 sStr +=
SwResId(STR_NUM_OUTLINE);
2127 sStr += OUString::number( nOutlineLevel);
2128 if (eCategory == StatusCategory::NONE)
2129 eCategory = StatusCategory::Numbering;
2134 if (!sStr.isEmpty())
2136 sStr =
SwResId(SW_STR_READONLY) + sStr;
2138 if (!sStr.isEmpty())
2154 case SID_ATTR_INSERT:
2177 sal_uInt16 nWhich = rReq.
GetSlot();
2183 SfxCallMode::SYNCHRON|SfxCallMode::RECORD );
2190 SfxCallMode::SYNCHRON|SfxCallMode::RECORD );
2196 const SfxStringItem sDeckName(SID_SIDEBAR_DECK,
"A11yCheckDeck");
2205 if (SfxItemState::SET == pArgs->
GetItemState( nWhich,
true, &pItem))
2209 if(nIdx < pMarkAccess->getBookmarksCount())
2216 OSL_FAIL(
"SwView::ExecuteStatusLine(..)"
2217 " - Ignoring out of range bookmark index");
2225 css::uno::Any aAny(pDialogParent->
GetXWindow());
2228 pInternalItems[ 0 ] = &aDialogParent;
2229 pInternalItems[ 1 ] =
nullptr;
2231 SfxCallMode::SYNCHRON|SfxCallMode::RECORD,
2232 nullptr, 0, pInternalItems);
2237 if ( (
GetDocShell()->GetCreateMode() != SfxObjectCreateMode::EMBEDDED ) || !
GetDocShell()->IsInPlaceActive() )
2253 SvxZoomEnableFlags::N50|
2254 SvxZoomEnableFlags::N75|
2255 SvxZoomEnableFlags::N100|
2256 SvxZoomEnableFlags::N150|
2257 SvxZoomEnableFlags::N200);
2259 aCoreSet.
Put( aZoom );
2264 aCoreSet.
Put( aViewLayout );
2271 pSet = pDlg->GetOutputItemSet();
2275 if ( pSet && (pViewLayoutItem = pSet->
GetItemIfSet(SID_ATTR_VIEWLAYOUT)))
2277 const sal_uInt16 nColumns = pViewLayoutItem->GetValue();
2278 const bool bBookMode = pViewLayoutItem->
IsBookMode();
2283 if ( pSet && (pZoomItem = pSet->
GetItemIfSet(SID_ATTR_ZOOM)))
2296 case SID_ATTR_VIEWLAYOUT:
2299 ( (
GetDocShell()->GetCreateMode() != SfxObjectCreateMode::EMBEDDED ) || !
GetDocShell()->IsInPlaceActive() ) )
2303 const sal_uInt16 nColumns = pLayoutItem->GetValue();
2304 const bool bBookMode = (0 != nColumns && 0 == (nColumns % 2)) && pLayoutItem->IsBookMode();
2317 case SID_ATTR_ZOOMSLIDER:
2319 if ( pArgs && ( (
GetDocShell()->GetCreateMode() != SfxObjectCreateMode::EMBEDDED ) || !
GetDocShell()->IsInPlaceActive() ) )
2323 const sal_uInt16 nCurrentZoom = pZoomItem->GetValue();
2324 SetZoom( SvxZoomType::PERCENT, nCurrentZoom );
2358 nId = SID_ATTR_TRANSFORM;
2362 SfxCallMode::SYNCHRON | SfxCallMode::RECORD );
2370 if (SfxItemState::SET == pArgs->
GetItemState( nWhich,
true, &pItem))
2399 case SID_ATTR_INSERT:
2446 bool bWeb =
dynamic_cast<SwWebView*
>( this ) !=
nullptr;
2455 -> std::optional<std::pair<SwTOXMark, sal_Int32>>
2458 if (
first == std::u16string_view::npos)
2460 SAL_WARN(
"sw.ui",
"JumpToTOXMark: missing separator");
2461 return std::optional<std::pair<SwTOXMark, sal_Int32>>();
2466 SAL_WARN(
"sw.ui",
"JumpToTOXMark: invalid counter");
2467 return std::optional<std::pair<SwTOXMark, sal_Int32>>();
2470 if (second == std::u16string_view::npos)
2472 SAL_WARN(
"sw.ui",
"JumpToTOXMark: missing separator");
2473 return std::optional<std::pair<SwTOXMark, sal_Int32>>();
2475 std::u16string_view
const entry(
aName.substr(
first + 1, second - (
first + 1)));
2476 if (
aName.size() < second + 2)
2478 SAL_WARN(
"sw.ui",
"JumpToTOXMark: invalid tox");
2479 return std::optional<std::pair<SwTOXMark, sal_Int32>>();
2481 sal_uInt16
const indexType(
aName[second + 1]);
2482 std::u16string_view
const indexName(
aName.substr(second + 2));
2495 for (
auto i = rDoc.GetTOXTypeCount(
TOX_USER); 0 <
i; )
2498 auto const pTmp(rDoc.GetTOXType(
TOX_USER,
i));
2499 if (pTmp->GetTypeName() == indexName)
2509 SAL_WARN(
"sw.ui",
"JumpToTOXMark: tox doesn't exist");
2510 return std::optional<std::pair<SwTOXMark, sal_Int32>>();
2515 return std::optional<std::pair<SwTOXMark, sal_Int32>>(std::pair<SwTOXMark, sal_Int32>(tmp, counter));
2522 std::optional<std::pair<SwTOXMark, sal_Int32>>
const tmp(
2530 if (&tmp->first != &rSh.GetDoc()->GotoTOXMark(tmp->first,
TOX_SAME_NXT, rSh.IsReadOnlyAvailable()))
2532 for (sal_Int32
i = 0;
i < tmp->second; ++
i)
2540 SAL_WARN(
"sw.ui",
"JumpToTOXMark: tox mark doesn't exist");
2548 if( !rMark.empty() )
2573 sCmp = sMark.copy(
nPos + 1).replaceAll(
" ",
"");
2575 if( !sCmp.isEmpty() )
2577 OUString
sName( sMark.copy( 0,
nPos ) );
2578 sCmp = sCmp.toAsciiLowerCase();
2581 if (sCmp ==
"drawingobject")
2583 else if( sCmp ==
"region" )
2588 else if( sCmp ==
"outline" )
2593 else if( sCmp ==
"frame" )
2595 else if( sCmp ==
"graphic" )
2597 else if( sCmp ==
"ole" )
2599 else if( sCmp ==
"table" )
2604 else if( sCmp ==
"sequence" )
2615 else if (sCmp ==
"toxmark")
2619 else if( sCmp ==
"text" )
2629 TransliterationFlags::IGNORE_CASE,
2630 SearchAlgorithms2::ABSOLUTE,
2644 else if(
nullptr != ( pINet =
m_pWrtShell->FindINetAttr( sMark ) )) {
2670 else if(
nullptr != ( pINet =
m_pWrtShell->FindINetAttr( sMark ) ))
2697 for(
size_t i = 0;
i < nCnt; ++
i )
2703 if( (pHeaderItem && pHeaderItem->
IsActive()) ||
2704 (pFooterItem && pFooterItem->
IsActive()) )
2714 const sal_uInt16 nSlot = rRequest.
GetSlot();
2722 OUString sFile, sFilter;
2727 bool bHasFileName = !sFile.isEmpty();
2740 std::unique_ptr<SfxMedium> pMed;
2743 if( !rFileName.isEmpty() )
2749 pMed.reset(
new SfxMedium(rFileName, StreamMode::READ,
nullptr,
nullptr ));
2751 pMed->UseInteractionHandler(
true );
2756 pMed->SetFilter( pFilter );
2759 pMed.reset(
new SfxMedium(rFileName, StreamMode::READ, pFilter,
nullptr));
2765 SwDocShell::Factory().GetFactoryName(),
2780 bool bInsert =
false, bCompare =
false;
2786 case SID_DOCUMENT_MERGE:
break;
2787 case SID_DOCUMENT_COMPARE: bCompare =
true;
break;
2788 case SID_INSERTDOC: bInsert =
true;
break;
2791 OSL_ENSURE(
false,
"unknown SlotId!" );
2798 uno::Reference< frame::XDispatchRecorder > xRecorder =
2800 if ( xRecorder.is() )
2804 if(pMedium->GetFilter())
2818 pMedium->Download();
2819 if( aRef.
is() && 1 < aRef->GetRefCount() )
2824 (pMedium->GetFilter()->GetFilterFlags() & SfxFilterFlags::STARONEFILTER) )
2826 size_t nUndoCheck = 0;
2828 if( pRead && pDocSh->
GetDoc() )
2839 nErrno = pRdr->Read( *pRead );
2848 nErrno = pDocSh->
ImportFrom(*pMedium, xInsertPosition)
2875 nFound = nErrno.
IsError() ? -1 : 0;
2903 if (!bCompare && !nFound)
2906 VclMessageType::Info, VclButtonsType::Ok,
2907 SwResId(STR_NO_MERGE_ENTRY)));
2910 if( nRet==2 && xDocSh.
is() )
2926#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
2930 bool lcl_NeedAdditionalDataSource(
const uno::Reference< XDatabaseContext >& _rDatasourceContext )
2932 Sequence < OUString > aNames = _rDatasourceContext->getElementNames();
2934 return ( !aNames.hasElements()
2935 || ( ( 1 == aNames.getLength() )
2936 && aNames.getConstArray()[0] ==
SW_MOD()->GetDBConfig()->GetBibliographySource().sDataSource
2946#if !HAVE_FEATURE_DBCONNECTIVITY || ENABLE_FUZZERS
2947 (void) bUseCurrentDocument;
2949 if(bUseCurrentDocument)
2954 uno::Reference<XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
2955 uno::Reference<XDatabaseContext> xDBContext = DatabaseContext::create(xContext);
2956 bool bCallAddressPilot =
false;
2957 if ( lcl_NeedAdditionalDataSource( xDBContext ) )
2961 std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog(
"DataSourcesUnavailableDialog"));
2963 if (
RET_OK != xQuery->run())
2965 bCallAddressPilot =
true;
2972 if(
RET_OK == pConnectionsDlg->Execute())
2973 bCallAddressPilot = !pConnectionsDlg->IsUseExistingConnections();
2978 if(bCallAddressPilot)
2981 SID_ADDRESS_DATA_SOURCE, SfxCallMode::SYNCHRON);
2982 if ( lcl_NeedAdditionalDataSource( xDBContext ) )
2998 SfxCallMode::SYNCHRON, { &aOn });
3004 if(!
GetWrtShell().IsFieldDataSourceAvailable(sSource))
3007 std::unique_ptr<weld::MessageDialog> xWarning(xBuilder->weld_message_dialog(
"WarnDataSourceDialog"));
3008 OUString sTmp(xWarning->get_primary_text());
3009 xWarning->set_primary_text(sTmp.replaceFirst(
"%1", sSource));
3010 if (
RET_OK == xWarning->run())
3024 std::vector<OUString> aDBNameList;
3025 std::vector<OUString> aAllDBNames;
3027 if(!aDBNameList.empty())
3029 OUString sDBName(aDBNameList[0]);
3036 AttrChangedNotify(
nullptr);
3056 int nRet = aDocTemplDlg.
run();
3057 bool bNewWin =
false;
3083 std::unique_ptr<SfxMedium> pMed = m_pViewImpl->CreateMedium();
3087 VclMessageType::Info, VclButtonsType::Ok,
3088 SwResId(RID_SVXSTR_TXTFILTER_FILTERERROR)));
3093 const sal_uInt16 nSlot = m_pViewImpl->GetRequest()->GetSlot();
3094 tools::Long nFound = InsertMedium( nSlot, std::move(pMed), m_pViewImpl->GetParam() );
3096 if ( SID_INSERTDOC == nSlot )
3098 if ( m_pViewImpl->GetParam() == 0 )
3100 m_pViewImpl->GetRequest()->SetReturnValue(
SfxBoolItem( nSlot, nFound != -1 ) );
3101 m_pViewImpl->GetRequest()->Ignore();
3105 m_pViewImpl->GetRequest()->SetReturnValue(
SfxBoolItem( nSlot, nFound != -1 ) );
3106 m_pViewImpl->GetRequest()->Done();
3109 else if ( SID_DOCUMENT_COMPARE == nSlot || SID_DOCUMENT_MERGE == nSlot )
3111 m_pViewImpl->GetRequest()->SetReturnValue(
SfxInt32Item( nSlot, nFound ) );
3119 sal_uInt16
nId = SwRedlineAcceptChild::GetChildWindowId();
PropertiesInfo aProperties
SfxApplication * SfxGetpApp()
Reference< XExecutableDialog > m_xDialog
const LocaleDataWrapper & GetUILocaleDataWrapper() const
static const AllSettings & GetSettings()
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
static bool IsHeadlessModeEnabled()
sal_uInt16 GetValue() const
sal_uInt32 GetValue() const
const OUString & GetValue() const
static DialogMask HandleError(ErrCode nId, weld::Window *pParent=nullptr, DialogMask nMask=DialogMask::MAX)
static GraphicFilter & GetGraphicFilter()
static ErrCode LoadGraphic(const OUString &rPath, const OUString &rFilter, Graphic &rGraphic, GraphicFilter *pFilter=nullptr, sal_uInt16 *pDeterminedFormat=nullptr)
void setOriginURL(OUString const &rOriginURL)
wrapper iterator: wraps iterator of implementation while hiding MarkBase class; only IMark instances ...
Provides access to the marks of a document.
virtual const_iterator_t getBookmarksBegin() const =0
returns a STL-like random access iterator to the begin of the sequence the IBookmarks.
virtual const_iterator_t getAllMarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of marks.
virtual const_iterator_t findMark(const OUString &rMark) const =0
Finds a mark by name.
virtual int getOutlineLevel(const tSortedOutlineNodeList::size_type nIdx) const =0
virtual void SetRedlinePassword(const css::uno::Sequence< sal_Int8 > &rNewPassword)=0
virtual const SwRedlineTable & GetRedlineTable() const =0
virtual const SwRangeRedline * GetRedline(const SwPosition &rPos, SwRedlineTable::size_type *pFndPos) const =0
virtual RedlineFlags GetRedlineFlags() const =0
Query the currently set redline mode.
virtual const css::uno::Sequence< sal_Int8 > & GetRedlinePassword() const =0
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
virtual const SwDocStat & GetUpdatedDocStat(bool bCompleteAsync, bool bFields)=0
Updates the document statistics if the document has been modified and returns a reference to the resu...
static OUString decode(std::u16string_view rText, DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
static css::uno::Reference< css::linguistic2::XDictionary > GetIgnoreAllList()
OUString getNum(sal_Int64 nNumber, sal_uInt16 nDecimals, bool bUseThousandSep=true, bool bTrailingZeros=true) const
constexpr tools::Long Y() const
tools::Long AdjustY(tools::Long nVertMove)
void disposeAndReset(reference_type *pBody)
SdrHdl * GetFocusHdl() const
SdrHdl * GetHdl(size_t nNum) const
SdrHdlKind GetKind() const
bool AreObjectsMarked() const
const SdrHdlList & GetHdlList() const
bool MoveShapeHandle(const sal_uInt32 handleNum, const Point &aEndPoint, const sal_Int32 aObjectOrdNum=-1)
static SfxAbstractDialogFactory * Create()
void NotifyEvent(const SfxEventHint &rEvent, bool bSynchron=true)
weld::Window * GetTopWindow() const
void Update(sal_uInt16 nId)
void Invalidate(sal_uInt16 nId)
const css::uno::Reference< css::frame::XDispatchRecorder > & GetRecorder() const
SfxDialogController(weld::Widget *pParent, const OUString &rUIFile, const OUString &rDialogId)
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
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::shared_ptr< const SfxFilter > GetFilter4FilterName(const OUString &rName, SfxFilterFlags nMust=SfxFilterFlags::NONE, SfxFilterFlags nDont=SFX_FILTER_NOTINSTALLED) const
OUString const & GetName() const
ErrCode GuessFilter(SfxMedium &rMedium, std::shared_ptr< const SfxFilter > &, SfxFilterFlags nMust=SfxFilterFlags::IMPORT, SfxFilterFlags nDont=SFX_FILTER_NOTINSTALLED) const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void DisableItem(sal_uInt16 nWhich)
const INetURLObject & GetURLObject() const
SfxFilterContainer * GetFilterContainer() const
virtual bool ImportFrom(SfxMedium &rMedium, css::uno::Reference< css::text::XTextRange > const &xInsertPosition)
virtual SfxObjectFactory & GetFactory() const=0
SfxMedium * GetMedium() const
bool IsInPlaceActive() const
static ErrCode HandleFilter(SfxMedium *pMedium, SfxObjectShell const *pDoc)
OUString GetPassword() const
virtual short run() override
void SetMinLen(sal_uInt16 Len)
void ShowExtras(SfxShowExtras nExtras)
sal_uInt16 GetSlot() const
const SfxItemSet * GetArgs() const
const T * GetArg(sal_uInt16 nSlotId) const
void AppendItem(const SfxPoolItem &)
void SetReturnValue(const SfxPoolItem &)
void Done(bool bRemove=false)
SfxItemPool & GetPool() const
const OUString & GetName() const
virtual bool IsConditionalFastCall(const SfxRequest &rReq)
SfxViewFrame * GetFrame() const
const SfxPoolItem * ExecuteSlot(SfxRequest &rReq, const SfxInterface *pIF=nullptr)
virtual short run() override
void ToggleChildWindow(sal_uInt16)
SfxBindings & GetBindings()
bool HasChildWindow(sal_uInt16)
void SetChildWindow(sal_uInt16 nId, bool bVisible, bool bSetFocus=true)
static SAL_WARN_UNUSED_RESULT SfxViewFrame * GetNext(const SfxViewFrame &rPrev, const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
SfxDispatcher * GetDispatcher()
SfxChildWindow * GetChildWindow(sal_uInt16)
static SAL_WARN_UNUSED_RESULT SfxViewFrame * GetFirst(const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
weld::Window * GetFrameWeld() const
void ShowChildWindow(sal_uInt16, bool bVisible=true)
void ChildWindowExecute(SfxRequest &)
weld::Window * GetFrameWeld() const
virtual void libreOfficeKitViewCallback(int nType, const OString &pPayload) const override
SfxViewFrame & GetViewFrame() const
static SAL_WARN_UNUSED_RESULT SfxViewShell * Get(const css::uno::Reference< css::frame::XController > &i_rController)
virtual SfxObjectShell * GetObjectShell() override
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
tools::Long AdjustWidth(tools::Long n)
constexpr tools::Long Width() const
static SVL_DLLPUBLIC void GetHashPassword(css::uno::Sequence< sal_Int8 > &rPassHash, const char *pPass, sal_uInt32 nLen)
static SVL_DLLPUBLIC bool CompareHashPassword(const css::uno::Sequence< sal_Int8 > &rOldPassHash, std::u16string_view sNewPass)
virtual VclPtr< AbstractSvxZoomDialog > CreateSvxZoomDialog(weld::Window *pParent, const SfxItemSet &rCoreSet)=0
static SvxAbstractDialogFactory * Create()
tools::Long GetRight() const
tools::Long GetLeft() const
LanguageType GetLanguage() const
static void SetSearchLabel(const SearchLabel &rSL)
tools::Long GetWidth() const
void SetValueSet(SvxZoomEnableFlags nValues)
SvxZoomType GetType() const
void AddSnappingPoint(sal_Int32 nNew)
virtual VclPtr< AbstractMailMergeCreateFromDlg > CreateMailMergeCreateFromDlg(weld::Window *pParent)=0
virtual VclPtr< VclAbstractDialog > CreateVclSwViewDialog(SwView &rView)=0
virtual VclPtr< AbstractMailMergeFieldConnectionsDlg > CreateMailMergeFieldConnectionsDlg(weld::Window *pParent)=0
static SwAbstractDialogFactory * Create()
static void SetFrameMode_(FlyMode eMode)
static FlyMode GetFrameMode()
void ExtendedSelectAll(bool bFootnotes=true)
static void FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection)
void Push()
store a copy of the current cursor on the cursor stack
OUString GetBoxNms() const
const SwTableNode * IsCursorInTable() const
Check if Point of current cursor is placed within a table.
static void FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage)
static void FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn)
void EndAction(const bool bIdleEnd=false)
SwOutlineNodes::size_type GetOutlinePos(sal_uInt8 nLevel=UCHAR_MAX, SwPaM *pPaM=nullptr)
search "outline position" before previous outline node at given level
bool HasReadonlySel(bool isReplace=false) const
void ExecuteFormLetter(SwWrtShell &rSh, const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
static OUString GetEventName(sal_Int32 nId)
virtual void SetChangeRecording(bool bActivate, bool bLockAllViews=false) override
Reader * StartConvertFrom(SfxMedium &rMedium, SwReaderPtr &rpRdr, SwCursorShell const *pCursorSh=nullptr, SwPaM *pPaM=nullptr)
For inserting document.
SwDoc * GetDoc()
returns Doc. But be careful!
std::unique_ptr< sw::OnlineAccessibilityCheck > const & getOnlineAccessibilityCheck() const
SwFrameFormat * MakeFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom, bool bBroadcast=false, bool bAuto=true)
size_t GetPageDescCnt() const
const sw::FrameFormats< SwFrameFormat * > * GetFrameFormats() const
void SpellItAgainSam(bool bInvalid, bool bOnlyWrong, bool bSmartTags)
Re-trigger spelling in the idle handler.
IDocumentUndoRedo & GetIDocumentUndoRedo()
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
static void CalculateNonBlankPages(const SwRootFrame &rLayout, sal_uInt16 &nDocPageCount, sal_uInt16 &nActualPage)
::sw::DocumentRedlineManager const & GetDocumentRedlineManager() const
css::uno::Reference< css::linguistic2::XProofreadingIterator > const & GetGCIterator() const
const SwFrameFormat * GetDfltFrameFormat() const
const SwPageDesc & GetPageDesc(const size_t i) const
IDocumentStatistics const & getIDocumentStatistics() const
SwFrameFormat * FindFrameFormatByName(const OUString &rName) const
void CountWords(SwDocStat &rStat) const
Count words in current selection.
const SwTOXBase * GetCurTOX() const
Get current listing before or at the Cursor.
bool GetCurAttr(SfxItemSet &, const bool bMergeIndentValuesOfNumRule=false) const
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
SwDBManager * GetDBManager() const
For evaluation of DB fields (new DB-manager).
SwFrameFormat * GetTableFormat()
const SwSection * GetCurrSection() const
bool IsAnyDatabaseFieldInDoc() const
sal_uInt8 GetNumLevel() const
int GetCurrentParaOutlineLevel() const
Get Outline level of current paragraph.
SwDBData const & GetDBData() const
Database information.
const SwNumRule * GetNumRuleAtCurrCursorPos() const
void GetAllUsedDB(std::vector< OUString > &rDBNameList, std::vector< OUString > const *pAllDBNames)
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
void ResetAttr(const o3tl::sorted_vector< sal_uInt16 > &attrs=o3tl::sorted_vector< sal_uInt16 >(), SwPaM *pCursor=nullptr)
void ReRead(const OUString &rGrfName, const OUString &rFltName, const Graphic *pGraphic=nullptr)
Re-read if graphic is not ok. Current graphic is replaced by the new one.
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
void SetApplyTemplate(const SwApplyTemplate &)
Apply template.
void InsFrame(sal_uInt16 nCols)
Insert mode for frames.
void SetUseInputLanguage(bool bNew)
#i42732# display status of font size/name depending on either the input language or the selection pos...
void SetChainMode(bool bOn)
void ToggleOutlineContentVisibility(const size_t nOutlinePos, const bool bSubs)
Point GetAnchorObjDiff() const
Methods for status line.
void SetFrameFormat(SwFrameFormat *pFormat, bool bKeepOrient=false, Point const *pDocPos=nullptr)
If frame then set frame style.
bool IsFrameSelected() const
size_t IsObjSelected() const
void SetSize(const Size &rLSize)
void SetCol(const SwFormatCol &rCol)
const Size & GetSize() const
Base class of the Writer layout elements.
sal_uInt16 GetPhyPageNum() const
sal_uInt16 GetPageSelection() const
static void ShowDBObj(SwView const &rView, const SwDBData &rData)
SwTableBox * GetTableBox() const
If node is in a table return the respective table box.
SwTableNode * FindTableNode()
Search table node, in which it is.
bool IsOutlineRule() const
static constexpr auto npos
PaM is Point and Mark: a selection of the document model.
const SwPosition * Start() const
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
SwFrameFormat & GetMaster()
const_iterator begin() const
void ToggleInsModeOnActiveSidebarWin()
tools::ULong GetSidebarWidth(bool bPx=false) const
tools::ULong GetSidebarBorderWidth(bool bPx=false) const
const_iterator end() const
SW_DLLPUBLIC bool HasActiveSidebarWin() const
const SwRedlineData & GetRedlineData(sal_uInt16 nPos=0) const
Of course Writer needs its own rectangles.
void SSize(const Size &rNew)
virtual bool ReInitDlg(SwDocShell *pDocSh) override
bool CanCombine(const SwRedlineData &rCmp) const
static constexpr size_type npos
vector_type::size_type size_type
void AddRule(SwUndoArg eWhat, const OUString &rWith)
const OUString & GetSectionName() const
SectionType GetType() const
Represents the current text cursor of one opened edit window.
const Point & GetPtPos() const
const Point & GetMkPos() const
static const std::vector< OUString > & GetFrameFormatUINameArray()
const OUString & GetTOXName() const
void SetAlternativeText(const OUString &rAlt)
SwTableBox is one table cell in the document model.
RedlineType GetRedlineType() const
sal_uInt16 GetGapBetweenPages() const
bool IsViewLayoutBookMode() const
SvxZoomType GetZoomType() const
sal_uInt16 GetZoom() const
sal_uInt16 GetViewLayoutColumns() const
bool getBrowseMode() const
sal_uInt16 GetDocumentBorder() const
const SwViewOption * GetViewOptions() const
void UnlockPaint(bool bVirDev=false)
const IDocumentSettingAccess & getIDocumentSettingAccess() const
Provides access to the document setting interface.
const IDocumentMarkAccess * getIDocumentMarkAccess() const
Provides access to the document bookmark interface.
void LockPaint(LockPaintReason eReason)
const IDocumentOutlineNodes * getIDocumentOutlineNodesAccess() const
const SwPostItMgr * GetPostItMgr() const
void ExecuteScan(SfxRequest &rReq)
SAL_DLLPRIVATE bool PageDownCursor(bool bSelect)
void ExecuteStatusLine(SfxRequest &)
execute method for the status line
void AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId=nullptr)
tools::Long InsertDoc(sal_uInt16 nSlotId, const OUString &rFileName, const OUString &rFilterName, sal_Int16 nVersion=0)
void EditLinkDlg()
show "edit link" dialog
SwWrtShell & GetWrtShell() const
void SetCachedString(CachedStringID id, const OUString &sStr)
std::unique_ptr< SwView_Impl > m_pViewImpl
std::unique_ptr< SwWrtShell > m_pWrtShell
void SetOldDrwCat(const OUString &sStr)
void SetOldFrameCat(const OUString &sStr)
tools::Rectangle m_aVisArea
void ExecuteInsertDoc(SfxRequest &rRequest, const SfxPoolItem *pItem)
void Execute(SfxRequest &)
OUString GetPageStr(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const OUString &rPgStr)
Create string for showing the page number in the statusbar.
void SetViewLayout(sal_uInt16 nColumns, bool bBookMode, bool bViewOnly=false)
const tools::Rectangle & GetVisArea() const
bool JumpToSwMark(std::u16string_view rMark)
OUString m_sOldSectionName
const OUString & GetOldGrfCat()
SwPostItMgr * GetPostItMgr()
SelectCycle m_aSelectCycle
void ExecuteScan(SfxRequest &rReq)
SelectionType m_nSelectionType
void GenerateFormLetter(bool bUseCurrentDocument)
bool m_bMakeSelectionVisible
SAL_DLLPRIVATE bool PageUpCursor(bool bSelect)
SwWrtShell * GetWrtShellPtr() const
SwDrawBase * GetDrawFuncPtr() const
void SetOldTabCat(const OUString &sStr)
const OUString & GetCachedString(CachedStringID id)
void SetOldGrfCat(const OUString &sStr)
const OUString & GetOldFrameCat()
void UpdatePageNums()
invalidate page numbering field
void SetCursorAtTop(bool bFlag, bool bCenter=false)
virtual bool IsConditionalFastCall(const SfxRequest &rReq) override
SwDocShell * GetDocShell()
SwView_Impl * GetViewImpl()
void StateStatusLine(SfxItemSet &)
get status of the status line
SAL_DLLPRIVATE bool InsertGraphicDlg(SfxRequest &)
const OUString & GetOldDrwCat()
void SetVisArea(const tools::Rectangle &, bool bUpdateScrollbar=true)
void InsFrameMode(sal_uInt16 nCols)
void InvalidateRulerPos()
const OUString & GetOldTabCat()
SAL_DLLPRIVATE Point AlignToPixel(const Point &rPt) const
static void SetMoveType(sal_uInt16 nSet)
tools::Long InsertMedium(sal_uInt16 nSlotId, std::unique_ptr< SfxMedium > pMedium, sal_Int16 nVersion)
void SetZoom(SvxZoomType eZoomType, short nFactor=100, bool bViewOnly=false)
ErrCode InsertGraphic(const OUString &rPath, const OUString &rFilter, bool bLink, GraphicFilter *pFlt)
void SetCounts(const SwDocStat &rCurrCnt, const SwDocStat &rDocStat)
Used by the UI to modify the document model.
OUString const & GetCurPageStyle() const
void MakeOutlineLevelsVisible(const int nLevel)
bool GotoPage(sal_uInt16 nPage, bool bRecord)
void GotoMark(const ::sw::mark::IMark *const pMark)
SelectionType GetSelectionType() const
void InsertGraphic(const OUString &rPath, const OUString &rFilter, const Graphic &, SwFlyFrameAttrMgr *=nullptr, RndStdIds nAnchorType=RndStdIds::FLY_AT_PARA)
bool HasSelection() const
bool Pop(SwCursorShell::PopMode, ::std::optional< SwCallLink > &roLink)
static bool IsModifyPasswordCorrect(std::u16string_view aPassword, const css::uno::Sequence< css::beans::PropertyValue > &aInfo)
static css::uno::Sequence< css::beans::PropertyValue > ConvertPasswordInfo(const css::uno::Sequence< css::beans::PropertyValue > &aInfo)
void HideAll(bool bDeletion)
Size GetOutputSizePixel() const
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
virtual css::uno::Reference< css::awt::XWindow > GetXWindow()=0
#define FN_SET_BLOCK_MODE
#define FN_REDLINE_ACCEPT_DIRECT
#define FN_OUTLINE_LEVELS_SHOWN
#define FN_FORMAT_FRAME_DLG
#define FN_STAT_WORDCOUNT
#define FN_EDIT_CURRENT_TOX
#define FN_REDLINE_REJECT_DIRECT
#define FN_FORMAT_TABLE_DLG
#define FN_LINE_NUMBERING_DLG
#define FN_NUMBER_BULLETS
#define FN_SELECTION_CYCLE
#define FN_REDLINE_NEXT_CHANGE
#define FN_REDLINE_PREV_CHANGE
#define FN_REDLINE_ACCEPT_TONEXT
#define FN_UPDATE_CUR_TOX
#define FN_WORDCOUNT_DIALOG
#define FN_STAT_ACCESSIBILITY_CHECK
#define FN_INSERT_FIELD_DATA_ONLY
#define FN_SPELL_GRAMMAR_DIALOG
#define FN_PARAM_FTN_INFO
#define FN_INSERT_MULTI_TOX
#define FN_FORMAT_PAGE_DLG
#define FN_MAILMERGE_SENDMAIL_CHILDWINDOW
#define FN_REDLINE_REJECT_TONEXT
#define FN_REDLINE_ACCEPT
#define FN_TOGGLE_OUTLINE_CONTENT_VISIBILITY
IMPL_LINK_NOARG(SwContentControlButton, PopupModeEndHdl, weld::Popover &, void)
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
DECL_LINK(CheckNameHdl, SvxNameDialog &, bool)
virtual SfxBindings & GetBindings() override
virtual sal_uInt32 GetId() const override
int SwFindDocShell(SfxObjectShellRef &xDocSh, SfxObjectShellLock &xLockRef, std::u16string_view rFileName, const OUString &rPasswd, const OUString &rFilter, sal_Int16 nVersion, SwDocShell *pDestSh)
Find the right DocShell and create a new one: The return value specifies what should happen to the Sh...
std::unique_ptr< SwReader, o3tl::default_delete< SwReader > > SwReaderPtr
@ PageCalc
... page will be formatted if required.
@ PagesArea
Rect covering the pages area.
#define ERRCODE_GRFILTER_OPENERROR
#define ERRCODE_GRFILTER_TOOBIG
#define ERRCODE_GRFILTER_FORMATERROR
#define ERRCODE_GRFILTER_FILTERERROR
#define ERRCODE_GRFILTER_IOERROR
#define ERRCODE_GRFILTER_VERSIONERROR
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
constexpr TypedWhichId< SwFormatHeader > RES_HEADER(102)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(111)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
constexpr TypedWhichId< SvxTabStopItem > RES_PARATR_TABSTOP(68)
constexpr TypedWhichId< SwFormatFooter > RES_FOOTER(103)
constexpr TypedWhichId< SwNumRuleItem > RES_PARATR_NUMRULE(72)
std::unique_ptr< weld::Button > m_xOKButton
#define LINK(Instance, Class, Member)
#define SAL_WARN(area, stream)
constexpr OUStringLiteral aData
SVL_DLLPUBLIC Link< OUString *, bool > const & GetMaybeFileHdl()
SVL_DLLPUBLIC OUString SmartRel2Abs(INetURLObject const &rTheBaseURIRef, OUString const &rTheRelURIRef, Link< OUString *, bool > const &rMaybeFileHdl=Link< OUString *, bool >(), bool bCheckFileExists=true, bool bIgnoreFragment=false, INetURLObject::EncodeMechanism eEncodeMechanism=INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism eDecodeMechanism=INetURLObject::DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
const LanguageTag & getLocale()
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
constexpr OUStringLiteral first
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
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.
auto PrepareJumpToTOXMark(SwDoc const &rDoc, std::u16string_view aName) -> std::optional< std::pair< SwTOXMark, sal_Int32 > >
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
SFX2_DLLPUBLIC OUString SfxResId(TranslateId aId)
OUString sFirstCustomVirt
std::function< void(sal_Int32)> maEndDialogFn
#define ERR_SWG_READ_ERROR
#define STR_SW_EVENT_PAGE_COUNT
OUString SwResId(TranslateId aId)
sal_Unicode const toxMarkSeparator
separator for toxmarks: #<no>%19<text>%19<type><typename>|toxmark
const char cSequenceMarkSeparator
const sal_Unicode cMarkSeparator
constexpr sal_uInt8 MAXLEVEL
const std::u16string_view aStringList[]
IMPL_LINK(SwView, DialogClosedHdl, sfx2::FileDialogHelper *, _pFileDlg, void)
const char sStatusDelim[]
static auto JumpToTOXMark(SwWrtShell &rSh, std::u16string_view aName) -> bool
static size_t lcl_PageDescWithHeader(const SwDoc &rDoc)
static void lcl_SetAllTextToDefaultLanguage(SwWrtShell &rWrtSh, sal_uInt16 nWhichId)
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)