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