LibreOffice Module sw (master)  1
uitool.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 <osl/diagnose.h>
23 #include <tools/datetime.hxx>
24 #include <vcl/weld.hxx>
26 #include <svl/stritem.hxx>
27 #include <svl/grabbagitem.hxx>
28 #include <unotools/syslocale.hxx>
30 #include <editeng/pmdlitem.hxx>
31 #include <editeng/tstpitem.hxx>
32 #include <editeng/boxitem.hxx>
33 #include <editeng/sizeitem.hxx>
34 #include <editeng/brushitem.hxx>
35 #include <svx/pageitem.hxx>
36 #include <editeng/lrspitem.hxx>
37 #include <svl/style.hxx>
39 #include <com/sun/star/frame/XDispatch.hpp>
40 #include <com/sun/star/frame/XDispatchProvider.hpp>
41 #include <com/sun/star/frame/XFrame.hpp>
42 #include <com/sun/star/util/URLTransformer.hpp>
43 #include <com/sun/star/util/XURLTransformer.hpp>
45 #include <sfx2/viewfrm.hxx>
46 #include <fmtornt.hxx>
47 #include <tabcol.hxx>
48 #include <fmtfsize.hxx>
49 #include <fmthdft.hxx>
50 #include <fmtpdsc.hxx>
51 #include <uiitems.hxx>
52 #include <docsh.hxx>
53 #include <wrtsh.hxx>
54 #include <swmodule.hxx>
55 #include <view.hxx>
56 #include <uitool.hxx>
57 #include <frmatr.hxx>
58 #include <paratr.hxx>
59 #include <fmtcol.hxx>
60 #include <usrpref.hxx>
61 
62 #include <cmdid.h>
63 #include <doc.hxx>
64 #include <docary.hxx>
65 #include <charfmt.hxx>
66 #include <SwStyleNameMapper.hxx>
67 #include <strings.hrc>
68 // 50 cm 28350
69 
70 #define MAXHEIGHT 28350
71 #define MAXWIDTH 28350
72 
73 using namespace ::com::sun::star;
74 
75 // General list of string pointer
76 
77 // Set boxinfo attribute
78 
79 void PrepareBoxInfo(SfxItemSet& rSet, const SwWrtShell& rSh)
80 {
81  std::shared_ptr<SvxBoxInfoItem> aBoxInfo(std::make_shared<SvxBoxInfoItem>(SID_ATTR_BORDER_INNER));
82  const SfxPoolItem *pBoxInfo;
83 
84  if ( SfxItemState::SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, true, &pBoxInfo))
85  {
86  aBoxInfo.reset(static_cast<SvxBoxInfoItem*>(pBoxInfo->Clone()));
87  }
88 
89  // Table variant: If more than one table cells are selected
90  rSh.GetCursor(); //So that GetCursorCnt() returns the right thing
91  aBoxInfo->SetTable (rSh.IsTableMode() && rSh.GetCursorCnt() > 1);
92  // Always show the distance field
93  aBoxInfo->SetDist (true);
94  // Set minimal size in tables and paragraphs
95  aBoxInfo->SetMinDist (rSh.IsTableMode() || rSh.GetSelectionType() & (SelectionType::Text | SelectionType::Table));
96  // Set always the default distance
97  aBoxInfo->SetDefDist (MIN_BORDER_DIST);
98  // Single lines can have only in tables DontCare-Status
99  aBoxInfo->SetValid(SvxBoxInfoItemValidFlags::DISABLE, !rSh.IsTableMode());
100 
101  rSet.Put(*aBoxInfo);
102 }
103 
105 {
106  // Background / highlight
107  {
108  // Always use the visible background
109  const SfxPoolItem *pTmpBrush;
110  if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_HIGHLIGHT, true, &pTmpBrush ) )
111  {
112  SvxBrushItem aTmpBrush( *static_cast<const SvxBrushItem*>(pTmpBrush) );
113  if( aTmpBrush.GetColor() != COL_TRANSPARENT )
114  {
115  aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND );
116  rSet.Put( aTmpBrush );
117  }
118  }
119  }
120 
121  // Tell dialogs to use character-specific slots/whichIds
122  // tdf#126684: We use RES_PARATR_GRABBAG, because RES_CHRATR_GRABBAG may be overwritten later in
123  // SwDocStyleSheet::GetItemSet when applying attributes from char format
124  assert(SfxItemState::SET != rSet.GetItemState(RES_PARATR_GRABBAG, false));
126  aGrabBag.GetGrabBag()["DialogUseCharAttr"] <<= true;
127  // Store initial ranges to allow restoring later
128  const sal_uInt16* pRanges = rSet.GetRanges();
129  const sal_uInt16* pEnd = pRanges;
130  while (*pEnd)
131  ++pEnd;
132  const uno::Sequence<sal_uInt16> aOrigRanges(pRanges, pEnd - pRanges + 1);
133  aGrabBag.GetGrabBag()["OrigItemSetRanges"] <<= aOrigRanges;
135  rSet.Put(aGrabBag);
136 }
137 
138 void ConvertAttrGenToChar(SfxItemSet& rSet, const SfxItemSet& rOrigSet)
139 {
140  // Background / highlighting
141  const SfxPoolItem *pTmpItem;
142  if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_BACKGROUND, false, &pTmpItem ) )
143  {
144  // Highlight is an MS specific thing, so remove it at the first time when LO modifies
145  // this part of the imported document.
147 
148  // Remove shading marker
149  if (SfxItemState::SET == rOrigSet.GetItemState(RES_CHRATR_GRABBAG, false, &pTmpItem))
150  {
151  SfxGrabBagItem aGrabBag(*static_cast<const SfxGrabBagItem*>(pTmpItem));
152  std::map<OUString, css::uno::Any>& rMap = aGrabBag.GetGrabBag();
153  auto aIterator = rMap.find("CharShadingMarker");
154  if( aIterator != rMap.end() )
155  {
156  aIterator->second <<= false;
157  }
158  rSet.Put( aGrabBag );
159  }
160  }
161  rSet.ClearItem( RES_BACKGROUND );
162 
163  if (SfxItemState::SET == rOrigSet.GetItemState(RES_PARATR_GRABBAG, false, &pTmpItem))
164  {
165  SfxGrabBagItem aGrabBag(*static_cast<const SfxGrabBagItem*>(pTmpItem));
166  std::map<OUString, css::uno::Any>& rMap = aGrabBag.GetGrabBag();
167  auto aIterator = rMap.find("OrigItemSetRanges");
168  if (aIterator != rMap.end())
169  {
170  if (uno::Sequence<sal_uInt16> aOrigRanges; (aIterator->second >>= aOrigRanges)
171  && aOrigRanges.getLength() % 2 == 1
172  && *(std::cend(aOrigRanges) - 1) == 0)
173  rSet.SetRanges(aOrigRanges.getConstArray());
174  }
175  }
176  assert(SfxItemState::SET != rSet.GetItemState(RES_PARATR_GRABBAG, false));
177 }
178 
179 void ApplyCharBackground(const Color& rBackgroundColor, SwWrtShell& rShell)
180 {
182 
183  SfxItemSet aCoreSet(rShell.GetView().GetPool(), svl::Items<
184  RES_CHRATR_GRABBAG, RES_CHRATR_GRABBAG>{});
185 
186  rShell.GetCurAttr(aCoreSet);
187 
188  // Set char background
189  rShell.SetAttrItem(SvxBrushItem(rBackgroundColor, RES_CHRATR_BACKGROUND));
190 
191  // Highlight is an MS specific thing, so remove it at the first time when LO modifies
192  // this part of the imported document.
194 
195  // Remove shading marker
196  const SfxPoolItem *pTmpItem;
197  if (SfxItemState::SET == aCoreSet.GetItemState(RES_CHRATR_GRABBAG, false, &pTmpItem))
198  {
199  SfxGrabBagItem aGrabBag(*static_cast<const SfxGrabBagItem*>(pTmpItem));
200  std::map<OUString, css::uno::Any>& rMap = aGrabBag.GetGrabBag();
201  auto aIterator = rMap.find("CharShadingMarker");
202  if (aIterator != rMap.end())
203  {
204  aIterator->second <<= false;
205  }
206  rShell.SetAttrItem(aGrabBag);
207  }
208 
209  rShell.EndUndo(SwUndoId::INSATTR);
210 }
211 
212 // Fill header footer
213 
214 static void FillHdFt(SwFrameFormat* pFormat, const SfxItemSet& rSet)
215 {
216  SwAttrSet aSet(pFormat->GetAttrSet());
217  aSet.Put(rSet);
218 
219  const SvxSizeItem& rSize = rSet.Get(SID_ATTR_PAGE_SIZE);
220  const SfxBoolItem& rDynamic = rSet.Get(SID_ATTR_PAGE_DYNAMIC);
221 
222  // Convert size
224  rSize.GetSize().Width(),
225  rSize.GetSize().Height());
226  aSet.Put(aFrameSize);
227  pFormat->SetFormatAttr(aSet);
228 }
229 
232 {
233  SvxPageUsage nRet = SvxPageUsage::NONE;
234  if (nUse & UseOnPage::Left)
235  nRet = SvxPageUsage::Left;
236  if (nUse & UseOnPage::Right)
237  nRet = SvxPageUsage::Right;
238  if ((nUse & UseOnPage::All) == UseOnPage::All)
239  nRet = SvxPageUsage::All;
240  if ((nUse & UseOnPage::Mirror) == UseOnPage::Mirror)
241  nRet = SvxPageUsage::Mirror;
242  return nRet;
243 }
244 
247 {
248  UseOnPage nRet = UseOnPage::NONE;
249  if (nUse == SvxPageUsage::Left)
250  nRet = UseOnPage::Left;
251  else if (nUse == SvxPageUsage::Right)
252  nRet = UseOnPage::Right;
253  else if (nUse == SvxPageUsage::All)
254  nRet = UseOnPage::All;
255  else if (nUse == SvxPageUsage::Mirror)
256  nRet = UseOnPage::Mirror;
257  return nRet;
258 }
259 
260 // PageDesc <-> convert into sets and back
261 
262 void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
263 {
264  SwFrameFormat& rMaster = rPageDesc.GetMaster();
265  bool bFirstShare = false;
266 
267  // Transfer all general frame attributes
268  rMaster.SetFormatAttr(rSet);
269 
270  // PageData
271  if(rSet.GetItemState(SID_ATTR_PAGE) == SfxItemState::SET)
272  {
273  const SvxPageItem& rPageItem = rSet.Get(SID_ATTR_PAGE);
274 
275  const SvxPageUsage nUse = rPageItem.GetPageUsage();
276  if(nUse != SvxPageUsage::NONE)
277  rPageDesc.SetUseOn( lcl_convertUseFromSvx(nUse) );
278  rPageDesc.SetLandscape(rPageItem.IsLandscape());
279  SvxNumberType aNumType;
280  aNumType.SetNumberingType( rPageItem.GetNumType() );
281  rPageDesc.SetNumType(aNumType);
282  }
283  // Size
284  if(rSet.GetItemState(SID_ATTR_PAGE_SIZE) == SfxItemState::SET)
285  {
286  const SvxSizeItem& rSizeItem = rSet.Get(SID_ATTR_PAGE_SIZE);
288  aSize.SetSize(rSizeItem.GetSize());
289  rMaster.SetFormatAttr(aSize);
290  }
291  // Evaluate header attributes
292  const SfxPoolItem* pItem;
293  if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PAGE_HEADERSET,
294  false, &pItem ) )
295  {
296  const SfxItemSet& rHeaderSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
297  const SfxBoolItem& rHeaderOn = rHeaderSet.Get(SID_ATTR_PAGE_ON);
298 
299  if(rHeaderOn.GetValue())
300  {
301  // Take over values
302  if(!rMaster.GetHeader().IsActive())
303  rMaster.SetFormatAttr(SwFormatHeader(true));
304 
305  // Pick out everything and adapt the header format
306  SwFormatHeader aHeaderFormat(rMaster.GetHeader());
307  SwFrameFormat *pHeaderFormat = aHeaderFormat.GetHeaderFormat();
308  OSL_ENSURE(pHeaderFormat != nullptr, "no header format");
309 
310  ::FillHdFt(pHeaderFormat, rHeaderSet);
311 
312  rPageDesc.ChgHeaderShare(rHeaderSet.Get(SID_ATTR_PAGE_SHARED).GetValue());
313  rPageDesc.ChgFirstShare(static_cast<const SfxBoolItem&>(
314  rHeaderSet.Get(SID_ATTR_PAGE_SHARED_FIRST)).GetValue());
315  bFirstShare = true;
316  }
317  else
318  {
319  // Disable header
320  if(rMaster.GetHeader().IsActive())
321  {
322  rMaster.SetFormatAttr(SwFormatHeader(false));
323  rPageDesc.ChgHeaderShare(false);
324  }
325  }
326  }
327 
328  // Evaluate footer attributes
329  if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PAGE_FOOTERSET,
330  false, &pItem ) )
331  {
332  const SfxItemSet& rFooterSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
333  const SfxBoolItem& rFooterOn = rFooterSet.Get(SID_ATTR_PAGE_ON);
334 
335  if(rFooterOn.GetValue())
336  {
337  // Take over values
338  if(!rMaster.GetFooter().IsActive())
339  rMaster.SetFormatAttr(SwFormatFooter(true));
340 
341  // Pick out everything and adapt the footer format
342  SwFormatFooter aFooterFormat(rMaster.GetFooter());
343  SwFrameFormat *pFooterFormat = aFooterFormat.GetFooterFormat();
344  OSL_ENSURE(pFooterFormat != nullptr, "no footer format");
345 
346  ::FillHdFt(pFooterFormat, rFooterSet);
347 
348  rPageDesc.ChgFooterShare(rFooterSet.Get(SID_ATTR_PAGE_SHARED).GetValue());
349  if (!bFirstShare)
350  {
351  rPageDesc.ChgFirstShare(static_cast<const SfxBoolItem&>(
352  rFooterSet.Get(SID_ATTR_PAGE_SHARED_FIRST)).GetValue());
353  }
354  }
355  else
356  {
357  // Disable footer
358  if(rMaster.GetFooter().IsActive())
359  {
360  rMaster.SetFormatAttr(SwFormatFooter(false));
361  rPageDesc.ChgFooterShare(false);
362  }
363  }
364  }
365 
366  // Footnotes
367 
368  if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_FTN_INFO,
369  false, &pItem ) )
370  rPageDesc.SetFootnoteInfo( static_cast<const SwPageFootnoteInfoItem*>(pItem)->GetPageFootnoteInfo() );
371 
372  // Columns
373 
374  // Register compliant
375 
376  if(SfxItemState::SET != rSet.GetItemState(
377  SID_SWREGISTER_MODE, false, &pItem))
378  return;
379 
380  bool bSet = static_cast<const SfxBoolItem*>(pItem)->GetValue();
381  if(!bSet)
382  rPageDesc.SetRegisterFormatColl(nullptr);
383  else if(SfxItemState::SET == rSet.GetItemState(
384  SID_SWREGISTER_COLLECTION, false, &pItem))
385  {
386  const OUString& rColl = static_cast<const SfxStringItem*>(pItem)->GetValue();
387  SwDoc& rDoc = *rMaster.GetDoc();
388  SwTextFormatColl* pColl = rDoc.FindTextFormatCollByName( rColl );
389  if( !pColl )
390  {
391  const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(
393  if( USHRT_MAX != nId )
394  pColl = rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool( nId );
395  else
396  pColl = rDoc.MakeTextFormatColl( rColl,
397  rDoc.GetDfltTextFormatColl() );
398  }
399  if( pColl )
400  pColl->SetFormatAttr( SwRegisterItem ( true ));
401  rPageDesc.SetRegisterFormatColl( pColl );
402  }
403 }
404 
405 void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
406 {
407  const SwFrameFormat& rMaster = rPageDesc.GetMaster();
408 
409  // Page data
410  SvxPageItem aPageItem(SID_ATTR_PAGE);
411  aPageItem.SetDescName(rPageDesc.GetName());
412  aPageItem.SetPageUsage(lcl_convertUseToSvx(rPageDesc.GetUseOn()));
413  aPageItem.SetLandscape(rPageDesc.GetLandscape());
414  aPageItem.SetNumType(rPageDesc.GetNumType().GetNumberingType());
415  rSet.Put(aPageItem);
416 
417  // Size
418  SvxSizeItem aSizeItem(SID_ATTR_PAGE_SIZE, rMaster.GetFrameSize().GetSize());
419  rSet.Put(aSizeItem);
420 
421  // Maximum size
422  SvxSizeItem aMaxSizeItem(SID_ATTR_PAGE_MAXSIZE, Size(MAXWIDTH, MAXHEIGHT));
423  rSet.Put(aMaxSizeItem);
424 
425  // Margins, border and the other stuff.
426  rSet.Put(rMaster.GetAttrSet());
427 
428  std::shared_ptr<SvxBoxInfoItem> aBoxInfo(std::make_shared<SvxBoxInfoItem>(SID_ATTR_BORDER_INNER));
429  const SfxPoolItem *pBoxInfo;
430 
431  if ( SfxItemState::SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, true, &pBoxInfo) )
432  {
433  aBoxInfo.reset(static_cast<SvxBoxInfoItem*>(pBoxInfo->Clone()));
434  }
435 
436  aBoxInfo->SetTable( false );
437  // Show always the distance field
438  aBoxInfo->SetDist( true);
439  // Set minimal size in tables and paragraphs
440  aBoxInfo->SetMinDist( false );
441  // Set always the default distance
442  aBoxInfo->SetDefDist( MIN_BORDER_DIST );
443  // Single lines can have only in tables DontCare-Status
444  aBoxInfo->SetValid( SvxBoxInfoItemValidFlags::DISABLE );
445  rSet.Put( *aBoxInfo );
446 
447  SfxStringItem aFollow(SID_ATTR_PAGE_EXT1, OUString());
448  if(rPageDesc.GetFollow())
449  aFollow.SetValue(rPageDesc.GetFollow()->GetName());
450  rSet.Put(aFollow);
451 
452  // Header
453  if(rMaster.GetHeader().IsActive())
454  {
455  const SwFormatHeader &rHeaderFormat = rMaster.GetHeader();
456  const SwFrameFormat *pHeaderFormat = rHeaderFormat.GetHeaderFormat();
457  OSL_ENSURE(pHeaderFormat != nullptr, "no header format");
458 
459  // HeaderInfo, margins, background, border
460  SfxItemSet aHeaderSet(*rSet.GetPool(),
462 
463  // FillAttribute support
465 
466  SID_ATTR_BORDER_INNER,SID_ATTR_BORDER_INNER, // [10023
467  SID_ATTR_PAGE_SIZE,SID_ATTR_PAGE_SIZE, // [10051
468  SID_ATTR_PAGE_ON,SID_ATTR_PAGE_SHARED, // [10060
469  SID_ATTR_PAGE_SHARED_FIRST,SID_ATTR_PAGE_SHARED_FIRST>{});
470 
471  // set correct parent to get the XFILL_NONE FillStyle as needed
472  aHeaderSet.SetParent(&rMaster.GetDoc()->GetDfltFrameFormat()->GetAttrSet());
473 
474  // Dynamic or fixed height
475  SfxBoolItem aOn(SID_ATTR_PAGE_ON, true);
476  aHeaderSet.Put(aOn);
477 
478  const SwFormatFrameSize &rFrameSize = pHeaderFormat->GetFrameSize();
479  const SwFrameSize eSizeType = rFrameSize.GetHeightSizeType();
480  SfxBoolItem aDynamic(SID_ATTR_PAGE_DYNAMIC, eSizeType != SwFrameSize::Fixed);
481  aHeaderSet.Put(aDynamic);
482 
483  // Left equal right
484  SfxBoolItem aShared(SID_ATTR_PAGE_SHARED, rPageDesc.IsHeaderShared());
485  aHeaderSet.Put(aShared);
486  SfxBoolItem aFirstShared(SID_ATTR_PAGE_SHARED_FIRST, rPageDesc.IsFirstShared());
487  aHeaderSet.Put(aFirstShared);
488 
489  // Size
490  SvxSizeItem aSize(SID_ATTR_PAGE_SIZE, rFrameSize.GetSize());
491  aHeaderSet.Put(aSize);
492 
493  // Shifting frame attributes
494  aHeaderSet.Put(pHeaderFormat->GetAttrSet());
495  aHeaderSet.Put( *aBoxInfo );
496 
497  // Create SetItem
498  SvxSetItem aSetItem(SID_ATTR_PAGE_HEADERSET, aHeaderSet);
499  rSet.Put(aSetItem);
500  }
501 
502  // Footer
503  if(rMaster.GetFooter().IsActive())
504  {
505  const SwFormatFooter &rFooterFormat = rMaster.GetFooter();
506  const SwFrameFormat *pFooterFormat = rFooterFormat.GetFooterFormat();
507  OSL_ENSURE(pFooterFormat != nullptr, "no footer format");
508 
509  // FooterInfo, margins, background, border
510  SfxItemSet aFooterSet(*rSet.GetPool(),
512 
513  // FillAttribute support
515 
516  SID_ATTR_BORDER_INNER,SID_ATTR_BORDER_INNER, // [10023
517  SID_ATTR_PAGE_SIZE,SID_ATTR_PAGE_SIZE, // [10051
518  SID_ATTR_PAGE_ON,SID_ATTR_PAGE_SHARED, // [10060
519  SID_ATTR_PAGE_SHARED_FIRST,SID_ATTR_PAGE_SHARED_FIRST>{});
520 
521  // set correct parent to get the XFILL_NONE FillStyle as needed
522  aFooterSet.SetParent(&rMaster.GetDoc()->GetDfltFrameFormat()->GetAttrSet());
523 
524  // Dynamic or fixed height
525  SfxBoolItem aOn(SID_ATTR_PAGE_ON, true);
526  aFooterSet.Put(aOn);
527 
528  const SwFormatFrameSize &rFrameSize = pFooterFormat->GetFrameSize();
529  const SwFrameSize eSizeType = rFrameSize.GetHeightSizeType();
530  SfxBoolItem aDynamic(SID_ATTR_PAGE_DYNAMIC, eSizeType != SwFrameSize::Fixed);
531  aFooterSet.Put(aDynamic);
532 
533  // Left equal right
534  SfxBoolItem aShared(SID_ATTR_PAGE_SHARED, rPageDesc.IsFooterShared());
535  aFooterSet.Put(aShared);
536  SfxBoolItem aFirstShared(SID_ATTR_PAGE_SHARED_FIRST, rPageDesc.IsFirstShared());
537  aFooterSet.Put(aFirstShared);
538 
539  // Size
540  SvxSizeItem aSize(SID_ATTR_PAGE_SIZE, rFrameSize.GetSize());
541  aFooterSet.Put(aSize);
542 
543  // Shifting Frame attributes
544  aFooterSet.Put(pFooterFormat->GetAttrSet());
545  aFooterSet.Put( *aBoxInfo );
546 
547  // Create SetItem
548  SvxSetItem aSetItem(SID_ATTR_PAGE_FOOTERSET, aFooterSet);
549  rSet.Put(aSetItem);
550  }
551 
552  // Integrate footnotes
553  SwPageFootnoteInfo& rInfo = const_cast<SwPageFootnoteInfo&>(rPageDesc.GetFootnoteInfo());
554  SwPageFootnoteInfoItem aFootnoteItem(rInfo);
555  rSet.Put(aFootnoteItem);
556 
557  // Register compliant
558  const SwTextFormatColl* pCol = rPageDesc.GetRegisterFormatColl();
559  SwRegisterItem aReg(pCol != nullptr);
560  aReg.SetWhich(SID_SWREGISTER_MODE);
561  rSet.Put(aReg);
562  if(pCol)
563  rSet.Put(SfxStringItem(SID_SWREGISTER_COLLECTION, pCol->GetName()));
564 
565 }
566 
567 // Set DefaultTabs
568 
569 void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem& rTabs)
570 {
571  if( rTabs.Count() )
572  return;
573  {
574  SvxTabStop aSwTabStop( nDefDist, SvxTabAdjust::Default );
575  rTabs.Insert( aSwTabStop );
576  }
577 }
578 
579 // Distance between two tabs
580 
582 {
583  return rTabs.Count() ? rTabs[0].GetTabPos() : 1134; // 1134 = 2 cm
584 }
585 
586 // Inquire if in the set is a Sfx-PageDesc combination present and return it.
587 void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet )
588 {
589  const SfxPoolItem* pItem;
590  SwFormatPageDesc aPgDesc;
591 
592  bool bChanged = false;
593  // Page number
594  switch (rSet.GetItemState(SID_ATTR_PARA_PAGENUM, false, &pItem))
595  {
596  case SfxItemState::SET:
597  {
598  aPgDesc.SetNumOffset(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
599  bChanged = true;
600  break;
601  }
602  case SfxItemState::DISABLED:
603  {
604  bChanged = true; // default initialised aPgDesc clears the number
605  break;
606  }
607  case SfxItemState::UNKNOWN:
608  case SfxItemState::DEFAULT:
609  break;
610  default:
611  assert(false); // unexpected
612  break;
613  }
614  if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PARA_MODEL, false, &pItem ))
615  {
616  const OUString& rDescName = static_cast<const SvxPageModelItem*>(pItem)->GetValue();
617  if( !rDescName.isEmpty() ) // No name -> disable PageDesc!
618  {
619  // Delete only, if PageDesc will be enabled!
620  rSet.ClearItem( RES_BREAK );
621  SwPageDesc* pDesc = const_cast<SwWrtShell&>(rShell).FindPageDescByName(
622  rDescName, true );
623  if( pDesc )
624  aPgDesc.RegisterToPageDesc( *pDesc );
625  }
626  rSet.ClearItem( SID_ATTR_PARA_MODEL );
627  bChanged = true;
628  }
629  else
630  {
632  rShell.GetCurAttr( aCoreSet );
633  if(SfxItemState::SET == aCoreSet.GetItemState( RES_PAGEDESC, true, &pItem ) )
634  {
635  if( static_cast<const SwFormatPageDesc*>(pItem)->GetPageDesc() )
636  {
637  aPgDesc.RegisterToPageDesc( *const_cast<SwFormatPageDesc*>(static_cast<const SwFormatPageDesc*>(pItem))->GetPageDesc() );
638  }
639  }
640  }
641 
642  if(bChanged)
643  rSet.Put( aPgDesc );
644 }
645 
646 // Inquire if in the set is a Sfx-PageDesc combination present and return it.
648 {
649  const SfxPoolItem* pItem = nullptr;
650  OUString aName;
651  ::std::optional<sal_uInt16> oNumOffset;
652  bool bPut = true;
653  switch( rCoreSet.GetItemState( RES_PAGEDESC, true, &pItem ) )
654  {
655  case SfxItemState::SET:
656  {
657  if( static_cast<const SwFormatPageDesc*>(pItem)->GetPageDesc() )
658  {
659  aName = static_cast<const SwFormatPageDesc*>(pItem)->GetPageDesc()->GetName();
660  oNumOffset = static_cast<const SwFormatPageDesc*>(pItem)->GetNumOffset();
661  }
662  rCoreSet.ClearItem( RES_PAGEDESC );
663  // Page number
664  }
665  break;
666 
667  case SfxItemState::DEFAULT:
668  break;
669 
670  default:
671  bPut = false;
672  }
673 
674  if (oNumOffset)
675  {
676  SfxUInt16Item aPageNum( SID_ATTR_PARA_PAGENUM, *oNumOffset );
677  rCoreSet.Put( aPageNum );
678  }
679 
680  if(bPut)
681  rCoreSet.Put( SvxPageModelItem( aName, true, SID_ATTR_PARA_MODEL ) );
682 }
683 
684 // Determine metric
685 
687 {
688  return SW_MOD()->GetUsrPref(bWeb)->GetMetric();
689 }
690 
691 // Determine metric
692 
693 void SetDfltMetric( FieldUnit eMetric, bool bWeb )
694 {
695  SW_MOD()->ApplyUserMetric(eMetric, bWeb);
696 }
697 
698 void InsertStringSorted(const OUString& rId, const OUString& rEntry, weld::ComboBox& rToFill, int nOffset)
699 {
700  CollatorWrapper& rCaseColl = ::GetAppCaseCollator();
701  const int nCount = rToFill.get_count();
702  while (nOffset < nCount)
703  {
704  if (0 < rCaseColl.compareString(rToFill.get_text(nOffset), rEntry))
705  break;
706  ++nOffset;
707  }
708  rToFill.insert(nOffset, rEntry, &rId, nullptr, nullptr);
709 }
710 
711 void FillCharStyleListBox(weld::ComboBox& rToFill, SwDocShell* pDocSh, bool bSorted, bool bWithDefault)
712 {
713  const int nOffset = rToFill.get_count() > 0 ? 1 : 0;
714  rToFill.freeze();
715  SfxStyleSheetBasePool* pPool = pDocSh->GetStyleSheetPool();
716  SwDoc* pDoc = pDocSh->GetDoc();
717  const SfxStyleSheetBase* pBase = pPool->First(SfxStyleFamily::Char);
718  const OUString sStandard(SwResId(STR_POOLCHR_STANDARD));
719  while(pBase)
720  {
721  if(bWithDefault || pBase->GetName() != sStandard)
722  {
724  OUString sId(OUString::number(nPoolId));
725  if (bSorted)
726  InsertStringSorted(sId, pBase->GetName(), rToFill, nOffset);
727  else
728  rToFill.append(sId, pBase->GetName());
729  }
730  pBase = pPool->Next();
731  }
732  // non-pool styles
733  const SwCharFormats* pFormats = pDoc->GetCharFormats();
734  for(size_t i = 0; i < pFormats->size(); ++i)
735  {
736  const SwCharFormat* pFormat = (*pFormats)[i];
737  if(pFormat->IsDefault())
738  continue;
739  const OUString& rName = pFormat->GetName();
740  if (rToFill.find_text(rName) == -1)
741  {
742  OUString sId(OUString::number(USHRT_MAX));
743  if (bSorted)
744  InsertStringSorted(sId, rName, rToFill, nOffset);
745  else
746  rToFill.append(sId, rName);
747  }
748  }
749  rToFill.thaw();
750 };
751 
752 SwTwips GetTableWidth( SwFrameFormat const * pFormat, SwTabCols const & rCols, sal_uInt16 *pPercent,
753  SwWrtShell* pSh )
754 {
755  // To get the width is slightly more complicated.
756  SwTwips nWidth = 0;
757  const sal_Int16 eOri = pFormat->GetHoriOrient().GetHoriOrient();
758  switch(eOri)
759  {
760  case text::HoriOrientation::FULL: nWidth = rCols.GetRight(); break;
761  case text::HoriOrientation::LEFT_AND_WIDTH:
762  case text::HoriOrientation::LEFT:
763  case text::HoriOrientation::RIGHT:
764  case text::HoriOrientation::CENTER:
765  nWidth = pFormat->GetFrameSize().GetWidth();
766  break;
767  default:
768  {
769  if(pSh)
770  {
771  if ( nullptr == pSh->GetFlyFrameFormat() )
772  {
773  nWidth = pSh->GetAnyCurRect(CurRectType::PagePrt).Width();
774  }
775  else
776  {
778  }
779  }
780  else
781  {
782  OSL_FAIL("where to get the actual width from?");
783  }
784  const SvxLRSpaceItem& rLRSpace = pFormat->GetLRSpace();
785  nWidth -= (rLRSpace.GetRight() + rLRSpace.GetLeft());
786  }
787  }
788  if (pPercent)
789  *pPercent = pFormat->GetFrameSize().GetWidthPercent();
790  return nWidth;
791 }
792 
793 OUString GetAppLangDateTimeString( const DateTime& rDT )
794 {
795  const SvtSysLocale aSysLocale;
796  const LocaleDataWrapper& rAppLclData = aSysLocale.GetLocaleData();
797  OUString sRet = rAppLclData.getDate( rDT ) + " " + rAppLclData.getTime( rDT );
798  return sRet;
799 }
800 
801 // Add a new function which can get and set the current "SID_ATTR_APPLYCHARUNIT" value
802 
803 bool HasCharUnit( bool bWeb)
804 {
805  return SW_MOD()->GetUsrPref(bWeb)->IsApplyCharUnit();
806 }
807 
808 void SetApplyCharUnit(bool bApplyChar, bool bWeb)
809 {
810  SW_MOD()->ApplyUserCharUnit(bApplyChar, bWeb);
811 }
812 
813 bool ExecuteMenuCommand( PopupMenu const & rMenu, SfxViewFrame const & rViewFrame, sal_uInt16 nId )
814 {
815  bool bRet = false;
816  const sal_uInt16 nItemCount = rMenu.GetItemCount();
817  OUString sCommand;
818  for( sal_uInt16 nItem = 0; nItem < nItemCount; ++nItem)
819  {
820  PopupMenu* pPopup = rMenu.GetPopupMenu( rMenu.GetItemId( nItem ) );
821  if(pPopup)
822  {
823  sCommand = pPopup->GetItemCommand(nId);
824  if(!sCommand.isEmpty())
825  break;
826  }
827  }
828  if(!sCommand.isEmpty())
829  {
830  uno::Reference< frame::XFrame > xFrame = rViewFrame.GetFrame().GetFrameInterface();
831  uno::Reference < frame::XDispatchProvider > xProv( xFrame, uno::UNO_QUERY );
832  util::URL aURL;
833  aURL.Complete = sCommand;
834  uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create(::comphelper::getProcessComponentContext() ) );
835  xTrans->parseStrict( aURL );
836  uno::Reference< frame::XDispatch > xDisp = xProv->queryDispatch( aURL, OUString(), 0 );
837  if( xDisp.is() )
838  {
839  uno::Sequence< beans::PropertyValue > aSeq;
840  xDisp->dispatch( aURL, aSeq );
841  bRet = true;
842  }
843  }
844  return bRet;
845 }
846 
847 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
long GetLeft() const
bool IsLandscape() const
SwTextFormatColl * MakeTextFormatColl(const OUString &rFormatName, SwTextFormatColl *pDerivedFrom, bool bBroadcast=false)
Create the FormatCollections.
Definition: docfmt.cxx:877
bool GetValue() const
SvxNumType GetNumberingType() const
long Width() const
SfxStyleSheetBase * First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask=SfxStyleSearchBits::All)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(93)
URL aURL
PopupMenu * GetPopupMenu(sal_uInt16 nItemId) const
FieldUnit
bool Insert(const SvxTabStop &rTab)
void SetUseOn(UseOnPage eNew)
Same as WriteUseOn(), but the >= HeaderShare part of the bitfield is not modified.
Definition: pagedesc.hxx:320
Represents the style of a paragraph.
Definition: fmtcol.hxx:55
sal_uInt16 Count() const
#define MAXHEIGHT
Definition: uitool.cxx:70
static void FillHdFt(SwFrameFormat *pFormat, const SfxItemSet &rSet)
Definition: uitool.cxx:214
sal_Int32 compareString(const OUString &s1, const OUString &s2) const
virtual void insert(int pos, const OUString &rStr, const OUString *pId, const OUString *pIconName, VirtualDevice *pImageSurface)=0
void SetPageUsage(SvxPageUsage eU)
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
Definition: fmtpdsc.hxx:35
SwPaM * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
Definition: crsrsh.cxx:189
bool IsDefault() const
Definition: format.hxx:109
const SwFormatHeader & GetHeader(bool=true) const
Definition: fmthdft.hxx:97
void ChgHeaderShare(bool bNew)
Definition: pagedesc.hxx:306
std::string GetValue
long Height() const
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
bool IsTableMode() const
Definition: crsrsh.hxx:643
sal_uInt16 char char * pDesc
long GetWidth() const
const SwRect & GetAnyCurRect(CurRectType eType, const Point *pPt=nullptr, const css::uno::Reference< css::embed::XEmbeddedObject > &=css::uno::Reference< css::embed::XEmbeddedObject >()) const
Definition: fews.cxx:89
SwTextFormatColl * FindTextFormatCollByName(const OUString &rName) const
Definition: doc.hxx:796
virtual OUString get_text(int pos) const =0
Reference< XFrame > xFrame
void SfxToSwPageDescAttr(const SwWrtShell &rShell, SfxItemSet &rSet)
Definition: uitool.cxx:587
void SetLandscape(bool bL)
Definition: doc.hxx:184
virtual int find_text(const OUString &rStr) const =0
sal_Int16 nId
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
Definition: edws.cxx:234
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
long SwTwips
Definition: swtypes.hxx:49
void append(const OUString &rId, const OUString &rStr)
virtual bool SetFormatAttr(const SfxPoolItem &rAttr) override
Override to recognize changes on the and register/unregister the paragragh style at t...
Definition: fmtcol.cxx:329
constexpr TypedWhichId< SfxGrabBagItem > RES_CHRATR_GRABBAG(43)
#define MIN_BORDER_DIST
Definition: swtypes.hxx:74
void PrepareBoxInfo(SfxItemSet &rSet, const SwWrtShell &rSh)
Definition: uitool.cxx:79
UseOnPage GetUseOn() const
Definition: pagedesc.hxx:332
Value in Var-direction gives minimum (can be exceeded but not be less).
virtual int get_count() const =0
long GetRight() const
Definition: tabcol.hxx:78
const OUString & GetName() const
Definition: pagedesc.hxx:187
bool IsActive() const
Definition: fmthdft.hxx:89
virtual void thaw()=0
UseOnPage
Definition: pagedesc.hxx:120
Used by the UI to modify the document model.
Definition: wrtsh.hxx:90
const SwPageFootnoteInfo & GetFootnoteInfo() const
Definition: pagedesc.hxx:196
constexpr::Color COL_TRANSPARENT(0xFF, 0xFF, 0xFF, 0xFF)
const LocaleDataWrapper & GetLocaleData() const
void MergeRange(sal_uInt16 nFrom, sal_uInt16 nTo)
void ConvertAttrGenToChar(SfxItemSet &rSet, const SfxItemSet &rOrigSet)
Convert general attributes to the corresponding character attributes.
Definition: uitool.cxx:138
const SwView & GetView() const
Definition: wrtsh.hxx:428
bool ExecuteMenuCommand(PopupMenu const &rMenu, SfxViewFrame const &rViewFrame, sal_uInt16 nId)
Definition: uitool.cxx:813
SvxNumType GetNumType() const
const OUString & GetName() const
void SetValue(const OUString &rTheValue)
void SetFootnoteInfo(const SwPageFootnoteInfo &rNew)
Definition: pagedesc.hxx:198
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
bool HasCharUnit(bool bWeb)
Definition: uitool.cxx:803
void FillCharStyleListBox(weld::ComboBox &rToFill, SwDocShell *pDocSh, bool bSorted, bool bWithDefault)
Definition: uitool.cxx:711
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
Definition: doc.cxx:425
const SwTextFormatColl * GetDfltTextFormatColl() const
Definition: doc.hxx:773
void SetLandscape(bool bNew)
Definition: pagedesc.hxx:191
const OUString & GetName() const
Definition: format.hxx:111
Footer, for pageformats Client of FrameFormat describing the footer.
Definition: fmthdft.hxx:64
SfxFrame & GetFrame() const
int nCount
#define FN_PARAM_FTN_INFO
Definition: cmdid.h:765
For internal use only.
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
OUString GetItemCommand(sal_uInt16 nItemId) const
void SetNumType(SvxNumType eNum)
constexpr TypedWhichId< SfxGrabBagItem > RES_PARATR_GRABBAG(81)
SfxItemPool & GetPool() const
const Color & GetColor() const
SwDoc * GetDoc()
returns Doc. But be careful!
Definition: docsh.hxx:203
bool IsHeaderShared() const
Definition: pagedesc.hxx:298
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
Style of a layout element.
Definition: frmfmt.hxx:57
Rect of current PrtArea of page.
void SetRanges(const sal_uInt16 *pRanges)
#define SW_MOD()
Definition: swmodule.hxx:255
SwTwips GetTabDist(const SvxTabStopItem &rTabs)
Definition: uitool.cxx:581
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
int i
void SetNumType(const SvxNumberType &rNew)
Definition: pagedesc.hxx:194
const SwFrameFormat * GetFooterFormat() const
Definition: fmthdft.hxx:85
const SwFormatHoriOrient & GetHoriOrient(bool=true) const
Definition: fmtornt.hxx:108
FieldUnit GetDfltMetric(bool bWeb)
Definition: uitool.cxx:686
bool GetLandscape() const
Definition: pagedesc.hxx:190
#define MAXWIDTH
Definition: uitool.cxx:71
void SwToSfxPageDescAttr(SfxItemSet &rCoreSet)
Definition: uitool.cxx:647
void InsertStringSorted(const OUString &rId, const OUString &rEntry, weld::ComboBox &rToFill, int nOffset)
Definition: uitool.cxx:698
void SetApplyCharUnit(bool bApplyChar, bool bWeb)
Definition: uitool.cxx:808
void ChgFirstShare(bool bNew)
Definition: pagedesc.cxx:381
virtual void freeze()=0
void ChgFooterShare(bool bNew)
Definition: pagedesc.hxx:313
void SetAttrItem(const SfxPoolItem &, SetAttrMode nFlags=SetAttrMode::DEFAULT, const bool bParagraphSetting=false)
Definition: edatmisc.cxx:112
sal_uInt16 GetItemId(sal_uInt16 nPos) const
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
Definition: edws.cxx:223
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
Definition: docsh.cxx:1139
const SfxItemSet * GetItemSet(const SfxPoolItem &rAttr)
Returns the item set associated with a character/inet/auto style.
Definition: atrstck.cxx:133
size_t size() const
Definition: docary.hxx:84
const SwFormatFooter & GetFooter(bool=true) const
Definition: fmthdft.hxx:99
const SwTextFormatColl * GetRegisterFormatColl() const
retrieve the style for the grid alignment
Definition: pagedesc.cxx:204
sal_Int16 GetHoriOrient() const
Definition: fmtornt.hxx:87
const std::map< OUString, css::uno::Any > & GetGrabBag() const
void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem &rTabs)
Definition: uitool.cxx:569
static SvxPageUsage lcl_convertUseToSvx(UseOnPage nUse)
Convert from UseOnPage to SvxPageUsage.
Definition: uitool.cxx:231
sal_uInt16 GetCursorCnt(bool bAll=true) const
Get the number of elements in the ring of cursors.
Definition: crsrsh.cxx:2718
SwFrameSize
Definition: fmtfsize.hxx:35
bool IsFooterShared() const
Definition: pagedesc.hxx:302
OUString SwResId(const char *pId)
Definition: swmodule.cxx:165
const SwDoc * GetDoc() const
The document is set in SwAttrPool now, therefore you always can access it.
Definition: format.hxx:119
SwTwips GetTableWidth(SwFrameFormat const *pFormat, SwTabCols const &rCols, sal_uInt16 *pPercent, SwWrtShell *pSh)
Definition: uitool.cxx:752
sal_uInt8 GetWidthPercent() const
Definition: fmtfsize.hxx:91
SfxItemPool * GetPool() const
Frame cannot be moved in Var-direction.
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
SvxPageUsage
const SwPageDesc * GetFollow() const
Definition: pagedesc.hxx:246
const SwFrameFormat * GetDfltFrameFormat() const
Definition: doc.hxx:742
virtual bool SetFormatAttr(const SfxPoolItem &rAttr)
Definition: format.cxx:458
OUString getDate(const Date &rDate) const
constexpr sal_uInt16 RES_FRMATR_END(131)
SvxPageUsage GetPageUsage() const
SwFrameFormat & GetMaster()
Definition: pagedesc.hxx:217
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_BACKGROUND(21)
Footnote information.
Definition: pagedesc.hxx:48
const SwCharFormats * GetCharFormats() const
Definition: doc.hxx:735
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void Width(long nNew)
Definition: swrect.hxx:187
SfxStyleSheetBase * Next()
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:254
void ApplyCharBackground(const Color &rBackgroundColor, SwWrtShell &rShell)
Apply character background on the shell.
Definition: uitool.cxx:179
OUString aName
void SetWhich(sal_uInt16 nId)
virtual SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return "Auto-Collection with ID.
sal_uInt16 GetItemCount() const
static UseOnPage lcl_convertUseFromSvx(SvxPageUsage nUse)
Convert from SvxPageUsage to UseOnPage.
Definition: uitool.cxx:246
void SetSize(const Size &rSize)
Reference< XComponentContext > getProcessComponentContext()
void PageDescToItemSet(const SwPageDesc &rPageDesc, SfxItemSet &rSet)
Definition: uitool.cxx:405
Sequence< sal_Int8 > aSeq
Header, for PageFormats Client of FrameFormat describing the header.
Definition: fmthdft.hxx:33
bool GetCurAttr(SfxItemSet &, const bool bMergeIndentValuesOfNumRule=false) const
Definition: edattr.cxx:176
const SwFormatFrameSize & GetFrameSize(bool=true) const
Definition: fmtfsize.hxx:104
long GetRight() const
OUString sId
const sal_uInt16 * GetRanges() const
const SwFrameFormat * GetFlyFrameFormat() const
Get FlyFrameFormat; for UI macro linkage at Flys.
Definition: fefly1.cxx:1248
void SetDfltMetric(FieldUnit eMetric, bool bWeb)
Definition: uitool.cxx:693
void SetNumOffset(const ::std::optional< sal_uInt16 > &oNum)
Definition: fmtpdsc.hxx:66
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLBACKGROUND)
bool IsFirstShared() const
Definition: pagedesc.cxx:376
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:116
OUString getTime(const tools::Time &rTime, bool bSec=true, bool b100Sec=false) const
void SetNumberingType(SvxNumType nSet)
bool IsActive() const
Definition: fmthdft.hxx:58
SelectionType GetSelectionType() const
Definition: wrtsh1.cxx:1398
void RegisterToPageDesc(SwPageDesc &)
Definition: atrfrm.cxx:699
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_HIGHLIGHT(42)
CollatorWrapper & GetAppCaseCollator()
Definition: init.cxx:752
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
Rect of PrtArea of FlyFrame.
OUString GetAppLangDateTimeString(const DateTime &rDT)
Definition: uitool.cxx:793
const Size & GetSize() const
const SwFrameFormat * GetHeaderFormat() const
Definition: fmthdft.hxx:54
void ConvertAttrCharToGen(SfxItemSet &rSet)
Convert character specific attributes to general ones used by tab pages.
Definition: uitool.cxx:104
SwFrameSize GetHeightSizeType() const
Definition: fmtfsize.hxx:80
void SetDescName(const OUString &rStr)
void SetRegisterFormatColl(const SwTextFormatColl *rFormat)
set the style for the grid alignment
Definition: pagedesc.cxx:192
const SvxLRSpaceItem & GetLRSpace(bool=true) const
Definition: frmatr.hxx:74
void ItemSetToPageDesc(const SfxItemSet &rSet, SwPageDesc &rPageDesc)
Definition: uitool.cxx:262
const SvxNumberType & GetNumType() const
Definition: pagedesc.hxx:193