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