LibreOffice Module sw (master) 1
appenv.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <hintids.hxx>
21
22#include <comphelper/string.hxx>
23#include <sfx2/request.hxx>
24
25#include <sfx2/bindings.hxx>
26#include <sfx2/printer.hxx>
27#include <sfx2/viewfrm.hxx>
28#include <editeng/boxitem.hxx>
29#include <editeng/lrspitem.hxx>
30#include <editeng/ulspitem.hxx>
31#include <editeng/pbinitem.hxx>
32#include <editeng/paperinf.hxx>
33#include <osl/diagnose.h>
34#include <fmthdft.hxx>
35#include <swwait.hxx>
36#include <swmodule.hxx>
37#include <wrtsh.hxx>
38#include <view.hxx>
39#include <docsh.hxx>
40#include <frmatr.hxx>
41#include <fldbas.hxx>
42#include <swundo.hxx>
44#include <dialoghelp.hxx>
45#include <fmtcol.hxx>
46#include <frmmgr.hxx>
47#include <fldmgr.hxx>
48#include <pagedesc.hxx>
49#include <poolfmt.hxx>
50#include <expfld.hxx>
51#include <SwStyleNameMapper.hxx>
52#include <fmtpdsc.hxx>
53
54#include <cmdid.h>
55#include <strings.hrc>
56#include <swabstdlg.hxx>
57#include <envimg.hxx>
58#include "appenv.hxx"
59
60#define ENV_NEWDOC RET_OK
61#define ENV_INSERT RET_USER
62
63// Function used for labels and envelopes in applab.cxx and appenv.cxx
64OUString InsertLabEnvText( SwWrtShell& rSh, SwFieldMgr& rFieldMgr, const OUString& rText )
65{
66 OUString sRet;
67 OUString aText = rText.replaceAll("\r", "");
68
69 sal_Int32 nTokenPos = 0;
70 while( -1 != nTokenPos )
71 {
72 OUString aLine = aText.getToken( 0, '\n', nTokenPos );
73 while ( !aLine.isEmpty() )
74 {
75 OUString sTmpText;
76 bool bField = false;
77
78 sal_Int32 nPos = aLine.indexOf( '<' );
79 if (0 != nPos)
80 {
81 sal_Int32 const nCopy((nPos != -1) ? nPos : aLine.getLength());
82 sTmpText = aLine.copy(0, nCopy);
83 aLine = aLine.copy(nCopy);
84 }
85 else
86 {
87 nPos = aLine.indexOf( '>' );
88 if ( nPos == -1 )
89 {
90 sTmpText = aLine;
91 aLine.clear();
92 }
93 else
94 {
95 sTmpText = aLine.copy( 0, nPos + 1);
96 aLine = aLine.copy( nPos + 1);
97
98 // Database fields must contain at least 3 points!
99 OUString sDBName( sTmpText.copy( 1, sTmpText.getLength() - 2));
100 if (comphelper::string::getTokenCount(sDBName, '.') >= 3)
101 {
102 sDBName = ::ReplacePoint(sDBName, true);
103 SwInsertField_Data aData(SwFieldTypesEnum::Database, 0, sDBName, OUString(), 0, &rSh);
104 rFieldMgr.InsertField( aData );
105 sRet = sDBName;
106 bField = true;
107 }
108 }
109 }
110 if ( !bField )
111 rSh.Insert( sTmpText );
112 }
113 rSh.SplitNode();
114 }
115 rSh.DelLeft(); // Again remove last linebreak
116
117 return sRet;
118}
119
120static void lcl_CopyCollAttr(SwWrtShell const * pOldSh, SwWrtShell* pNewSh, sal_uInt16 nCollId)
121{
122 sal_uInt16 nCollCnt = pOldSh->GetTextFormatCollCount();
123 for( sal_uInt16 nCnt = 0; nCnt < nCollCnt; ++nCnt )
124 {
125 SwTextFormatColl* pColl = &pOldSh->GetTextFormatColl(nCnt);
126 if(nCollId == pColl->GetPoolFormatId())
127 pNewSh->GetTextCollFromPool(nCollId)->SetFormatAttr(pColl->GetAttrSet());
128 }
129}
130
132{
133 static sal_uInt16 nTitleNo = 0;
134
135 SwDocShell *pMyDocSh;
136 SfxViewFrame *pFrame;
137 SwView *pNewView;
138 SwWrtShell *pOldSh,
139 *pSh;
140
141 // Get current shell
142 pMyDocSh = static_cast<SwDocShell*>( SfxObjectShell::Current());
143 pOldSh = pMyDocSh ? pMyDocSh->GetWrtShell() : nullptr;
144
145 // Create new document (don't show!)
146 SfxObjectShellLock xDocSh( new SwDocShell( SfxObjectCreateMode::STANDARD ) );
147 xDocSh->DoInitNew();
149 pNewView = static_cast<SwView*>( pFrame->GetViewShell());
150 pNewView->AttrChangedNotify(nullptr); // so that SelectShell is being called
151 pSh = pNewView->GetWrtShellPtr();
152
153 if (!pSh)
154 return;
155
156 OUString aTmp = SwResId(STR_ENV_TITLE) + OUString::number( ++nTitleNo );
157 xDocSh->SetTitle( aTmp );
158
159 // if applicable, copy the old Collections "Sender" and "Receiver" to
160 // a new document
161 if ( pOldSh )
162 {
165 }
166
167 // Read SwEnvItem from config
168 SwEnvCfgItem aEnvCfg;
169
170 // Check if there's already an envelope.
171 bool bEnvChange = false;
172
174 aSet.Put(aEnvCfg.GetItem());
175
176 SfxPrinter* pTempPrinter = pSh->getIDocumentDeviceAccess().getPrinter( true );
177 if(pOldSh )
178 {
179 const SwPageDesc& rCurPageDesc = pOldSh->GetPageDesc(pOldSh->GetCurPageDesc());
180 OUString sEnvelope;
182 bEnvChange = rCurPageDesc.GetName() == sEnvelope;
183
184 IDocumentDeviceAccess& rIDDA_old = pOldSh->getIDocumentDeviceAccess();
185 if( rIDDA_old.getPrinter( false ) )
186 {
188 rIDDA.setJobsetup( *rIDDA_old.getJobsetup() );
189 //#69563# if it isn't the same printer then the pointer has been invalidated!
190 pTempPrinter = rIDDA.getPrinter( true );
191 }
192 pTempPrinter->SetPaperBin(rCurPageDesc.GetMaster().GetPaperBin().GetValue());
193
194 }
195
197 short nMode = ENV_INSERT;
198
199 const SwEnvItem* pItem = rReq.GetArg<SwEnvItem>(FN_ENVELOP);
200 if ( !pItem )
201 {
203 pDlg.disposeAndReset(pFact->CreateSwEnvDlg(GetFrameWeld(pMyDocSh), aSet, pOldSh, pTempPrinter, !bEnvChange));
204 nMode = pDlg->Execute();
205 }
206 else
207 {
208 const SfxBoolItem* pBoolItem = rReq.GetArg<SfxBoolItem>(FN_PARAM_1);
209 if ( pBoolItem && pBoolItem->GetValue() )
210 nMode = ENV_NEWDOC;
211 }
212
213 if (nMode == ENV_NEWDOC || nMode == ENV_INSERT)
214 {
215 SwWait aWait( static_cast<SwDocShell&>(*xDocSh), true );
216
217 // Read dialog and save item to config
218 const SwEnvItem& rItem = pItem ? *pItem : static_cast<const SwEnvItem&>( pDlg->GetOutputItemSet()->Get(FN_ENVELOP) );
219 aEnvCfg.GetItem() = rItem;
220 aEnvCfg.Commit();
221
222 // When we print we take the Jobsetup that is set up in the dialog.
223 // Information has to be set here, before a possible destruction of
224 // the new shell because the shell's printer has been handed to the
225 // dialog.
226 if ( nMode != ENV_NEWDOC )
227 {
228 OSL_ENSURE(pOldSh, "No document - wasn't 'Insert' disabled???");
230 aItem.SetValue(static_cast<sal_uInt8>(pSh->getIDocumentDeviceAccess().getPrinter(true)->GetPaperBin()));
232 }
233
234 SwWrtShell *pTmp = nMode == ENV_INSERT ? pOldSh : pSh;
235 const SwPageDesc* pFollow = nullptr;
238 const OUString sSendMark = pSend->GetName();
239 const OUString sAddrMark = pAddr->GetName();
240
241 if (nMode == ENV_INSERT)
242 {
243
244 SetView(&pOldSh->GetView()); // Set pointer to top view
245
246 // Delete new document
247 xDocSh->DoClose();
248 pSh = pOldSh;
249 //#i4251# selected text or objects in the document should
250 //not be deleted on inserting envelopes
251 pSh->EnterStdMode();
252 // Here it goes (insert)
254 pSh->StartAllAction();
255 pSh->SttEndDoc(true);
256
257 if (bEnvChange)
258 {
259 // followup template: page 2
260 pFollow = pSh->GetPageDesc(pSh->GetCurPageDesc()).GetFollow();
261
262 // Delete text from the first page
263 if ( !pSh->SttNxtPg(true) )
264 pSh->EndPg(true);
265 pSh->DelRight();
266 // Delete frame of the first page
267 if ( pSh->GotoFly(sSendMark) )
268 {
269 pSh->EnterSelFrameMode();
270 pSh->DelRight();
271 }
272 if ( pSh->GotoFly(sAddrMark) )
273 {
274 pSh->EnterSelFrameMode();
275 pSh->DelRight();
276 }
277 pSh->SttEndDoc(true);
278 }
279 else
280 // Followup template: page 1
281 pFollow = &pSh->GetPageDesc(pSh->GetCurPageDesc());
282
283 // Insert page break
284 if ( pSh->IsCursorInTable() )
285 {
286 pSh->SplitNode();
287 pSh->Right( SwCursorSkipMode::Chars, false, 1, false );
289 aBreakSet.Put( SwFormatPageDesc( pFollow ) );
290 pSh->SetTableAttr( aBreakSet );
291 }
292 else
293 {
294 OUString sFollowName(pFollow->GetName());
295 pSh->InsertPageBreak(&sFollowName, std::nullopt);
296 }
297 pSh->SttEndDoc(true);
298 }
299 else
300 {
301 pFollow = &pSh->GetPageDesc(pSh->GetCurPageDesc());
302 // Let's go (print)
303 pSh->StartAllAction();
304 pSh->DoUndo(false);
305
306 // Again, copy the new collections "Sender" and "Receiver" to
307 // a new document
308 if ( pOldSh )
309 {
312 }
313 }
314
315 CurrShell aCurr(pSh);
316 pSh->SetNewDoc(); // Avoid performance problems
317
318 // Remember Flys of this site
319 std::vector<SwFrameFormat*> aFlyArr;
320 if( ENV_NEWDOC != nMode && !bEnvChange )
321 pSh->GetPageObjs( aFlyArr );
322
323 // Get page description
325 SwFrameFormat& rFormat = pDesc->GetMaster();
326
327 Printer *pPrt = pSh->getIDocumentDeviceAccess().getPrinter( true );
328
329 // Borders (are put together by Shift-Offset and alignment)
330 Size aPaperSize = pPrt->PixelToLogic( pPrt->GetPaperSizePixel(),
331 MapMode(MapUnit::MapTwip));
332 if ( !aPaperSize.Width() && !aPaperSize.Height() )
334 if ( aPaperSize.Width() > aPaperSize.Height() )
335 Swap( aPaperSize );
336
337 tools::Long lLeft = rItem.m_nShiftRight,
338 lUpper = rItem.m_nShiftDown;
339
340 sal_uInt16 nPageW = o3tl::narrowing<sal_uInt16>(std::max(rItem.m_nWidth, rItem.m_nHeight)),
341 nPageH = o3tl::narrowing<sal_uInt16>(std::min(rItem.m_nWidth, rItem.m_nHeight));
342
343 switch (rItem.m_eAlign)
344 {
345 case ENV_HOR_LEFT: break;
346 case ENV_HOR_CNTR: lLeft += std::max(tools::Long(0), aPaperSize.Width() - nPageW) / 2;
347 break;
348 case ENV_HOR_RGHT: lLeft += std::max(tools::Long(0), aPaperSize.Width() - nPageW);
349 break;
350 case ENV_VER_LEFT: lUpper += std::max(tools::Long(0), aPaperSize.Width() - nPageH);
351 break;
352 case ENV_VER_CNTR: lUpper += std::max(tools::Long(0), aPaperSize.Width() - nPageH) / 2;
353 break;
354 case ENV_VER_RGHT: break;
355 }
356 SvxLRSpaceItem aLRMargin( RES_LR_SPACE );
357 SvxULSpaceItem aULMargin( RES_UL_SPACE );
358 aLRMargin.SetLeft (o3tl::narrowing<sal_uInt16>(lLeft) );
359 aULMargin.SetUpper(o3tl::narrowing<sal_uInt16>(lUpper));
360 aLRMargin.SetRight(0);
361 aULMargin.SetLower(0);
362 rFormat.SetFormatAttr(aLRMargin);
363 rFormat.SetFormatAttr(aULMargin);
364
365 // Header and footer
366 rFormat.SetFormatAttr(SwFormatHeader(false));
367 pDesc->ChgHeaderShare(false);
368 rFormat.SetFormatAttr(SwFormatFooter(false));
369 pDesc->ChgFooterShare(false);
370
371 // Page numbering
372 pDesc->SetUseOn(UseOnPage::All);
373
374 // Page size
376 nPageW + lLeft, nPageH + lUpper));
377
378 // Set type of page numbering
379 SvxNumberType aType;
381 pDesc->SetNumType(aType);
382
383 // Followup template
384 if (pFollow)
385 pDesc->SetFollow(pFollow);
386
387 // Landscape
388 pDesc->SetLandscape( rItem.m_eAlign >= ENV_VER_LEFT &&
389 rItem.m_eAlign <= ENV_VER_RGHT);
390
391 // Apply page description
392
393 size_t nPos;
394 pSh->FindPageDescByName( pDesc->GetName(),
395 false,
396 &nPos );
397
398 pSh->ChgPageDesc( nPos, *pDesc);
399 pSh->ChgCurPageDesc(*pDesc);
400
401 // Insert Frame
402 SwFlyFrameAttrMgr aMgr(false, pSh, Frmmgr_Type::ENVELP, nullptr);
403 SwFieldMgr aFieldMgr;
405
406 // Overwrite defaults!
407 aMgr.GetAttrSet().Put( SvxBoxItem(RES_BOX) );
408 aMgr.SetULSpace( 0, 0 );
409 aMgr.SetLRSpace( 0, 0 );
410
411 // Sender
412 if (rItem.m_bSend)
413 {
414 pSh->SttEndDoc(true);
415 aMgr.InsertFlyFrame(RndStdIds::FLY_AT_PAGE,
416 Point(rItem.m_nSendFromLeft + lLeft, rItem.m_nSendFromTop + lUpper),
417 Size (rItem.m_nAddrFromLeft - rItem.m_nSendFromLeft, 0));
418
419 pSh->EnterSelFrameMode();
420 pSh->SetFlyName(sSendMark);
421 pSh->UnSelectFrame();
422 pSh->LeaveSelFrameMode();
423 pSh->SetTextFormatColl( pSend );
424 InsertLabEnvText( *pSh, aFieldMgr, rItem.m_aSendText );
425 aMgr.UpdateAttrMgr();
426 }
427
428 // Addressee
429 pSh->SttEndDoc(true);
430
431 aMgr.InsertFlyFrame(RndStdIds::FLY_AT_PAGE,
432 Point(rItem.m_nAddrFromLeft + lLeft, rItem.m_nAddrFromTop + lUpper),
433 Size (nPageW - rItem.m_nAddrFromLeft - 566, 0));
434 pSh->EnterSelFrameMode();
435 pSh->SetFlyName(sAddrMark);
436 pSh->UnSelectFrame();
437 pSh->LeaveSelFrameMode();
438 pSh->SetTextFormatColl( pAddr );
439 InsertLabEnvText(*pSh, aFieldMgr, rItem.m_aAddrText);
440
441 // Move Flys to the "old" pages
442 if (!aFlyArr.empty())
443 pSh->SetPageObjsNewPage(aFlyArr);
444
445 // Finished
446 pSh->SttEndDoc(true);
447
448 pSh->EndAllAction();
449
450 if (nMode == ENV_NEWDOC)
451 pSh->DoUndo();
452 else
454
455 if (nMode == ENV_NEWDOC)
456 {
457 pFrame->GetFrame().Appear();
458
459 if ( rItem.m_aAddrText.indexOf('<') >= 0 )
460 {
461 static sal_uInt16 const aInva[] =
462 {
463 SID_SBA_BRW_UPDATE,
464 SID_SBA_BRW_INSERT,
465 SID_SBA_BRW_MERGE,
466 0
467 };
468 pFrame->GetBindings().Invalidate( aInva );
469
470 // Open database beamer
471 ShowDBObj(*pNewView, pSh->GetDBData());
472 }
473 }
474
475 if ( !pItem )
476 {
477 rReq.AppendItem( rItem );
478 if ( nMode == ENV_NEWDOC )
479 rReq.AppendItem( SfxBoolItem( FN_PARAM_1, true ) );
480 }
481
482 rReq.Done();
483 }
484 else // Abort
485 {
486 rReq.Ignore();
487
488 xDocSh->DoClose();
489 --nTitleNo;
490
491 // Set pointer to top view
492 if (pOldSh)
493 SetView(&pOldSh->GetView());
494 }
495}
496
497/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static void lcl_CopyCollAttr(SwWrtShell const *pOldSh, SwWrtShell *pNewSh, sal_uInt16 nCollId)
Definition: appenv.cxx:120
#define ENV_NEWDOC
Definition: appenv.cxx:60
#define ENV_INSERT
Definition: appenv.cxx:61
OUString InsertLabEnvText(SwWrtShell &rSh, SwFieldMgr &rFieldMgr, const OUString &rText)
Definition: appenv.cxx:64
Provides access to the formatting devices of a document.
virtual const JobSetup * getJobsetup() const =0
Returns the Jobsetup.
virtual SfxPrinter * getPrinter(bool bCreate) const =0
Return the printer set at the document.
virtual void setJobsetup(const JobSetup &rJobSetup)=0
Sets the Jobsetup.
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
const Size & GetPaperSizePixel() const
void disposeAndReset(reference_type *pBody)
void Invalidate(sal_uInt16 nId)
bool GetValue() const
void Appear()
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void SetTitle(const OUString &rTitle)
static SAL_WARN_UNUSED_RESULT SfxObjectShell * Current()
void Ignore()
const T * GetArg(sal_uInt16 nSlotId) const
void AppendItem(const SfxPoolItem &)
void Done(bool bRemove=false)
SfxItemPool & GetPool() const
SfxViewShell * GetViewShell() const
SfxBindings & GetBindings()
SfxFrame & GetFrame() const
static SfxViewFrame * LoadHiddenDocument(SfxObjectShell const &i_rDoc, SfxInterfaceId i_nViewId)
constexpr tools::Long Height() const
constexpr tools::Long Width() const
void SetRight(const tools::Long nR, const sal_uInt16 nProp=100)
void SetLeft(const tools::Long nL, const sal_uInt16 nProp=100)
void SetNumberingType(SvxNumType nSet)
static Size GetPaperSize(Paper ePaper, MapUnit eUnit=MapUnit::MapTwip)
void SetLower(const sal_uInt16 nL, const sal_uInt16 nProp=100)
void SetUpper(const sal_uInt16 nU, const sal_uInt16 nProp=100)
virtual VclPtr< SfxAbstractTabDialog > CreateSwEnvDlg(weld::Window *pParent, const SfxItemSet &rSet, SwWrtShell *pWrtSh, Printer *pPrt, bool bInsert)=0
static SwAbstractDialogFactory * Create()
Definition: swabstdlg.cxx:36
const SwTableNode * IsCursorInTable() const
Check if Point of current cursor is placed within a table.
Definition: crsrsh.cxx:600
bool SttEndDoc(bool bStt)
Definition: crsrsh.cxx:579
SwWrtShell * GetWrtShell()
Access to the SwWrtShell belonging to SwView.
Definition: docsh.hxx:225
void StartAllAction()
For all views of this document.
Definition: edws.cxx:86
void SetNewDoc()
Optimizing UI.
Definition: edws.cxx:288
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
Definition: edws.cxx:223
SwTextFormatColl & GetTextFormatColl(sal_uInt16 nTextFormatColl) const
Definition: edfcol.cxx:699
sal_uInt16 GetTextFormatCollCount() const
Definition: edfcol.cxx:694
void SetTextFormatColl(SwTextFormatColl *, const bool bResetListAttrs=false)
Add 2nd optional parameter <bResetListAttrs> - see also <SwDoc::SetTextFormatColl(....
Definition: edfcol.cxx:2202
SwPageDesc * GetPageDescFromPool(sal_uInt16 nId)
Definition: edfmt.cxx:132
SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId)
Definition: edfmt.cxx:121
SwDBData const & GetDBData() const
Database information.
Definition: edfld.cxx:292
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
Definition: edws.cxx:234
void DoUndo(bool bOn=true)
Undo.
Definition: edws.cxx:200
void EndAllAction()
Definition: edws.cxx:97
SwEnvItem & GetItem()
Definition: envimg.hxx:82
sal_Int32 m_nWidth
Definition: envimg.hxx:49
sal_Int32 m_nSendFromLeft
Definition: envimg.hxx:47
OUString m_aSendText
Definition: envimg.hxx:44
sal_Int32 m_nShiftDown
Definition: envimg.hxx:54
sal_Int32 m_nShiftRight
Definition: envimg.hxx:53
OUString m_aAddrText
Definition: envimg.hxx:42
sal_Int32 m_nSendFromTop
Definition: envimg.hxx:48
SwEnvAlign m_eAlign
Definition: envimg.hxx:51
sal_Int32 m_nAddrFromTop
Definition: envimg.hxx:46
sal_Int32 m_nAddrFromLeft
Definition: envimg.hxx:45
sal_Int32 m_nHeight
Definition: envimg.hxx:50
bool m_bSend
Definition: envimg.hxx:43
void ChgPageDesc(size_t i, const SwPageDesc &)
Definition: fedesc.cxx:111
SwPageDesc * FindPageDescByName(const OUString &rName, bool bGetFromPool=false, size_t *pPos=nullptr)
Definition: fedesc.cxx:131
void SetFlyName(const OUString &rName)
Set name at selected FlyFrame.
Definition: fefly1.cxx:1471
size_t GetCurPageDesc(const bool bCalcFrame=true) const
Definition: fedesc.cxx:167
void ChgCurPageDesc(const SwPageDesc &)
PageDescriptor-interface.
Definition: fedesc.cxx:43
void SetPageObjsNewPage(std::vector< SwFrameFormat * > &rFillArr)
Definition: fefly1.cxx:1016
const SwPageDesc & GetPageDesc(size_t i) const
Definition: fedesc.cxx:126
void SetTableAttr(const SfxItemSet &)
Definition: fetab.cxx:2306
void GetPageObjs(std::vector< SwFrameFormat * > &rFillArr)
SS for envelopes: get all page-bound objects and set them to new page.
Definition: fefly1.cxx:1003
bool InsertField(SwInsertField_Data &rData)
Definition: fldmgr.cxx:895
void InsertFlyFrame()
Definition: frmmgr.cxx:189
void SetLRSpace(tools::Long nLeft, tools::Long nRight)
Definition: frmmgr.cxx:538
const SfxItemSet & GetAttrSet() const
Definition: frmmgr.hxx:124
void SetHeightSizeType(SwFrameSize eType)
Definition: frmmgr.cxx:591
void SetULSpace(tools::Long nTop, tools::Long nBottom)
Definition: frmmgr.cxx:550
void UpdateAttrMgr()
Definition: frmmgr.cxx:137
Footer, for pageformats Client of FrameFormat describing the footer.
Definition: fmthdft.hxx:65
Header, for PageFormats Client of FrameFormat describing the header.
Definition: fmthdft.hxx:34
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
Definition: fmtpdsc.hxx:36
const SvxPaperBinItem & GetPaperBin(bool=true) const
Definition: frmatr.hxx:84
sal_uInt16 GetPoolFormatId() const
Get and set Pool style IDs.
Definition: format.hxx:163
const OUString & GetName() const
Definition: format.hxx:131
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:136
virtual bool SetFormatAttr(const SfxPoolItem &rAttr)
Definition: format.cxx:447
Style of a layout element.
Definition: frmfmt.hxx:72
void InsertEnv(SfxRequest &)
Definition: appenv.cxx:131
void SetView(SwView *pVw)
Definition: swmodule.hxx:145
static void ShowDBObj(SwView const &rView, const SwDBData &rData)
Definition: swmodul1.cxx:367
void ChgFooterShare(bool bNew)
Definition: pagedesc.hxx:334
const OUString & GetName() const
Definition: pagedesc.hxx:196
void SetFollow(const SwPageDesc *pNew)
Definition: pagedesc.hxx:314
SwFrameFormat & GetMaster()
Definition: pagedesc.hxx:238
void ChgHeaderShare(bool bNew)
Definition: pagedesc.hxx:327
void SetNumType(const SvxNumberType &rNew)
Definition: pagedesc.hxx:203
const SwPageDesc * GetFollow() const
Definition: pagedesc.hxx:267
void SetUseOn(UseOnPage eNew)
Same as WriteUseOn(), but the >= HeaderShare part of the bitfield is not modified.
Definition: pagedesc.hxx:341
void SetLandscape(bool bNew)
Definition: pagedesc.hxx:200
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
Represents the style of a paragraph.
Definition: fmtcol.hxx:61
virtual bool SetFormatAttr(const SfxPoolItem &rAttr) override
Override to recognize changes on the <SwNumRuleItem> and register/unregister the paragragh style at t...
Definition: fmtcol.cxx:395
const IDocumentDeviceAccess & getIDocumentDeviceAccess() const
Provides access to the document device interface.
Definition: viewsh.cxx:2819
const SfxItemPool & GetAttrPool() const
Definition: viewsh.hxx:648
Definition: view.hxx:146
SwWrtShell * GetWrtShellPtr() const
Definition: view.hxx:424
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
bool EndPg(bool bSelect=false)
Definition: move.cxx:388
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
Definition: select.cxx:711
bool Right(SwCursorSkipMode nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual=false)
Definition: move.cxx:127
void LeaveSelFrameMode()
Definition: select.cxx:729
bool DelLeft()
Definition: delete.cxx:136
bool GotoFly(const OUString &rName, FlyCntType eType=FLYCNTTYPE_ALL, bool bSelFrame=true)
Definition: move.cxx:637
void Insert(const OUString &)
Definition: wrtsh1.cxx:226
void EnterStdMode()
Definition: select.cxx:560
bool SttNxtPg(bool bSelect=false)
Definition: move.cxx:358
void SplitNode(bool bAutoFormat=false)
Definition: wrtsh1.cxx:1317
bool DelRight(bool isReplaceHeuristic=false)
Definition: delete.cxx:285
void InsertPageBreak(const OUString *pPageDesc=nullptr, const ::std::optional< sal_uInt16 > &rPgNum=std::nullopt)
Definition: wrtsh1.cxx:941
void UnSelectFrame()
Definition: select.cxx:332
const SwView & GetView() const
Definition: wrtsh.hxx:443
#define FN_ENVELOP
Definition: cmdid.h:784
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
Definition: dialoghelp.cxx:19
@ ENV_VER_LEFT
Definition: envimg.hxx:33
@ ENV_VER_RGHT
Definition: envimg.hxx:35
@ ENV_HOR_RGHT
Definition: envimg.hxx:32
@ ENV_HOR_LEFT
Definition: envimg.hxx:30
@ ENV_VER_CNTR
Definition: envimg.hxx:34
@ ENV_HOR_CNTR
Definition: envimg.hxx:31
OUString ReplacePoint(const OUString &rTmpName, bool bWithCommandType)
Definition: expfld.cxx:105
@ Fixed
Frame cannot be moved in Var-direction.
@ Variable
Frame is variable in Var-direction.
constexpr TypedWhichId< SvxBoxItem > RES_BOX(112)
constexpr TypedWhichId< SvxPaperBinItem > RES_PAPER_BIN(90)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(97)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(98)
sal_uInt16 nPos
constexpr OUStringLiteral aData
Definition: ww8scan.hxx:48
sal_Int32 getTokenCount(std::string_view rIn, char cTok)
long Long
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
Definition: nodeoffset.hxx:35
PAPER_A4
Size & Swap(Size &rSize)
@ RES_POOLCOLL_ENVELOPE_ADDRESS
Addressee.
Definition: poolfmt.hxx:354
@ RES_POOLCOLL_SEND_ADDRESS
Sender.
Definition: poolfmt.hxx:355
@ RES_POOLPAGE_ENVELOPE
Envelope.
Definition: poolfmt.hxx:174
constexpr auto SFX_INTERFACE_NONE
SVX_NUM_NUMBER_NONE
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:168
@ UI_INSERT_ENVELOPE
unsigned char sal_uInt8