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 OUString aTmp = SwResId(STR_ENV_TITLE) + OUString::number( ++nTitleNo );
154 xDocSh->SetTitle( aTmp );
155
156 // if applicable, copy the old Collections "Sender" and "Receiver" to
157 // a new document
158 if ( pOldSh )
159 {
162 }
163
164 // Read SwEnvItem from config
165 SwEnvCfgItem aEnvCfg;
166
167 // Check if there's already an envelope.
168 bool bEnvChange = false;
169
171 aSet.Put(aEnvCfg.GetItem());
172
173 SfxPrinter* pTempPrinter = pSh->getIDocumentDeviceAccess().getPrinter( true );
174 if(pOldSh )
175 {
176 const SwPageDesc& rCurPageDesc = pOldSh->GetPageDesc(pOldSh->GetCurPageDesc());
177 OUString sEnvelope;
179 bEnvChange = rCurPageDesc.GetName() == sEnvelope;
180
181 IDocumentDeviceAccess& rIDDA_old = pOldSh->getIDocumentDeviceAccess();
182 if( rIDDA_old.getPrinter( false ) )
183 {
185 rIDDA.setJobsetup( *rIDDA_old.getJobsetup() );
186 //#69563# if it isn't the same printer then the pointer has been invalidated!
187 pTempPrinter = rIDDA.getPrinter( true );
188 }
189 pTempPrinter->SetPaperBin(rCurPageDesc.GetMaster().GetPaperBin().GetValue());
190
191 }
192
194 short nMode = ENV_INSERT;
195
196 const SwEnvItem* pItem = rReq.GetArg<SwEnvItem>(FN_ENVELOP);
197 if ( !pItem )
198 {
200 pDlg.disposeAndReset(pFact->CreateSwEnvDlg(GetFrameWeld(pMyDocSh), aSet, pOldSh, pTempPrinter, !bEnvChange));
201 nMode = pDlg->Execute();
202 }
203 else
204 {
205 const SfxBoolItem* pBoolItem = rReq.GetArg<SfxBoolItem>(FN_PARAM_1);
206 if ( pBoolItem && pBoolItem->GetValue() )
207 nMode = ENV_NEWDOC;
208 }
209
210 if (nMode == ENV_NEWDOC || nMode == ENV_INSERT)
211 {
212 SwWait aWait( static_cast<SwDocShell&>(*xDocSh), true );
213
214 // Read dialog and save item to config
215 const SwEnvItem& rItem = pItem ? *pItem : static_cast<const SwEnvItem&>( pDlg->GetOutputItemSet()->Get(FN_ENVELOP) );
216 aEnvCfg.GetItem() = rItem;
217 aEnvCfg.Commit();
218
219 // When we print we take the Jobsetup that is set up in the dialog.
220 // Information has to be set here, before a possible destruction of
221 // the new shell because the shell's printer has been handed to the
222 // dialog.
223 if ( nMode != ENV_NEWDOC )
224 {
225 OSL_ENSURE(pOldSh, "No document - wasn't 'Insert' disabled???");
227 aItem.SetValue(static_cast<sal_uInt8>(pSh->getIDocumentDeviceAccess().getPrinter(true)->GetPaperBin()));
229 }
230
231 SwWrtShell *pTmp = nMode == ENV_INSERT ? pOldSh : pSh;
232 const SwPageDesc* pFollow = nullptr;
235 const OUString sSendMark = pSend->GetName();
236 const OUString sAddrMark = pAddr->GetName();
237
238 if (nMode == ENV_INSERT)
239 {
240
241 SetView(&pOldSh->GetView()); // Set pointer to top view
242
243 // Delete new document
244 xDocSh->DoClose();
245 pSh = pOldSh;
246 //#i4251# selected text or objects in the document should
247 //not be deleted on inserting envelopes
248 pSh->EnterStdMode();
249 // Here it goes (insert)
251 pSh->StartAllAction();
252 pSh->SttEndDoc(true);
253
254 if (bEnvChange)
255 {
256 // followup template: page 2
257 pFollow = pSh->GetPageDesc(pSh->GetCurPageDesc()).GetFollow();
258
259 // Delete text from the first page
260 if ( !pSh->SttNxtPg(true) )
261 pSh->EndPg(true);
262 pSh->DelRight();
263 // Delete frame of the first page
264 if ( pSh->GotoFly(sSendMark) )
265 {
266 pSh->EnterSelFrameMode();
267 pSh->DelRight();
268 }
269 if ( pSh->GotoFly(sAddrMark) )
270 {
271 pSh->EnterSelFrameMode();
272 pSh->DelRight();
273 }
274 pSh->SttEndDoc(true);
275 }
276 else
277 // Followup template: page 1
278 pFollow = &pSh->GetPageDesc(pSh->GetCurPageDesc());
279
280 // Insert page break
281 if ( pSh->IsCursorInTable() )
282 {
283 pSh->SplitNode();
284 pSh->Right( SwCursorSkipMode::Chars, false, 1, false );
286 aBreakSet.Put( SwFormatPageDesc( pFollow ) );
287 pSh->SetTableAttr( aBreakSet );
288 }
289 else
290 {
291 OUString sFollowName(pFollow->GetName());
292 pSh->InsertPageBreak(&sFollowName, std::nullopt);
293 }
294 pSh->SttEndDoc(true);
295 }
296 else
297 {
298 pFollow = &pSh->GetPageDesc(pSh->GetCurPageDesc());
299 // Let's go (print)
300 pSh->StartAllAction();
301 pSh->DoUndo(false);
302
303 // Again, copy the new collections "Sender" and "Receiver" to
304 // a new document
305 if ( pOldSh )
306 {
309 }
310 }
311
312 CurrShell aCurr(pSh);
313 pSh->SetNewDoc(); // Avoid performance problems
314
315 // Remember Flys of this site
316 std::vector<SwFrameFormat*> aFlyArr;
317 if( ENV_NEWDOC != nMode && !bEnvChange )
318 pSh->GetPageObjs( aFlyArr );
319
320 // Get page description
322 SwFrameFormat& rFormat = pDesc->GetMaster();
323
324 Printer *pPrt = pSh->getIDocumentDeviceAccess().getPrinter( true );
325
326 // Borders (are put together by Shift-Offset and alignment)
327 Size aPaperSize = pPrt->PixelToLogic( pPrt->GetPaperSizePixel(),
328 MapMode(MapUnit::MapTwip));
329 if ( !aPaperSize.Width() && !aPaperSize.Height() )
331 if ( aPaperSize.Width() > aPaperSize.Height() )
332 Swap( aPaperSize );
333
334 tools::Long lLeft = rItem.m_nShiftRight,
335 lUpper = rItem.m_nShiftDown;
336
337 sal_uInt16 nPageW = o3tl::narrowing<sal_uInt16>(std::max(rItem.m_nWidth, rItem.m_nHeight)),
338 nPageH = o3tl::narrowing<sal_uInt16>(std::min(rItem.m_nWidth, rItem.m_nHeight));
339
340 switch (rItem.m_eAlign)
341 {
342 case ENV_HOR_LEFT: break;
343 case ENV_HOR_CNTR: lLeft += std::max(tools::Long(0), aPaperSize.Width() - nPageW) / 2;
344 break;
345 case ENV_HOR_RGHT: lLeft += std::max(tools::Long(0), aPaperSize.Width() - nPageW);
346 break;
347 case ENV_VER_LEFT: lUpper += std::max(tools::Long(0), aPaperSize.Width() - nPageH);
348 break;
349 case ENV_VER_CNTR: lUpper += std::max(tools::Long(0), aPaperSize.Width() - nPageH) / 2;
350 break;
351 case ENV_VER_RGHT: break;
352 }
353 SvxLRSpaceItem aLRMargin( RES_LR_SPACE );
354 SvxULSpaceItem aULMargin( RES_UL_SPACE );
355 aLRMargin.SetLeft (o3tl::narrowing<sal_uInt16>(lLeft) );
356 aULMargin.SetUpper(o3tl::narrowing<sal_uInt16>(lUpper));
357 aLRMargin.SetRight(0);
358 aULMargin.SetLower(0);
359 rFormat.SetFormatAttr(aLRMargin);
360 rFormat.SetFormatAttr(aULMargin);
361
362 // Header and footer
363 rFormat.SetFormatAttr(SwFormatHeader(false));
364 pDesc->ChgHeaderShare(false);
365 rFormat.SetFormatAttr(SwFormatFooter(false));
366 pDesc->ChgFooterShare(false);
367
368 // Page numbering
369 pDesc->SetUseOn(UseOnPage::All);
370
371 // Page size
373 nPageW + lLeft, nPageH + lUpper));
374
375 // Set type of page numbering
376 SvxNumberType aType;
378 pDesc->SetNumType(aType);
379
380 // Followup template
381 if (pFollow)
382 pDesc->SetFollow(pFollow);
383
384 // Landscape
385 pDesc->SetLandscape( rItem.m_eAlign >= ENV_VER_LEFT &&
386 rItem.m_eAlign <= ENV_VER_RGHT);
387
388 // Apply page description
389
390 size_t nPos;
391 pSh->FindPageDescByName( pDesc->GetName(),
392 false,
393 &nPos );
394
395 pSh->ChgPageDesc( nPos, *pDesc);
396 pSh->ChgCurPageDesc(*pDesc);
397
398 // Insert Frame
399 SwFlyFrameAttrMgr aMgr(false, pSh, Frmmgr_Type::ENVELP, nullptr);
400 SwFieldMgr aFieldMgr;
402
403 // Overwrite defaults!
404 aMgr.GetAttrSet().Put( SvxBoxItem(RES_BOX) );
405 aMgr.SetULSpace( 0, 0 );
406 aMgr.SetLRSpace( 0, 0 );
407
408 // Sender
409 if (rItem.m_bSend)
410 {
411 pSh->SttEndDoc(true);
412 aMgr.InsertFlyFrame(RndStdIds::FLY_AT_PAGE,
413 Point(rItem.m_nSendFromLeft + lLeft, rItem.m_nSendFromTop + lUpper),
414 Size (rItem.m_nAddrFromLeft - rItem.m_nSendFromLeft, 0));
415
416 pSh->EnterSelFrameMode();
417 pSh->SetFlyName(sSendMark);
418 pSh->UnSelectFrame();
419 pSh->LeaveSelFrameMode();
420 pSh->SetTextFormatColl( pSend );
421 InsertLabEnvText( *pSh, aFieldMgr, rItem.m_aSendText );
422 aMgr.UpdateAttrMgr();
423 }
424
425 // Addressee
426 pSh->SttEndDoc(true);
427
428 aMgr.InsertFlyFrame(RndStdIds::FLY_AT_PAGE,
429 Point(rItem.m_nAddrFromLeft + lLeft, rItem.m_nAddrFromTop + lUpper),
430 Size (nPageW - rItem.m_nAddrFromLeft - 566, 0));
431 pSh->EnterSelFrameMode();
432 pSh->SetFlyName(sAddrMark);
433 pSh->UnSelectFrame();
434 pSh->LeaveSelFrameMode();
435 pSh->SetTextFormatColl( pAddr );
436 InsertLabEnvText(*pSh, aFieldMgr, rItem.m_aAddrText);
437
438 // Move Flys to the "old" pages
439 if (!aFlyArr.empty())
440 pSh->SetPageObjsNewPage(aFlyArr);
441
442 // Finished
443 pSh->SttEndDoc(true);
444
445 pSh->EndAllAction();
446
447 if (nMode == ENV_NEWDOC)
448 pSh->DoUndo();
449 else
451
452 if (nMode == ENV_NEWDOC)
453 {
454 pFrame->GetFrame().Appear();
455
456 if ( rItem.m_aAddrText.indexOf('<') >= 0 )
457 {
458 static sal_uInt16 const aInva[] =
459 {
460 SID_SBA_BRW_UPDATE,
461 SID_SBA_BRW_INSERT,
462 SID_SBA_BRW_MERGE,
463 0
464 };
465 pFrame->GetBindings().Invalidate( aInva );
466
467 // Open database beamer
468 ShowDBObj(*pNewView, pSh->GetDBData());
469 }
470 }
471
472 if ( !pItem )
473 {
474 rReq.AppendItem( rItem );
475 if ( nMode == ENV_NEWDOC )
476 rReq.AppendItem( SfxBoolItem( FN_PARAM_1, true ) );
477 }
478
479 rReq.Done();
480 }
481 else // Abort
482 {
483 rReq.Ignore();
484
485 xDocSh->DoClose();
486 --nTitleNo;
487
488 // Set pointer to top view
489 if (pOldSh)
490 SetView(&pOldSh->GetView());
491 }
492}
493
494/* 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 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
Definition: crsrsh.hxx:909
bool SttEndDoc(bool bStt)
Definition: crsrsh.cxx:573
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:284
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:2189
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:291
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:2241
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:72
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:62
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:368
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:59
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:347
const IDocumentDeviceAccess & getIDocumentDeviceAccess() const
Provides access to the document device interface.
Definition: viewsh.cxx:2805
const SfxItemPool & GetAttrPool() const
Definition: viewsh.hxx:624
Definition: view.hxx:146
SwWrtShell * GetWrtShellPtr() const
Definition: view.hxx:417
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
bool EndPg(bool bSelect=false)
Definition: move.cxx:350
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
Definition: select.cxx:702
bool Right(SwCursorSkipMode nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual=false)
Definition: move.cxx:127
void LeaveSelFrameMode()
Definition: select.cxx:720
bool DelLeft()
Definition: delete.cxx:134
bool GotoFly(const OUString &rName, FlyCntType eType=FLYCNTTYPE_ALL, bool bSelFrame=true)
Definition: move.cxx:599
void Insert(const OUString &)
Definition: wrtsh1.cxx:224
void EnterStdMode()
Definition: select.cxx:551
bool SttNxtPg(bool bSelect=false)
Definition: move.cxx:320
void SplitNode(bool bAutoFormat=false)
Definition: wrtsh1.cxx:1297
bool DelRight(bool isReplaceHeuristic=false)
Definition: delete.cxx:291
void InsertPageBreak(const OUString *pPageDesc=nullptr, const ::std::optional< sal_uInt16 > &rPgNum=std::nullopt)
Definition: wrtsh1.cxx:921
void UnSelectFrame()
Definition: select.cxx:323
const SwView & GetView() const
Definition: wrtsh.hxx:438
#define FN_ENVELOP
Definition: cmdid.h:765
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< SvxULSpaceItem > RES_UL_SPACE(92)
constexpr TypedWhichId< SvxBoxItem > RES_BOX(106)
constexpr TypedWhichId< SvxPaperBinItem > RES_PAPER_BIN(90)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
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:165
@ UI_INSERT_ENVELOPE
unsigned char sal_uInt8