LibreOffice Module sw (master)  1
expfld.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 <sal/config.h>
21 
22 #include <limits>
23 
24 #include <UndoTable.hxx>
25 #include <hintids.hxx>
26 #include <o3tl/any.hxx>
27 #include <osl/diagnose.h>
29 #include <unotools/charclass.hxx>
30 #include <editeng/langitem.hxx>
31 #include <editeng/fontitem.hxx>
32 #include <com/sun/star/text/SetVariableType.hpp>
33 #include <unofield.hxx>
34 #include <frmfmt.hxx>
35 #include <fmtfld.hxx>
36 #include <txtfld.hxx>
37 #include <fmtanchr.hxx>
38 #include <txtftn.hxx>
39 #include <doc.hxx>
41 #include <layfrm.hxx>
42 #include <pagefrm.hxx>
43 #include <cntfrm.hxx>
44 #include <txtfrm.hxx>
45 #include <rootfrm.hxx>
46 #include <tabfrm.hxx>
47 #include <flyfrm.hxx>
48 #include <ftnfrm.hxx>
49 #include <rowfrm.hxx>
50 #include <expfld.hxx>
51 #include <usrfld.hxx>
52 #include <ndtxt.hxx>
53 #include <calc.hxx>
54 #include <pam.hxx>
55 #include <docfld.hxx>
56 #include <swtable.hxx>
57 #include <breakit.hxx>
58 #include <SwStyleNameMapper.hxx>
59 #include <unofldmid.h>
60 #include <numrule.hxx>
61 
62 using namespace ::com::sun::star;
63 using namespace ::com::sun::star::text;
64 
65 static sal_Int16 lcl_SubTypeToAPI(sal_uInt16 nSubType)
66 {
67  sal_Int16 nRet = 0;
68  switch(nSubType)
69  {
71  nRet = SetVariableType::VAR; // 0
72  break;
74  nRet = SetVariableType::SEQUENCE; // 1
75  break;
77  nRet = SetVariableType::FORMULA; // 2
78  break;
80  nRet = SetVariableType::STRING; // 3
81  break;
82  }
83  return nRet;
84 }
85 
86 static sal_Int32 lcl_APIToSubType(const uno::Any& rAny)
87 {
88  sal_Int16 nVal = 0;
89  rAny >>= nVal;
90  sal_Int32 nSet = 0;
91  switch(nVal)
92  {
93  case SetVariableType::VAR: nSet = nsSwGetSetExpType::GSE_EXPR; break;
94  case SetVariableType::SEQUENCE: nSet = nsSwGetSetExpType::GSE_SEQ; break;
95  case SetVariableType::FORMULA: nSet = nsSwGetSetExpType::GSE_FORMULA; break;
96  case SetVariableType::STRING: nSet = nsSwGetSetExpType::GSE_STRING; break;
97  default:
98  OSL_FAIL("wrong value");
99  nSet = -1;
100  }
101  return nSet;
102 }
103 
104 OUString ReplacePoint( const OUString& rTmpName, bool bWithCommandType )
105 {
106  // replace first and last (if bWithCommandType: last two) dot
107  // since table names may contain dots
108 
109  sal_Int32 nIndex = rTmpName.lastIndexOf('.');
110  if (nIndex<0)
111  {
112  return rTmpName;
113  }
114 
115  OUString sRes = rTmpName.replaceAt(nIndex, 1, OUString(DB_DELIM));
116 
117  if (bWithCommandType)
118  {
119  nIndex = sRes.lastIndexOf('.', nIndex);
120  if (nIndex<0)
121  {
122  return sRes;
123  }
124  sRes = sRes.replaceAt(nIndex, 1, OUString(DB_DELIM));
125  }
126 
127  nIndex = sRes.indexOf('.');
128  if (nIndex>=0)
129  {
130  sRes = sRes.replaceAt(nIndex, 1, OUString(DB_DELIM));
131  }
132  return sRes;
133 }
134 
135 static SwTextNode* GetFirstTextNode( const SwDoc& rDoc, SwPosition& rPos,
136  const SwContentFrame *pCFrame, Point &rPt )
137 {
138  SwTextNode* pTextNode = nullptr;
139  if ( !pCFrame )
140  {
141  const SwNodes& rNodes = rDoc.GetNodes();
142  rPos.nNode = *rNodes.GetEndOfContent().StartOfSectionNode();
143  SwContentNode* pCNd;
144  while( nullptr != (pCNd = rNodes.GoNext( &rPos.nNode ) ) &&
145  nullptr == ( pTextNode = pCNd->GetTextNode() ) )
146  ;
147  OSL_ENSURE( pTextNode, "Where is the 1. TextNode?" );
148  rPos.nContent.Assign( pTextNode, 0 );
149  }
150  else if ( !pCFrame->isFrameAreaDefinitionValid() )
151  {
152  assert(pCFrame->IsTextFrame());
153  rPos = static_cast<SwTextFrame const*>(pCFrame)->MapViewToModelPos(TextFrameIndex(0));
154  }
155  else
156  {
157  pCFrame->GetModelPositionForViewPoint( &rPos, rPt );
158  pTextNode = rPos.nNode.GetNode().GetTextNode();
159  }
160  return pTextNode;
161 }
162 
163 const SwTextNode* GetBodyTextNode( const SwDoc& rDoc, SwPosition& rPos,
164  const SwFrame& rFrame )
165 {
166  const SwLayoutFrame* pLayout = rFrame.GetUpper();
167  const SwTextNode* pTextNode = nullptr;
168 
169  while( pLayout )
170  {
171  if( pLayout->IsFlyFrame() )
172  {
173  // get the FlyFormat
174  const SwFrameFormat* pFlyFormat = static_cast<const SwFlyFrame*>(pLayout)->GetFormat();
175  OSL_ENSURE( pFlyFormat, "Could not find FlyFormat, where is the field?" );
176 
177  const SwFormatAnchor &rAnchor = pFlyFormat->GetAnchor();
178 
179  if( RndStdIds::FLY_AT_FLY == rAnchor.GetAnchorId() )
180  {
181  // the fly needs to be attached somewhere, so ask it
182  pLayout = static_cast<const SwLayoutFrame*>(static_cast<const SwFlyFrame*>(pLayout)->GetAnchorFrame());
183  continue;
184  }
185  else if ((RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId()) ||
186  (RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
187  (RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId()))
188  {
189  OSL_ENSURE( rAnchor.GetContentAnchor(), "no valid position" );
190  rPos = *rAnchor.GetContentAnchor();
191  pTextNode = rPos.nNode.GetNode().GetTextNode();
192  if ( RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId() )
193  {
194  const_cast<SwTextNode*>(pTextNode)->MakeStartIndex(
195  &rPos.nContent );
196  }
197 
198  // do not break yet, might be as well in Header/Footer/Footnote/Fly
199  pLayout = static_cast<const SwFlyFrame*>(pLayout)->GetAnchorFrame()
200  ? static_cast<const SwFlyFrame*>(pLayout)->GetAnchorFrame()->GetUpper() : nullptr;
201  continue;
202  }
203  else
204  {
205  pLayout->FindPageFrame()->GetContentPosition(
206  pLayout->getFrameArea().Pos(), rPos );
207  pTextNode = rPos.nNode.GetNode().GetTextNode();
208  }
209  }
210  else if( pLayout->IsFootnoteFrame() )
211  {
212  // get the anchor's node
213  const SwTextFootnote* pFootnote = static_cast<const SwFootnoteFrame*>(pLayout)->GetAttr();
214  pTextNode = &pFootnote->GetTextNode();
215  rPos.nNode = *pTextNode;
216  rPos.nContent = pFootnote->GetStart();
217  }
218  else if( pLayout->IsHeaderFrame() || pLayout->IsFooterFrame() )
219  {
220  const SwContentFrame* pContentFrame;
221  const SwPageFrame* pPgFrame = pLayout->FindPageFrame();
222  if( pLayout->IsHeaderFrame() )
223  {
224  const SwTabFrame *pTab;
225  if( nullptr != ( pContentFrame = pPgFrame->FindFirstBodyContent()) &&
226  nullptr != (pTab = pContentFrame->FindTabFrame()) && pTab->IsFollow() &&
227  pTab->GetTable()->GetRowsToRepeat() > 0 &&
228  pTab->IsInHeadline( *pContentFrame ) )
229  {
230  // take the next line
231  const SwLayoutFrame* pRow = pTab->GetFirstNonHeadlineRow();
232  pContentFrame = pRow->ContainsContent();
233  }
234  }
235  else
236  pContentFrame = pPgFrame->FindLastBodyContent();
237 
238  if( pContentFrame )
239  {
240  assert(pContentFrame->IsTextFrame());
241  SwTextFrame const*const pFrame(static_cast<SwTextFrame const*>(pContentFrame));
242  rPos = pFrame->MapViewToModelPos(TextFrameIndex(pFrame->GetText().getLength()));
243  pTextNode = rPos.nNode.GetNode().GetTextNode();
244  assert(pTextNode);
245  }
246  else
247  {
248  Point aPt( pLayout->getFrameArea().Pos() );
249  aPt.AdjustY( 1 ); // get out of the header
250  pContentFrame = pPgFrame->GetContentPos( aPt, false, true );
251  pTextNode = GetFirstTextNode( rDoc, rPos, pContentFrame, aPt );
252  }
253  }
254  else
255  {
256  pLayout = pLayout->GetUpper();
257  continue;
258  }
259  break; // found, so finish loop
260  }
261  return pTextNode;
262 }
263 
266 {
267 }
268 
269 std::unique_ptr<SwFieldType> SwGetExpFieldType::Copy() const
270 {
271  return std::make_unique<SwGetExpFieldType>(GetDoc());
272 }
273 
275 {
276  auto pLegacy = dynamic_cast<const sw::LegacyModifyHint*>(&rHint);
277  // do not expand anything else
278  if(!pLegacy || (pLegacy->GetWhich() != RES_DOCPOS_UPDATE))
279  return;
280  CallSwClientNotify(rHint);
281 }
282 
283 SwGetExpField::SwGetExpField(SwGetExpFieldType* pTyp, const OUString& rFormel,
284  sal_uInt16 nSub, sal_uLong nFormat)
285  : SwFormulaField( pTyp, nFormat, 0.0 )
286  , m_fValueRLHidden(0.0)
287  ,
288  m_bIsInBodyText( true ),
289  m_nSubType(nSub),
290  m_bLateInitialization( false )
291 {
292  SetFormula( rFormel );
293 }
294 
295 void SwGetExpField::ChgExpStr(const OUString& rExpand, SwRootFrame const*const pLayout)
296 {
297  if (!pLayout || pLayout->IsHideRedlines())
298  {
299  m_sExpandRLHidden = rExpand;
300  }
301  if (!pLayout || !pLayout->IsHideRedlines())
302  {
303  m_sExpand = rExpand;
304  }
305 }
306 
307 OUString SwGetExpField::ExpandImpl(SwRootFrame const*const pLayout) const
308 {
310  return GetFormula();
311 
312  return (pLayout && pLayout->IsHideRedlines()) ? m_sExpandRLHidden : m_sExpand;
313 }
314 
316 {
317  const SwFieldTypesEnum nType =
321 
322  return SwFieldType::GetTypeStr(nType) + " " + GetFormula();
323 }
324 
325 std::unique_ptr<SwField> SwGetExpField::Copy() const
326 {
327  std::unique_ptr<SwGetExpField> pTmp(new SwGetExpField(static_cast<SwGetExpFieldType*>(GetTyp()),
329  pTmp->SetLanguage(GetLanguage());
330  pTmp->m_fValueRLHidden = m_fValueRLHidden;
331  pTmp->SwValueField::SetValue(GetValue());
332  pTmp->m_sExpand = m_sExpand;
333  pTmp->m_sExpandRLHidden = m_sExpandRLHidden;
334  pTmp->m_bIsInBodyText = m_bIsInBodyText;
335  pTmp->SetAutomaticLanguage(IsAutomaticLanguage());
337  pTmp->SetLateInitialization();
338 
339  return std::unique_ptr<SwField>(pTmp.release());
340 }
341 
342 void SwGetExpField::ChangeExpansion( const SwFrame& rFrame, const SwTextField& rField )
343 {
344  if( m_bIsInBodyText ) // only fields in Footer, Header, FootNote, Flys
345  return;
346 
347  OSL_ENSURE( !rFrame.IsInDocBody(), "Flag incorrect, frame is in DocBody" );
348 
349  // determine document (or is there an easier way?)
350  const SwTextNode* pTextNode = &rField.GetTextNode();
351  SwDoc& rDoc = const_cast<SwDoc&>(pTextNode->GetDoc());
352 
353  // create index for determination of the TextNode
354  SwPosition aPos( SwNodeIndex( rDoc.GetNodes() ) );
355  pTextNode = GetBodyTextNode( rDoc, aPos, rFrame );
356 
357  // If no layout exists, ChangeExpansion is called for header and
358  // footer lines via layout formatting without existing TextNode.
359  if(!pTextNode)
360  return;
361  // #i82544#
363  {
365  if( pSetExpField )
366  {
367  m_bLateInitialization = false;
369  static_cast< SwSetExpFieldType* >(pSetExpField)->GetType() == nsSwGetSetExpType::GSE_STRING )
371  }
372  }
373 
374  SwRootFrame const& rLayout(*rFrame.getRootFrame());
375  OUString & rExpand(rLayout.IsHideRedlines() ? m_sExpandRLHidden : m_sExpand);
376  SetGetExpField aEndField( aPos.nNode, &rField, &aPos.nContent );
378  {
379  SwHashTable<HashStr> aHashTable(0);
380  rDoc.getIDocumentFieldsAccess().FieldsToExpand(aHashTable, aEndField, rLayout);
381  rExpand = LookString( aHashTable, GetFormula() );
382  }
383  else
384  {
385  // fill calculator with values
386  SwCalc aCalc( rDoc );
387  rDoc.getIDocumentFieldsAccess().FieldsToCalc(aCalc, aEndField, &rLayout);
388 
389  // calculate value
390  SetValue(aCalc.Calculate(GetFormula()).GetDouble(), &rLayout);
391 
392  // analyse based on format
393  rExpand = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue(
394  GetValue(&rLayout), GetFormat(), GetLanguage());
395  }
396 }
397 
398 OUString SwGetExpField::GetPar2() const
399 {
400  return GetFormula();
401 }
402 
403 void SwGetExpField::SetPar2(const OUString& rStr)
404 {
405  SetFormula(rStr);
406 }
407 
408 sal_uInt16 SwGetExpField::GetSubType() const
409 {
410  return m_nSubType;
411 }
412 
413 void SwGetExpField::SetSubType(sal_uInt16 nType)
414 {
415  m_nSubType = nType;
416 }
417 
419 {
421  SwField::SetLanguage(nLng);
422  else
424 }
425 
426 bool SwGetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
427 {
428  switch( nWhichId )
429  {
430  case FIELD_PROP_DOUBLE:
431  rAny <<= GetValue();
432  break;
433  case FIELD_PROP_FORMAT:
434  rAny <<= static_cast<sal_Int32>(GetFormat());
435  break;
436  case FIELD_PROP_USHORT1:
437  rAny <<= static_cast<sal_Int16>(m_nSubType);
438  break;
439  case FIELD_PROP_PAR1:
440  rAny <<= GetFormula();
441  break;
442  case FIELD_PROP_SUBTYPE:
443  {
444  sal_Int16 nRet = lcl_SubTypeToAPI(GetSubType() & 0xff);
445  rAny <<= nRet;
446  }
447  break;
448  case FIELD_PROP_BOOL2:
449  rAny <<= 0 != (m_nSubType & nsSwExtendedSubType::SUB_CMD);
450  break;
451  case FIELD_PROP_PAR4:
452  rAny <<= m_sExpand;
453  break;
454  default:
455  return SwField::QueryValue(rAny, nWhichId);
456  }
457  return true;
458 }
459 
460 bool SwGetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
461 {
462  sal_Int32 nTmp = 0;
463  switch( nWhichId )
464  {
465  case FIELD_PROP_DOUBLE:
466  SwValueField::SetValue(*o3tl::doAccess<double>(rAny));
467  m_fValueRLHidden = *o3tl::doAccess<double>(rAny);
468  break;
469  case FIELD_PROP_FORMAT:
470  rAny >>= nTmp;
471  SetFormat(nTmp);
472  break;
473  case FIELD_PROP_USHORT1:
474  rAny >>= nTmp;
475  m_nSubType = static_cast<sal_uInt16>(nTmp);
476  break;
477  case FIELD_PROP_PAR1:
478  {
479  OUString sTmp;
480  rAny >>= sTmp;
481  SetFormula(sTmp);
482  break;
483  }
484  case FIELD_PROP_SUBTYPE:
485  nTmp = lcl_APIToSubType(rAny);
486  if( nTmp >=0 )
487  SetSubType( static_cast<sal_uInt16>((GetSubType() & 0xff00) | nTmp));
488  break;
489  case FIELD_PROP_BOOL2:
490  if(*o3tl::doAccess<bool>(rAny))
492  else
494  break;
495  case FIELD_PROP_PAR4:
496  {
497  OUString sTmp;
498  rAny >>= sTmp;
499  ChgExpStr(sTmp, nullptr);
500  break;
501  }
502  default:
503  return SwField::PutValue(rAny, nWhichId);
504  }
505  return true;
506 }
507 
508 SwSetExpFieldType::SwSetExpFieldType( SwDoc* pDc, const OUString& rName, sal_uInt16 nTyp )
510  m_sName( rName ),
511  m_sDelim( "." ),
512  m_nType(nTyp), m_nLevel( UCHAR_MAX ),
513  m_bDeleted( false )
514 {
516  EnableFormat(false); // do not use Numberformatter
517 }
518 
519 std::unique_ptr<SwFieldType> SwSetExpFieldType::Copy() const
520 {
521  std::unique_ptr<SwSetExpFieldType> pNew(new SwSetExpFieldType(GetDoc(), m_sName, m_nType));
522  pNew->m_bDeleted = m_bDeleted;
523  pNew->m_sDelim = m_sDelim;
524  pNew->m_nLevel = m_nLevel;
525 
526  return pNew;
527 }
528 
530 {
531  return m_sName;
532 }
533 
534 const OUString& SwSetExpField::GetExpStr(SwRootFrame const*const pLayout) const
535 {
536  return (pLayout && pLayout->IsHideRedlines()) ? msExpandRLHidden : msExpand;
537 }
538 
539 void SwSetExpField::ChgExpStr(const OUString& rExpand, SwRootFrame const*const pLayout)
540 {
541  if (!pLayout || pLayout->IsHideRedlines())
542  {
543  msExpandRLHidden = rExpand;
544  }
545  if (!pLayout || !pLayout->IsHideRedlines())
546  {
547  msExpand = rExpand;
548  }
549 }
550 
552 {
553  // do not expand further
554 }
555 
557 {
558  std::vector<SwFormatField*> vFields;
559  GatherFields(vFields, false);
560  for(auto pFormatField: vFields)
561  pFormatField->GetField()->ChangeFormat(nFormat);
562 }
563 
565 {
566  if( !HasWriterListeners() )
567  return SVX_NUM_ARABIC;
568 
569  std::vector<SwFormatField*> vFields;
570  GatherFields(vFields, false);
571  return vFields.front()->GetField()->GetFormat();
572 }
573 
575 {
577  return;
578 
579  std::vector<sal_uInt16> aArr;
580 
581  // check if number is already used and if a new one needs to be created
582  std::vector<SwFormatField*> vFields;
583  GatherFields(vFields);
584  for(SwFormatField* pF: vFields)
585  if(pF->GetField() != &rField)
586  InsertSort(aArr, static_cast<SwSetExpField*>(pF->GetField())->GetSeqNumber());
587 
588  // check first if number already exists
589  sal_uInt16 nNum = rField.GetSeqNumber();
590  if( USHRT_MAX != nNum )
591  {
592  std::vector<sal_uInt16>::size_type n {0};
593 
594  for( n = 0; n < aArr.size(); ++n )
595  if( aArr[ n ] >= nNum )
596  break;
597 
598  if( n == aArr.size() || aArr[ n ] > nNum )
599  return; // no -> use it
600  }
601 
602  // flagged all numbers, so determine the right number
603  std::vector<sal_uInt16>::size_type n = aArr.size();
604  OSL_ENSURE( n <= std::numeric_limits<sal_uInt16>::max(), "Array is too big for using a sal_uInt16 index" );
605 
606  if ( n > 0 && aArr[ n-1 ] != n-1 )
607  {
608  for( n = 0; n < aArr.size(); ++n )
609  if( n != aArr[ n ] )
610  break;
611  }
612 
613  rField.SetSeqNumber( n );
614 }
615 
617  SwRootFrame const*const pLayout)
618 {
619  rList.Clear();
620 
621  IDocumentRedlineAccess const& rIDRA(GetDoc()->getIDocumentRedlineAccess());
622 
623  std::vector<SwFormatField*> vFields;
624  GatherFields(vFields);
625  for(SwFormatField* pF: vFields)
626  {
627  const SwTextNode* pNd;
628  if( nullptr != ( pNd = pF->GetTextField()->GetpTextNode() )
629  && (!pLayout || !pLayout->IsHideRedlines()
630  || !sw::IsFieldDeletedInModel(rIDRA, *pF->GetTextField())))
631  {
632  SeqFieldLstElem aNew(
633  pNd->GetExpandText(pLayout),
634  static_cast<SwSetExpField*>(pF->GetField())->GetSeqNumber() );
635  rList.InsertSort( aNew );
636  }
637  }
638  return rList.Count();
639 }
640 
642  SwRootFrame const*const pLayout)
643 {
644  const SwTextNode* pTextNd = rNd.FindOutlineNodeOfLevel(m_nLevel, pLayout);
645  if( !pTextNd )
646  return;
647 
648  SwNumRule * pRule = pTextNd->GetNumRule();
649 
650  if (!pRule)
651  return;
652 
653  // --> OD 2005-11-02 #i51089 - TUNING#
654  if (SwNodeNum const*const pNum = pTextNd->GetNum(pLayout))
655  {
656  // only get the number, without pre-/post-fixstrings
657  OUString const sNumber(pRule->MakeNumString(*pNum, false));
658 
659  if( !sNumber.isEmpty() )
660  rField.ChgExpStr(sNumber + m_sDelim + rField.GetExpStr(pLayout), pLayout);
661  }
662  else
663  {
664  OSL_ENSURE(pTextNd->GetNum(nullptr), "<SwSetExpFieldType::SetChapter(..)> - text node with numbering rule, but without number. This is a serious defect");
665  }
666 }
667 
668 void SwSetExpFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
669 {
670  switch( nWhichId )
671  {
672  case FIELD_PROP_SUBTYPE:
673  {
674  sal_Int16 nRet = lcl_SubTypeToAPI(GetType());
675  rAny <<= nRet;
676  }
677  break;
678  case FIELD_PROP_PAR2:
679  rAny <<= GetDelimiter();
680  break;
681  case FIELD_PROP_SHORT1:
682  {
683  sal_Int8 nRet = m_nLevel < MAXLEVEL? m_nLevel : -1;
684  rAny <<= nRet;
685  }
686  break;
687  default:
688  assert(false);
689  }
690 }
691 
692 void SwSetExpFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
693 {
694  switch( nWhichId )
695  {
696  case FIELD_PROP_SUBTYPE:
697  {
698  sal_Int32 nSet = lcl_APIToSubType(rAny);
699  if(nSet >=0)
700  SetType(static_cast<sal_uInt16>(nSet));
701  }
702  break;
703  case FIELD_PROP_PAR2:
704  {
705  OUString sTmp;
706  rAny >>= sTmp;
707  if( !sTmp.isEmpty() )
708  SetDelimiter( sTmp );
709  else
710  SetDelimiter( " " );
711  }
712  break;
713  case FIELD_PROP_SHORT1:
714  {
715  sal_Int8 nLvl = 0;
716  rAny >>= nLvl;
717  if(nLvl < 0 || nLvl >= MAXLEVEL)
718  SetOutlineLvl(UCHAR_MAX);
719  else
720  SetOutlineLvl(nLvl);
721  }
722  break;
723  default:
724  assert(false);
725  }
726 }
727 
729 {
730  OUStringBuffer aBuf(aNew.sDlgEntry);
731  const sal_Int32 nLen = aBuf.getLength();
732  for (sal_Int32 i = 0; i < nLen; ++i)
733  {
734  if (aBuf[i]<' ')
735  {
736  aBuf[i]=' ';
737  }
738  }
739  aNew.sDlgEntry = aBuf.makeStringAndClear();
740 
741  size_t nPos = 0;
742  bool bRet = SeekEntry( aNew, &nPos );
743  if( !bRet )
744  maData.insert( maData.begin() + nPos, aNew );
745  return bRet;
746 }
747 
748 bool SwSeqFieldList::SeekEntry( const SeqFieldLstElem& rNew, size_t* pP ) const
749 {
750  size_t nO = maData.size();
751  size_t nU = 0;
752  if( nO > 0 )
753  {
754  CollatorWrapper & rCaseColl = ::GetAppCaseCollator(),
755  & rColl = ::GetAppCollator();
756  const CharClass& rCC = GetAppCharClass();
757 
758  //#59900# Sorting should sort number correctly (e.g. "10" after "9" not after "1")
759  const OUString rTmp2 = rNew.sDlgEntry;
760  sal_Int32 nFndPos2 = 0;
761  const OUString sNum2( rTmp2.getToken( 0, ' ', nFndPos2 ));
762  bool bIsNum2IsNumeric = CharClass::isAsciiNumeric( sNum2 );
763  sal_Int32 nNum2 = bIsNum2IsNumeric ? sNum2.toInt32() : 0;
764 
765  nO--;
766  while( nU <= nO )
767  {
768  const size_t nM = nU + ( nO - nU ) / 2;
769 
770  //#59900# Sorting should sort number correctly (e.g. "10" after "9" not after "1")
771  const OUString rTmp1 = maData[nM].sDlgEntry;
772  sal_Int32 nFndPos1 = 0;
773  const OUString sNum1( rTmp1.getToken( 0, ' ', nFndPos1 ));
774  sal_Int32 nCmp;
775 
776  if( bIsNum2IsNumeric && rCC.isNumeric( sNum1 ) )
777  {
778  sal_Int32 nNum1 = sNum1.toInt32();
779  nCmp = nNum2 - nNum1;
780  if( 0 == nCmp )
781  {
782  OUString aTmp1 = nFndPos1 != -1 ? rTmp1.copy(nFndPos1) : OUString();
783  OUString aTmp2 = nFndPos2 != -1 ? rTmp2.copy(nFndPos2) : OUString();
784  nCmp = rCaseColl.compareString(aTmp2, aTmp1);
785  }
786  }
787  else
788  nCmp = rColl.compareString( rTmp2, rTmp1 );
789 
790  if( 0 == nCmp )
791  {
792  if( pP ) *pP = nM;
793  return true;
794  }
795  else if( 0 < nCmp )
796  nU = nM + 1;
797  else if( nM == 0 )
798  break;
799  else
800  nO = nM - 1;
801  }
802  }
803  if( pP ) *pP = nU;
804  return false;
805 }
806 
807 SwSetExpField::SwSetExpField(SwSetExpFieldType* pTyp, const OUString& rFormel,
808  sal_uLong nFormat)
809  : SwFormulaField( pTyp, nFormat, 0.0 )
810  , m_fValueRLHidden(0.0)
811  , mnSeqNo( USHRT_MAX )
812  , mnSubType(0)
813  , mpFormatField(nullptr)
814 {
815  SetFormula(rFormel);
816  // ignore SubType
817  mbInput = false;
818  if( IsSequenceField() )
819  {
821  m_fValueRLHidden = 1.0;
822  if( rFormel.isEmpty() )
823  {
824  SetFormula(pTyp->GetName() + "+1");
825  }
826  }
827 }
828 
830 {
831  mpFormatField = &rFormatField;
832 }
833 
834 OUString SwSetExpField::ExpandImpl(SwRootFrame const*const pLayout) const
835 {
837  { // we need the CommandString
838  return GetTyp()->GetName() + " = " + GetFormula();
839  }
841  { // value is visible
842  return (pLayout && pLayout->IsHideRedlines()) ? msExpandRLHidden : msExpand;
843  }
844  return OUString();
845 }
846 
849 {
850  SwFieldTypesEnum const nStrType( (IsSequenceField())
852  : mbInput
855 
856  OUString aStr(
857  SwFieldType::GetTypeStr( nStrType )
858  + " "
859  + GetTyp()->GetName() );
860 
861  // Sequence: without formula
862  if (SwFieldTypesEnum::Sequence != nStrType)
863  {
864  aStr += " = " + GetFormula();
865  }
866  return aStr;
867 }
868 
869 std::unique_ptr<SwField> SwSetExpField::Copy() const
870 {
871  std::unique_ptr<SwSetExpField> pTmp(new SwSetExpField(static_cast<SwSetExpFieldType*>(GetTyp()),
872  GetFormula(), GetFormat()));
873  pTmp->SwValueField::SetValue(GetValue());
874  pTmp->m_fValueRLHidden = m_fValueRLHidden;
875  pTmp->msExpand = msExpand;
876  pTmp->msExpandRLHidden = msExpandRLHidden;
877  pTmp->SetAutomaticLanguage(IsAutomaticLanguage());
878  pTmp->SetLanguage(GetLanguage());
879  pTmp->maPText = maPText;
880  pTmp->mbInput = mbInput;
881  pTmp->mnSeqNo = mnSeqNo;
882  pTmp->SetSubType(GetSubType());
883 
884  return std::unique_ptr<SwField>(pTmp.release());
885 }
886 
887 void SwSetExpField::SetSubType(sal_uInt16 nSub)
888 {
889  static_cast<SwSetExpFieldType*>(GetTyp())->SetType(nSub & 0xff);
890  mnSubType = nSub & 0xff00;
891 
892  OSL_ENSURE( (nSub & 0xff) != 3, "SubType is illegal!" );
893 }
894 
895 sal_uInt16 SwSetExpField::GetSubType() const
896 {
897  return static_cast<SwSetExpFieldType*>(GetTyp())->GetType() | mnSubType;
898 }
899 
900 void SwSetExpField::SetValue( const double& rAny )
901 {
903 
904  if( IsSequenceField() )
905  msExpand = FormatNumber( GetValue(), static_cast<SvxNumType>(GetFormat()), GetLanguage() );
906  else
907  msExpand = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue( rAny,
908  GetFormat(), GetLanguage());
909 }
910 
911 void SwSetExpField::SetValue(const double& rValue, SwRootFrame const*const pLayout)
912 {
913  if (!pLayout || !pLayout->IsHideRedlines())
914  {
915  SetValue(rValue);
916  }
917  if (pLayout && !pLayout->IsHideRedlines())
918  return;
919 
920  m_fValueRLHidden = rValue;
921  if (IsSequenceField())
922  {
923  msExpandRLHidden = FormatNumber(rValue, static_cast<SvxNumType>(GetFormat()), GetLanguage());
924  }
925  else
926  {
928  rValue, GetFormat(), GetLanguage());
929  }
930 }
931 
932 double SwSetExpField::GetValue(SwRootFrame const* pLayout) const
933 {
934  return (pLayout && pLayout->IsHideRedlines()) ? m_fValueRLHidden : GetValue();
935 }
936 
937 void SwGetExpField::SetValue( const double& rAny )
938 {
940  m_sExpand = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue( rAny, GetFormat(),
941  GetLanguage());
942 }
943 
944 void SwGetExpField::SetValue(const double& rValue, SwRootFrame const*const pLayout)
945 {
946  if (!pLayout || !pLayout->IsHideRedlines())
947  {
948  SetValue(rValue);
949  }
950  if (!pLayout || pLayout->IsHideRedlines())
951  {
952  m_fValueRLHidden = rValue;
954  rValue, GetFormat(), GetLanguage());
955  }
956 }
957 
958 double SwGetExpField::GetValue(SwRootFrame const* pLayout) const
959 {
960  return (pLayout && pLayout->IsHideRedlines()) ? m_fValueRLHidden : GetValue();
961 }
962 
970 sal_Int32 SwGetExpField::GetReferenceTextPos( const SwFormatField& rFormat, SwDoc& rDoc, sal_Int32 nHint)
971 {
972 
973  const SwTextField* pTextField = rFormat.GetTextField();
974  const SwTextNode& rTextNode = pTextField->GetTextNode();
975 
976  sal_Int32 nRet = nHint ? nHint : pTextField->GetStart() + 1;
977  OUString sNodeText = rTextNode.GetText();
978 
979  if(nRet<sNodeText.getLength())
980  {
981  sNodeText = sNodeText.copy(nRet);
982 
983  // now check if sNodeText starts with a non-alphanumeric character plus blanks
984  sal_uInt16 nSrcpt = g_pBreakIt->GetRealScriptOfText( sNodeText, 0 );
985 
986  static const sal_uInt16 nIds[] =
987  {
994  0, 0
995  };
996  SwAttrSet aSet(rDoc.GetAttrPool(), nIds);
997  rTextNode.GetParaAttr(aSet, nRet, nRet+1);
998 
999  if( RTL_TEXTENCODING_SYMBOL != static_cast<const SvxFontItem&>(aSet.Get(
1000  GetWhichOfScript( RES_CHRATR_FONT, nSrcpt )) ).GetCharSet() )
1001  {
1002  LanguageType eLang = static_cast<const SvxLanguageItem&>(aSet.Get(
1004  LanguageTag aLanguageTag( eLang);
1005  CharClass aCC( aLanguageTag);
1006  sal_Unicode c0 = sNodeText[0];
1007  bool bIsAlphaNum = aCC.isAlphaNumeric( sNodeText, 0 );
1008  if( !bIsAlphaNum ||
1009  (c0 == ' ' || c0 == '\t'))
1010  {
1011  // ignoring blanks
1012  nRet++;
1013  const sal_Int32 nLen = sNodeText.getLength();
1014  for (sal_Int32 i = 1;
1015  i<nLen && (sNodeText[i]==' ' || sNodeText[i]=='\t');
1016  ++i
1017  )
1018  ++nRet;
1019  }
1020  }
1021  }
1022  return nRet;
1023 }
1024 
1025 OUString SwSetExpField::GetPar1() const
1026 {
1027  return static_cast<const SwSetExpFieldType*>(GetTyp())->GetName();
1028 }
1029 
1030 OUString SwSetExpField::GetPar2() const
1031 {
1032  sal_uInt16 nType = static_cast<SwSetExpFieldType*>(GetTyp())->GetType();
1033 
1034  if (nType & nsSwGetSetExpType::GSE_STRING)
1035  return GetFormula();
1036  return GetExpandedFormula();
1037 }
1038 
1039 void SwSetExpField::SetPar2(const OUString& rStr)
1040 {
1041  sal_uInt16 nType = static_cast<SwSetExpFieldType*>(GetTyp())->GetType();
1042 
1043  if( !(nType & nsSwGetSetExpType::GSE_SEQ) || !rStr.isEmpty() )
1044  {
1045  if (nType & nsSwGetSetExpType::GSE_STRING)
1046  SetFormula(rStr);
1047  else
1048  SetExpandedFormula(rStr);
1049  }
1050 }
1051 
1052 bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
1053 {
1054  sal_Int32 nTmp32 = 0;
1055  sal_Int16 nTmp16 = 0;
1056  switch( nWhichId )
1057  {
1058  case FIELD_PROP_BOOL2:
1059  if(*o3tl::doAccess<bool>(rAny))
1061  else
1063  break;
1064  case FIELD_PROP_FORMAT:
1065  rAny >>= nTmp32;
1066  SetFormat(nTmp32);
1067  break;
1068  case FIELD_PROP_USHORT2:
1069  {
1070  rAny >>= nTmp16;
1071  if(nTmp16 <= css::style::NumberingType::NUMBER_NONE )
1072  SetFormat(nTmp16);
1073  else {
1074  //exception(wrong_value)
1075  ;
1076  }
1077  }
1078  break;
1079  case FIELD_PROP_USHORT1:
1080  rAny >>= nTmp16;
1081  mnSeqNo = nTmp16;
1082  break;
1083  case FIELD_PROP_PAR1:
1084  {
1085  OUString sTmp;
1086  rAny >>= sTmp;
1088  }
1089  break;
1090  case FIELD_PROP_PAR2:
1091  {
1092  OUString uTmp;
1093  rAny >>= uTmp;
1094  //I18N - if the formula contains only "TypeName+1"
1095  //and it's one of the initially created sequence fields
1096  //then the localized names has to be replaced by a programmatic name
1097  OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, uTmp, false);
1098  SetFormula( sMyFormula );
1099  }
1100  break;
1101  case FIELD_PROP_DOUBLE:
1102  {
1103  double fVal = 0.0;
1104  rAny >>= fVal;
1105  SetValue(fVal);
1106  m_fValueRLHidden = fVal;
1107  }
1108  break;
1109  case FIELD_PROP_SUBTYPE:
1110  nTmp32 = lcl_APIToSubType(rAny);
1111  if(nTmp32 >= 0)
1112  SetSubType(static_cast<sal_uInt16>((GetSubType() & 0xff00) | nTmp32));
1113  break;
1114  case FIELD_PROP_PAR3:
1115  rAny >>= maPText;
1116  break;
1117  case FIELD_PROP_BOOL3:
1118  if(*o3tl::doAccess<bool>(rAny))
1120  else
1122  break;
1123  case FIELD_PROP_BOOL1:
1124  {
1125  bool newInput(*o3tl::doAccess<bool>(rAny));
1126  if (newInput != GetInputFlag())
1127  {
1128  if (static_cast<SwSetExpFieldType*>(GetTyp())->GetType()
1130  {
1132  }
1133  else
1134  {
1135  SetInputFlag(newInput);
1136  }
1137  }
1138  }
1139  break;
1140  case FIELD_PROP_PAR4:
1141  {
1142  OUString sTmp;
1143  rAny >>= sTmp;
1144  ChgExpStr(sTmp, nullptr);
1145  }
1146  break;
1147  default:
1148  return SwField::PutValue(rAny, nWhichId);
1149  }
1150  return true;
1151 }
1152 
1153 bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
1154 {
1155  switch( nWhichId )
1156  {
1157  case FIELD_PROP_BOOL2:
1159  break;
1160  case FIELD_PROP_FORMAT:
1161  rAny <<= static_cast<sal_Int32>(GetFormat());
1162  break;
1163  case FIELD_PROP_USHORT2:
1164  rAny <<= static_cast<sal_Int16>(GetFormat());
1165  break;
1166  case FIELD_PROP_USHORT1:
1167  rAny <<= static_cast<sal_Int16>(mnSeqNo);
1168  break;
1169  case FIELD_PROP_PAR1:
1171  break;
1172  case FIELD_PROP_PAR2:
1173  {
1174  //I18N - if the formula contains only "TypeName+1"
1175  //and it's one of the initially created sequence fields
1176  //then the localized names has to be replaced by a programmatic name
1177  OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, GetFormula(), true);
1178  rAny <<= sMyFormula;
1179  }
1180  break;
1181  case FIELD_PROP_DOUBLE:
1182  rAny <<= GetValue();
1183  break;
1184  case FIELD_PROP_SUBTYPE:
1185  {
1186  sal_Int16 nRet = lcl_SubTypeToAPI(GetSubType() & 0xff);
1187  rAny <<= nRet;
1188  }
1189  break;
1190  case FIELD_PROP_PAR3:
1191  rAny <<= maPText;
1192  break;
1193  case FIELD_PROP_BOOL3:
1194  rAny <<= 0 != (mnSubType & nsSwExtendedSubType::SUB_CMD);
1195  break;
1196  case FIELD_PROP_BOOL1:
1197  rAny <<= GetInputFlag();
1198  break;
1199  case FIELD_PROP_PAR4:
1200  rAny <<= GetExpStr(nullptr);
1201  break;
1202  default:
1203  return SwField::QueryValue(rAny, nWhichId);
1204  }
1205  return true;
1206 }
1207 
1210  , mpDoc( pD )
1211 {
1212 }
1213 
1214 std::unique_ptr<SwFieldType> SwInputFieldType::Copy() const
1215 {
1216  return std::make_unique<SwInputFieldType>( mpDoc );
1217 }
1218 
1220  const OUString& rContent,
1221  const OUString& rPrompt,
1222  sal_uInt16 nSub,
1223  sal_uLong nFormat,
1224  bool bIsFormField )
1225  : SwField( pFieldType, nFormat, LANGUAGE_SYSTEM, false )
1226  , maContent(rContent)
1227  , maPText(rPrompt)
1228  , mnSubType(nSub)
1229  , mbIsFormField( bIsFormField )
1230  , mpFormatField( nullptr )
1231 {
1232 }
1233 
1235 {
1236 }
1237 
1239 {
1240  mpFormatField = &rFormatField;
1241 }
1242 
1243 
1244 void SwInputField::applyFieldContent( const OUString& rNewFieldContent )
1245 {
1246  if ( (mnSubType & 0x00ff) == INP_TXT )
1247  {
1248  maContent = rNewFieldContent;
1249  }
1250  else if( (mnSubType & 0x00ff) == INP_USR )
1251  {
1252  SwUserFieldType* pUserTyp = static_cast<SwUserFieldType*>(
1253  static_cast<SwInputFieldType*>(GetTyp())->GetDoc()->getIDocumentFieldsAccess().GetFieldType( SwFieldIds::User, getContent(), false ) );
1254  if( pUserTyp )
1255  {
1256  pUserTyp->SetContent( rNewFieldContent );
1257  if (!pUserTyp->IsModifyLocked())
1258  {
1259  // trigger update of the corresponding User Fields and other
1260  // related Input Fields
1261  bool bUnlock(false);
1262  if (GetFormatField() != nullptr)
1263  {
1264  SwTextInputField *const pTextInputField =
1265  dynamic_cast<SwTextInputField*>(GetFormatField()->GetTextField());
1266  if (pTextInputField != nullptr)
1267  {
1268  bUnlock = pTextInputField->LockNotifyContentChange();
1269  }
1270  }
1271  pUserTyp->UpdateFields();
1272  if (bUnlock)
1273  {
1274  SwTextInputField *const pTextInputField =
1275  dynamic_cast<SwTextInputField*>(GetFormatField()->GetTextField());
1276  if (pTextInputField != nullptr)
1277  {
1278  pTextInputField->UnlockNotifyContentChange();
1279  }
1280  }
1281  }
1282  }
1283  }
1284 }
1285 
1287 {
1288  OUString aStr(SwField::GetFieldName());
1289  if ((mnSubType & 0x00ff) == INP_USR)
1290  {
1291  aStr += GetTyp()->GetName() + " " + getContent();
1292  }
1293  return aStr;
1294 }
1295 
1296 std::unique_ptr<SwField> SwInputField::Copy() const
1297 {
1298  std::unique_ptr<SwInputField> pField(
1299  new SwInputField(
1300  static_cast<SwInputFieldType*>(GetTyp()),
1301  getContent(),
1302  maPText,
1303  GetSubType(),
1304  GetFormat(),
1305  mbIsFormField ));
1306 
1307  pField->SetHelp( maHelp );
1308  pField->SetToolTip( maToolTip );
1309 
1310  pField->SetAutomaticLanguage(IsAutomaticLanguage());
1311  return std::unique_ptr<SwField>(pField.release());
1312 }
1313 
1314 OUString SwInputField::ExpandImpl(SwRootFrame const*const) const
1315 {
1316  if((mnSubType & 0x00ff) == INP_TXT)
1317  {
1318  return getContent();
1319  }
1320 
1321  if( (mnSubType & 0x00ff) == INP_USR )
1322  {
1323  SwUserFieldType* pUserTyp = static_cast<SwUserFieldType*>(
1324  static_cast<SwInputFieldType*>(GetTyp())->GetDoc()->getIDocumentFieldsAccess().GetFieldType( SwFieldIds::User, getContent(), false ) );
1325  if( pUserTyp )
1326  return pUserTyp->GetContent();
1327  }
1328 
1329  return OUString();
1330 }
1331 
1333 {
1334  return mbIsFormField
1335  || !maHelp.isEmpty()
1336  || !maToolTip.isEmpty();
1337 }
1338 
1339 bool SwInputField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
1340 {
1341  switch( nWhichId )
1342  {
1343  case FIELD_PROP_PAR1:
1344  rAny <<= getContent();
1345  break;
1346  case FIELD_PROP_PAR2:
1347  rAny <<= maPText;
1348  break;
1349  case FIELD_PROP_PAR3:
1350  rAny <<= maHelp;
1351  break;
1352  case FIELD_PROP_PAR4:
1353  rAny <<= maToolTip;
1354  break;
1355  default:
1356  assert(false);
1357  }
1358  return true;
1359 }
1360 
1361 bool SwInputField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
1362 {
1363  switch( nWhichId )
1364  {
1365  case FIELD_PROP_PAR1:
1366  rAny >>= maContent;
1367  break;
1368  case FIELD_PROP_PAR2:
1369  rAny >>= maPText;
1370  break;
1371  case FIELD_PROP_PAR3:
1372  rAny >>= maHelp;
1373  break;
1374  case FIELD_PROP_PAR4:
1375  rAny >>= maToolTip;
1376  break;
1377  default:
1378  assert(false);
1379  }
1380  return true;
1381 }
1382 
1384 void SwInputField::SetPar1(const OUString& rStr)
1385 {
1386  maContent = rStr;
1387 }
1388 
1389 OUString SwInputField::GetPar1() const
1390 {
1391  return getContent();
1392 }
1393 
1394 void SwInputField::SetPar2(const OUString& rStr)
1395 {
1396  maPText = rStr;
1397 }
1398 
1399 OUString SwInputField::GetPar2() const
1400 {
1401  return maPText;
1402 }
1403 
1404 void SwInputField::SetHelp(const OUString & rStr)
1405 {
1406  maHelp = rStr;
1407 }
1408 
1409 const OUString& SwInputField::GetHelp() const
1410 {
1411  return maHelp;
1412 }
1413 
1414 void SwInputField::SetToolTip(const OUString & rStr)
1415 {
1416  maToolTip = rStr;
1417 }
1418 
1419 const OUString& SwInputField::GetToolTip() const
1420 {
1421  return maToolTip;
1422 }
1423 
1424 sal_uInt16 SwInputField::GetSubType() const
1425 {
1426  return mnSubType;
1427 }
1428 
1429 void SwInputField::SetSubType(sal_uInt16 nSub)
1430 {
1431  mnSubType = nSub;
1432 }
1433 
1434 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString msExpandRLHidden
hidden redlines
Definition: expfld.hxx:203
virtual void SetSubType(sal_uInt16 nType) override
Definition: expfld.cxx:887
Instances of SwFields and those derived from it occur 0 to n times.
Definition: fldbas.hxx:240
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
Overlay, because get-field cannot be changed and therefore does not need to be updated.
Definition: expfld.cxx:274
Base class of the Writer layout elements.
Definition: frame.hxx:298
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:151
void SetDelimiter(const OUString &s)
Definition: expfld.hxx:178
Definition: calc.hxx:191
sal_Int32 nIndex
bool IsFollow() const
Definition: flowfrm.hxx:166
The shared part of a user field.
Definition: usrfld.hxx:34
void GetContentPosition(const Point &rPt, SwPosition &rPos) const
Same as SwLayoutFrame::GetContentPos().
Definition: trvlfrm.cxx:1381
bool mbInput
Definition: expfld.hxx:205
Marks a position in the document model.
Definition: pam.hxx:35
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
sal_Int32 compareString(const OUString &s1, const OUString &s2) const
bool IsInDocBody() const
Definition: frame.hxx:924
const SwNodeNum * GetNum(SwRootFrame const *pLayout=nullptr) const
Definition: ndtxt.cxx:3927
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: expfld.cxx:460
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: expfld.cxx:1314
LanguageType GetLanguage() const
Language at field position.
Definition: fldbas.hxx:402
bool isNumeric(const OUString &rStr) const
OUString MakeNumString(const SwNodeNum &, bool bInclStrings=true) const
Definition: number.cxx:616
const OUString & GetText() const
Definition: ndtxt.hxx:211
void SetType(sal_uInt16 nTyp)
Definition: expfld.hxx:187
void EnableFormat(bool bFormat=true)
Definition: fldbas.hxx:429
sal_uInt32 GetFormat() const
Query parameters for dialog and for BASIC.
Definition: fldbas.hxx:397
const SwExtendedSubType SUB_INVISIBLE
Invisible.
Definition: fldbas.hxx:212
signed char sal_Int8
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
pool item to which the SwSetExpField belongs
Definition: expfld.cxx:834
virtual SwFieldType * GetFieldType(SwFieldIds nResId, const OUString &rName, bool bDbFieldMatching) const =0
void ChgExpStr(const OUString &rExpand, SwRootFrame const *pLayout)
Definition: expfld.cxx:539
const SwTable * GetTable() const
Definition: tabfrm.hxx:143
SwNodeIndex nNode
Definition: pam.hxx:37
sal_uInt16 mnSubType
Definition: expfld.hxx:287
virtual void FieldsToCalc(SwCalc &rCalc, sal_uLong nLastNd, sal_Int32 nLastCnt)=0
const SwTextNode * GetBodyTextNode(const SwDoc &rDoc, SwPosition &rPos, const SwFrame &rFrame)
Forward declaration: get "BodyTextNode" for exp.fld in Fly's headers/footers/footnotes.
Definition: expfld.cxx:163
void SetOutlineLvl(sal_uInt8 n)
Definition: expfld.hxx:180
sal_uIntPtr sal_uLong
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: expfld.cxx:1361
virtual void SetValue(const double &rVal) override
Definition: expfld.cxx:937
const OUString & GetExpStr(SwRootFrame const *pLayout) const
Definition: expfld.cxx:534
static OUString LocalizeFormula(const SwSetExpField &rField, const OUString &rFormula, bool bQuery)
Definition: unofield.cxx:1022
Base class of all fields.
Definition: fldbas.hxx:289
constexpr TypedWhichId< SwDocPosUpdate > RES_DOCPOS_UPDATE(167)
SwTabFrame is one table in the document layout, containing rows (which contain cells).
Definition: tabfrm.hxx:30
#define FIELD_PROP_USHORT1
Definition: unofldmid.h:31
sal_Int64 n
Definition: doc.hxx:186
aBuf
OUString sDlgEntry
Definition: expfld.hxx:49
SwNode & GetNode() const
Definition: ndindex.hxx:119
bool InsertSort(SeqFieldLstElem aNew)
Definition: expfld.cxx:728
sal_uInt16 GetRowsToRepeat() const
Definition: swtable.hxx:195
void Pos(const Point &rNew)
Definition: swrect.hxx:169
SwContentFrame * FindFirstBodyContent()
Definition: pagefrm.hxx:334
virtual void FieldsToExpand(SwHashTable< HashStr > &rTable, const SetGetExpField &rToThisField, SwRootFrame const &rLayout)=0
SwGetExpFieldType(SwDoc *pDoc)
Definition: expfld.cxx:264
virtual sal_uInt16 GetSubType() const override
Definition: expfld.cxx:895
OUString LookString(SwHashTable< HashStr > const &rTable, const OUString &rName)
Look up the Name, if it is present, return its String, otherwise return an empty String.
Definition: docfld.cxx:335
void SetSeqRefNo(SwSetExpField &rField)
Definition: expfld.cxx:574
bool HasWriterListeners() const
Definition: calbck.hxx:198
The root element of a Writer document layout.
Definition: rootfrm.hxx:82
virtual OUString GetPar1() const override
Content.
Definition: expfld.cxx:1389
bool IsFootnoteFrame() const
Definition: frame.hxx:1183
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
virtual void SetPar2(const OUString &rStr) override
Definition: expfld.cxx:1039
#define FIELD_PROP_SUBTYPE
Definition: unofldmid.h:27
virtual void SetPar2(const OUString &rStr) override
Definition: expfld.cxx:403
bool isFrameAreaDefinitionValid() const
Definition: frame.hxx:170
sal_uInt16 GetRealScriptOfText(const OUString &rText, sal_Int32 nPos) const
Definition: breakit.cxx:83
const OUString & GetHelp() const
Definition: expfld.cxx:1409
double m_fValueRLHidden
SwValueField; hidden redlines.
Definition: expfld.hxx:84
OUString GetExpandedFormula() const
Definition: fldbas.cxx:776
virtual void QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: expfld.cxx:668
void GatherFields(std::vector< SwFormatField * > &rvFormatFields, bool bCollectOnlyInDocNodes=true) const
Definition: fldbas.cxx:205
#define FIELD_PROP_FORMAT
Definition: unofldmid.h:26
void UpdateFields() const
Definition: fldbas.cxx:148
OUString maPText
Definition: expfld.hxx:204
void SetChapter(SwSetExpField &rField, const SwNode &rNd, SwRootFrame const *pLayout)
Definition: expfld.cxx:641
virtual bool GetModelPositionForViewPoint(SwPosition *, Point &, SwCursorMoveState *=nullptr, bool bTestBackground=false) const
Definition: unusedf.cxx:47
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
Definition: doc.cxx:357
sal_uInt16 sal_Unicode
bool IsFlyFrame() const
Definition: frame.hxx:1191
static void TransmuteLeadToInputField(SwSetExpField &rField)
Convert between SwSetExpField with InputFlag false and InputFlag true.
Definition: unofield.cxx:1271
size_t Count()
Definition: expfld.hxx:64
OUString m_sName
OUString ReplacePoint(const OUString &rTmpName, bool bWithCommandType)
Definition: expfld.cxx:104
def Input(s)
void applyFieldContent(const OUString &rNewFieldContent)
Definition: expfld.cxx:1244
OUString m_sExpandRLHidden
hidden redlines
Definition: expfld.hxx:86
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: expfld.cxx:307
SwIndex nContent
Definition: pam.hxx:38
const SwRect & getFrameArea() const
Definition: frame.hxx:178
virtual std::unique_ptr< SwField > Copy() const override
Definition: expfld.cxx:325
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
const SwTextField * GetTextField() const
Definition: fmtfld.hxx:128
bool SeekEntry(const SeqFieldLstElem &rNew, size_t *pPos) const
Definition: expfld.cxx:748
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: expfld.cxx:1214
void ChgExpStr(const OUString &rExpand, SwRootFrame const *pLayout)
Definition: expfld.cxx:295
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhichId)
Definition: fldbas.cxx:357
SwBreakIt * g_pBreakIt
Definition: breakit.cxx:33
SVX_NUM_ARABIC
virtual OUString GetPar1() const override
Query name only.
Definition: expfld.cxx:1025
bool IsTextFrame() const
Definition: frame.hxx:1215
sal_Int32 GetStart() const
Definition: txatbase.hxx:82
const sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:95
static sal_Int32 lcl_APIToSubType(const uno::Any &rAny)
Definition: expfld.cxx:86
void SetToolTip(const OUString &rStr)
Definition: expfld.cxx:1414
virtual void SetLanguage(LanguageType nLng) override
set language of the format
Definition: fldbas.cxx:674
virtual void SetValue(const double &rVal) override
Definition: expfld.cxx:900
OUString FormatNumber(sal_uInt32 nNum, SvxNumType nFormat, LanguageType nLang)
expand numbering
Definition: fldbas.cxx:487
OUString m_sDelim
Definition: expfld.hxx:147
void SetHelp(const OUString &rStr)
Definition: expfld.cxx:1404
void SetExpandedFormula(const OUString &rStr)
Definition: fldbas.cxx:757
virtual OUString GetFieldName() const override
get name or content
Definition: expfld.cxx:1286
#define FIELD_PROP_DOUBLE
Definition: unofldmid.h:34
const SwGetSetExpType GSE_EXPR
Expression.
Definition: fldbas.hxx:203
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhichId) const
Definition: fldbas.cxx:344
virtual OUString GetFieldName() const override
get name or content
Definition: expfld.cxx:315
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: expfld.cxx:1052
sal_uInt16 GetSeqNumber() const
Definition: expfld.hxx:243
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
Definition: ndarr.hxx:163
sal_Int32 m_nLevel
void SetFormula(const OUString &rStr)
Definition: fldbas.cxx:742
double GetDouble() const
Definition: calc.cxx:1468
static sal_Int32 GetReferenceTextPos(const SwFormatField &rFormat, SwDoc &rDoc, sal_Int32 nHint=0)
Find the index of the reference text following the current field.
Definition: expfld.cxx:970
virtual void SetPar1(const OUString &rStr)
Definition: fldbas.cxx:329
static OUString GetTypeStr(SwFieldTypesEnum nTypeId)
Definition: fldbas.cxx:121
Style of a layout element.
Definition: frmfmt.hxx:58
virtual std::unique_ptr< SwField > Copy() const override
Definition: expfld.cxx:1296
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: expfld.cxx:1153
const SwFormatAnchor & GetAnchor(bool=true) const
Definition: fmtanchr.hxx:81
int i
virtual sal_uInt16 GetSubType() const override
Definition: expfld.cxx:408
bool m_bIsInBodyText
Definition: expfld.hxx:87
const SwStartNode * StartOfSectionNode() const
Definition: node.hxx:131
OUString m_sName
Definition: expfld.hxx:146
const SwExtendedSubType SUB_CMD
Show command.
Definition: fldbas.hxx:211
SwIndex & Assign(SwIndexReg *, sal_Int32)
Definition: index.cxx:206
RndStdIds GetAnchorId() const
Definition: fmtanchr.hxx:65
bool IsSequenceField() const
Definition: expfld.hxx:267
#define LANGUAGE_SYSTEM
const SwPosition * GetContentAnchor() const
Definition: fmtanchr.hxx:67
SwPageFrame * FindPageFrame()
Definition: frame.hxx:663
bool GetParaAttr(SfxItemSet &rSet, sal_Int32 nStt, sal_Int32 nEnd, const bool bOnlyTextAttr=false, const bool bGetFromChrFormat=true, const bool bMergeIndentValuesOfNumRule=false, SwRootFrame const *pLayout=nullptr) const
Query the attributes of textnode over the range.
Definition: thints.cxx:2110
#define FIELD_PROP_BOOL2
Definition: unofldmid.h:29
#define FIELD_PROP_USHORT2
Definition: unofldmid.h:32
SwFieldTypesEnum
List of FieldTypes at UI.
Definition: fldbas.hxx:93
FlyAnchors.
Definition: fmtanchr.hxx:34
const SvxPageUsage aArr[]
SwFieldIds
Definition: fldbas.hxx:44
const OUString & getContent() const
Definition: expfld.hxx:296
SwLayoutFrame * GetUpper()
Definition: frame.hxx:661
SwDoc * mpDoc
Definition: expfld.hxx:272
virtual void SetSubType(sal_uInt16 nType) override
Definition: expfld.cxx:413
void SetSeqFormat(sal_uLong nFormat)
Definition: expfld.cxx:556
SwFormatField * mpFormatField
Definition: expfld.hxx:208
virtual void SetPar1(const OUString &rStr) override
set condition
Definition: expfld.cxx:1384
sal_uInt16 GetWhichOfScript(sal_uInt16 nWhich, sal_uInt16 nScript)
Definition: hints.cxx:190
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
Definition: ndtxt.cxx:2775
void SetFormat(sal_uInt32 const nSet)
Definition: fldbas.hxx:303
virtual OUString GetFormula() const override
Definition: fldbas.cxx:737
virtual void PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: expfld.cxx:692
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
Definition: expfld.cxx:551
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: expfld.cxx:519
Marks a node in the document model.
Definition: ndindex.hxx:31
sal_uInt16 mnSeqNo
Definition: expfld.hxx:206
virtual OUString GetPar2() const override
Change formula.
Definition: expfld.cxx:398
SwDoc * GetDoc() const
Definition: fldbas.hxx:419
std::vector< SeqFieldLstElem > maData
Definition: expfld.hxx:59
bool IsAutomaticLanguage() const
Definition: fldbas.hxx:379
SwSetExpFieldType(SwDoc *pDoc, const OUString &rName, sal_uInt16 nType=nsSwGetSetExpType::GSE_EXPR)
Definition: expfld.cxx:508
SwFormatField * mpFormatField
Definition: expfld.hxx:290
A page of the document layout.
Definition: pagefrm.hxx:41
SwGetExpField(SwGetExpFieldType *, const OUString &rFormel, sal_uInt16 nSubType, sal_uLong nFormat)
Definition: expfld.cxx:283
#define DB_DELIM
Definition: swtypes.hxx:133
#define FIELD_PROP_PAR3
Definition: unofldmid.h:25
SwFieldType * GetTyp() const
Definition: fldbas.hxx:392
virtual OUString GetName() const override
Only in derived classes.
Definition: expfld.cxx:529
bool GetInputFlag() const
Definition: expfld.hxx:264
void SetSeqNumber(sal_uInt16 n)
Logical number, sequence fields.
Definition: expfld.hxx:242
static SwTextNode * GetFirstTextNode(const SwDoc &rDoc, SwPosition &rPos, const SwContentFrame *pCFrame, Point &rPt)
Definition: expfld.cxx:135
#define FIELD_PROP_BOOL1
Definition: unofldmid.h:28
Fields containing values that have to be formatted via number formatter.
Definition: fldbas.hxx:408
sal_uLong GetSeqFormat() const
Definition: expfld.cxx:564
SwSbxValue Calculate(const OUString &rStr)
Definition: calc.cxx:358
void SetFormatField(SwFormatField &rFormatField)
Definition: expfld.cxx:829
bool isAlphaNumeric(const OUString &rStr, sal_Int32 nPos) const
bool IsModifyLocked() const
Definition: calbck.hxx:207
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:80
const SwGetSetExpType GSE_SEQ
Sequence.
Definition: fldbas.hxx:204
bool m_bLateInitialization
Definition: expfld.hxx:90
SwContentFrame * FindLastBodyContent()
Searches the last ContentFrame in BodyText below the page.
Definition: findfrm.cxx:52
SwRowFrame * GetFirstNonHeadlineRow() const
Definition: tabfrm.cxx:5548
const SwTextNode * FindOutlineNodeOfLevel(sal_uInt8 nLvl, SwRootFrame const *pLayout=nullptr) const
Definition: node.cxx:771
OUString GetExpandText(SwRootFrame const *pLayout, const sal_Int32 nIdx=0, const sal_Int32 nLen=-1, const bool bWithNum=false, const bool bAddSpaceAfterListLabelStr=false, const bool bWithSpacesForLevel=false, const ExpandMode eAdditionalMode=ExpandMode::ExpandFootnote) const
add 4th optional parameter indicating, when that a spa...
Definition: ndtxt.cxx:3344
OUString maToolTip
Definition: expfld.hxx:286
virtual void SetLanguage(LanguageType nLng)
Definition: fldbas.cxx:413
general base class for all free-flowing frames
Definition: flyfrm.hxx:60
#define FIELD_PROP_BOOL3
Definition: unofldmid.h:35
#define FIELD_PROP_PAR1
Definition: unofldmid.h:23
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: expfld.cxx:269
virtual OUString GetName() const
Only in derived classes.
Definition: fldbas.cxx:136
bool isFormField() const
Definition: expfld.cxx:1332
sal_uInt16 m_nSubType
Definition: expfld.hxx:88
SwSetExpField(SwSetExpFieldType *, const OUString &rFormel, sal_uLong nFormat=0)
Definition: expfld.cxx:807
#define FIELD_PROP_PAR2
Definition: unofldmid.h:24
SwInputFieldType(SwDoc *pDoc)
Definition: expfld.cxx:1208
bool IsFieldDeletedInModel(IDocumentRedlineAccess const &rIDRA, SwTextField const &rTextField)
OUString maPText
Definition: expfld.hxx:284
virtual ~SwInputField() override
Definition: expfld.cxx:1234
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:254
SwFormatField * GetFormatField()
Definition: expfld.hxx:310
SwNodes & GetNodes()
Definition: doc.hxx:407
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
sal_uInt16 mnSubType
Definition: expfld.hxx:207
void SetInputFlag(bool bInp)
Definition: expfld.hxx:261
bool LockNotifyContentChange()
Definition: atrfld.cxx:618
virtual std::unique_ptr< SwField > Copy() const override
Definition: expfld.cxx:869
static const OUString & GetUIName(const OUString &rName, SwGetPoolIdFromName)
QPRO_FUNC_TYPE nType
virtual OUString GetFieldName() const
get name or content
Definition: fldbas.cxx:298
const SwGetSetExpType GSE_FORMULA
Formula.
Definition: fldbas.hxx:205
OUString GetContent(sal_uInt32 nFormat=0)
Definition: usrfld.cxx:274
bool IsHideRedlines() const
Replacement for sw::DocumentRedlineManager::GetRedlineFlags() (this is layout-level redline hiding)...
Definition: rootfrm.hxx:420
void InsertSort(std::vector< sal_uInt16 > &rArr, sal_uInt16 nIdx)
Definition: untbl.cxx:3010
static bool isAsciiNumeric(const OUString &rStr)
virtual void SetSubType(sal_uInt16 nSub) override
Definition: expfld.cxx:1429
virtual void CallSwClientNotify(const SfxHint &rHint) const override
Definition: calbck.cxx:363
virtual OUString GetFieldName() const override
Definition: expfld.cxx:848
const OUString & GetToolTip() const
Definition: expfld.cxx:1419
void UnlockNotifyContentChange()
Definition: atrfld.cxx:628
bool mbIsFormField
Definition: expfld.hxx:288
#define FIELD_PROP_PAR4
Definition: unofldmid.h:36
const SwGetSetExpType GSE_STRING
String.
Definition: fldbas.hxx:202
virtual void SetValue(const double &rVal)
Definition: fldbas.cxx:721
OUString msExpand
Definition: expfld.hxx:202
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame...
Definition: layfrm.hxx:35
virtual OUString GetPar2() const override
Query formula.
Definition: expfld.cxx:1030
sal_uInt16 m_nType
Definition: expfld.hxx:148
sal_uInt8 m_nLevel
Definition: expfld.hxx:149
OUString maHelp
Definition: expfld.hxx:285
static sal_Int16 lcl_SubTypeToAPI(sal_uInt16 nSubType)
Definition: expfld.cxx:65
const OUString & GetDelimiter() const
Number sequence fields chapterwise if required.
Definition: expfld.hxx:177
sal_uInt16 GetType() const
Definition: expfld.hxx:193
void ChangeExpansion(const SwFrame &, const SwTextField &)
For fields in header/footer/footnotes/flys: Only called by formatting!!
Definition: expfld.cxx:342
virtual void SetLanguage(LanguageType nLng) override
set language of the format
Definition: expfld.cxx:418
SwTextNode & GetTextNode() const
Definition: txtfld.hxx:53
const SwContentFrame * ContainsContent() const
Checks if the frame contains one or more ContentFrame's anywhere in his subsidiary structure; if so t...
Definition: findfrm.cxx:67
OUString ExpandValue(const double &rVal, sal_uInt32 nFormat, LanguageType nLng) const
Definition: fldbas.hxx:460
double m_fValueRLHidden
SwValueField; hidden redlines.
Definition: expfld.hxx:201
OUString m_sExpand
Definition: expfld.hxx:85
o3tl::strong_int< sal_Int32, struct Tag_TextFrameIndex > TextFrameIndex
Denotes a character index in a text frame at a layout level, after extent mapping from a text node at...
CharClass & GetAppCharClass()
Definition: init.cxx:708
const SwContentFrame * GetContentPos(Point &rPoint, const bool bDontLeave, const bool bBodyOnly=false, SwCursorMoveState *pCMS=nullptr, const bool bDefaultExpand=true) const
Finds the closest Content for the SPoint Is used for Pages, Flys and Cells if GetModelPositionForView...
Definition: trvlfrm.cxx:1185
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: expfld.cxx:1339
CollatorWrapper & GetAppCaseCollator()
Definition: init.cxx:752
SwInputField(SwInputFieldType *pFieldType, const OUString &rContent, const OUString &rPrompt, sal_uInt16 nSubType, sal_uLong nFormat=0, bool bIsFormField=true)
Direct input via dialog; delete old value.
Definition: expfld.cxx:1219
virtual double GetValue() const
Definition: fldbas.cxx:716
virtual void SetPar2(const OUString &rStr) override
Definition: expfld.cxx:1394
const SwTextNode & GetTextNode() const
Definition: txtftn.hxx:69
OUString maContent
Definition: expfld.hxx:283
aStr
SwContentNode * GoNext(SwNodeIndex *) const
Definition: nodes.cxx:1284
void SetFormatField(SwFormatField &rFormatField)
Definition: expfld.cxx:1238
virtual OUString GetPar2() const override
aPromptText
Definition: expfld.cxx:1399
bool IsFooterFrame() const
Definition: frame.hxx:1175
SwRootFrame * getRootFrame()
Definition: frame.hxx:662
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
T should be a subclass of SwHash.
Definition: calc.hxx:150
void Clear()
Definition: expfld.hxx:67
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: expfld.cxx:426
sal_uInt16 nPos
const SwAttrPool & GetAttrPool() const
Definition: doc.hxx:1319
virtual sal_uInt16 GetSubType() const override
Definition: expfld.cxx:1424
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:846
CollatorWrapper & GetAppCollator()
Definition: init.cxx:740
bool IsHeaderFrame() const
Definition: frame.hxx:1171
bool IsInHeadline(const SwFrame &rFrame) const
Definition: tabfrm.cxx:5529
void SetContent(const OUString &rStr, sal_uInt32 nFormat=0)
Definition: usrfld.cxx:290
size_t GetSeqFieldList(SwSeqFieldList &rList, SwRootFrame const *pLayout)
Definition: expfld.cxx:616
SwTabFrame * FindTabFrame()
Definition: frame.hxx:1080
#define FIELD_PROP_SHORT1
Definition: unofldmid.h:37
static const OUString & GetProgName(const OUString &rName, SwGetPoolIdFromName)
Base class of the Writer document model elements.
Definition: node.hxx:79