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>
28 #include <unotools/charclass.hxx>
29 #include <editeng/langitem.hxx>
30 #include <editeng/fontitem.hxx>
31 #include <com/sun/star/text/SetVariableType.hpp>
32 #include <unofield.hxx>
33 #include <frmfmt.hxx>
34 #include <fmtfld.hxx>
35 #include <txtfld.hxx>
36 #include <fmtanchr.hxx>
37 #include <txtftn.hxx>
38 #include <doc.hxx>
40 #include <layfrm.hxx>
41 #include <pagefrm.hxx>
42 #include <cntfrm.hxx>
43 #include <txtfrm.hxx>
44 #include <rootfrm.hxx>
45 #include <tabfrm.hxx>
46 #include <flyfrm.hxx>
47 #include <ftnfrm.hxx>
48 #include <rowfrm.hxx>
49 #include <expfld.hxx>
50 #include <usrfld.hxx>
51 #include <ndtxt.hxx>
52 #include <calc.hxx>
53 #include <pam.hxx>
54 #include <docfld.hxx>
55 #include <swtable.hxx>
56 #include <breakit.hxx>
57 #include <SwStyleNameMapper.hxx>
58 #include <unofldmid.h>
59 #include <numrule.hxx>
60 #include <calbck.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->GetCursorOfst( &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  if( pNew && RES_DOCPOS_UPDATE == pNew->Which() )
277  NotifyClients( nullptr, pNew );
278  // do not expand anything else
279 }
280 
281 SwGetExpField::SwGetExpField(SwGetExpFieldType* pTyp, const OUString& rFormel,
282  sal_uInt16 nSub, sal_uLong nFormat)
283  : SwFormulaField( pTyp, nFormat, 0.0 )
284  , m_fValueRLHidden(0.0)
285  ,
286  m_bIsInBodyText( true ),
287  m_nSubType(nSub),
288  m_bLateInitialization( false )
289 {
290  SetFormula( rFormel );
291 }
292 
293 void SwGetExpField::ChgExpStr(const OUString& rExpand, SwRootFrame const*const pLayout)
294 {
295  if (!pLayout || pLayout->IsHideRedlines())
296  {
297  m_sExpandRLHidden = rExpand;
298  }
299  if (!pLayout || !pLayout->IsHideRedlines())
300  {
301  m_sExpand = rExpand;
302  }
303 }
304 
305 OUString SwGetExpField::ExpandImpl(SwRootFrame const*const pLayout) const
306 {
308  return GetFormula();
309 
310  return (pLayout && pLayout->IsHideRedlines()) ? m_sExpandRLHidden : m_sExpand;
311 }
312 
314 {
315  const SwFieldTypesEnum nType =
319 
320  return SwFieldType::GetTypeStr(nType) + " " + GetFormula();
321 }
322 
323 std::unique_ptr<SwField> SwGetExpField::Copy() const
324 {
325  std::unique_ptr<SwGetExpField> pTmp(new SwGetExpField(static_cast<SwGetExpFieldType*>(GetTyp()),
327  pTmp->SetLanguage(GetLanguage());
328  pTmp->m_fValueRLHidden = m_fValueRLHidden;
329  pTmp->SwValueField::SetValue(GetValue());
330  pTmp->m_sExpand = m_sExpand;
331  pTmp->m_sExpandRLHidden = m_sExpandRLHidden;
332  pTmp->m_bIsInBodyText = m_bIsInBodyText;
333  pTmp->SetAutomaticLanguage(IsAutomaticLanguage());
335  pTmp->SetLateInitialization();
336 
337  return std::unique_ptr<SwField>(pTmp.release());
338 }
339 
340 void SwGetExpField::ChangeExpansion( const SwFrame& rFrame, const SwTextField& rField )
341 {
342  if( m_bIsInBodyText ) // only fields in Footer, Header, FootNote, Flys
343  return;
344 
345  OSL_ENSURE( !rFrame.IsInDocBody(), "Flag incorrect, frame is in DocBody" );
346 
347  // determine document (or is there an easier way?)
348  const SwTextNode* pTextNode = &rField.GetTextNode();
349  SwDoc& rDoc = *const_cast<SwDoc*>(pTextNode->GetDoc());
350 
351  // create index for determination of the TextNode
352  SwPosition aPos( SwNodeIndex( rDoc.GetNodes() ) );
353  pTextNode = GetBodyTextNode( rDoc, aPos, rFrame );
354 
355  // If no layout exists, ChangeExpansion is called for header and
356  // footer lines via layout formatting without existing TextNode.
357  if(!pTextNode)
358  return;
359  // #i82544#
361  {
363  if( pSetExpField )
364  {
365  m_bLateInitialization = false;
367  static_cast< SwSetExpFieldType* >(pSetExpField)->GetType() == nsSwGetSetExpType::GSE_STRING )
369  }
370  }
371 
372  SwRootFrame const& rLayout(*rFrame.getRootFrame());
373  OUString & rExpand(rLayout.IsHideRedlines() ? m_sExpandRLHidden : m_sExpand);
374  SetGetExpField aEndField( aPos.nNode, &rField, &aPos.nContent );
376  {
377  SwHashTable<HashStr> aHashTable(0);
378  rDoc.getIDocumentFieldsAccess().FieldsToExpand(aHashTable, aEndField, rLayout);
379  rExpand = LookString( aHashTable, GetFormula() );
380  }
381  else
382  {
383  // fill calculator with values
384  SwCalc aCalc( rDoc );
385  rDoc.getIDocumentFieldsAccess().FieldsToCalc(aCalc, aEndField, &rLayout);
386 
387  // calculate value
388  SetValue(aCalc.Calculate(GetFormula()).GetDouble(), &rLayout);
389 
390  // analyse based on format
391  rExpand = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue(
392  GetValue(&rLayout), GetFormat(), GetLanguage());
393  }
394 }
395 
396 OUString SwGetExpField::GetPar2() const
397 {
398  return GetFormula();
399 }
400 
401 void SwGetExpField::SetPar2(const OUString& rStr)
402 {
403  SetFormula(rStr);
404 }
405 
406 sal_uInt16 SwGetExpField::GetSubType() const
407 {
408  return m_nSubType;
409 }
410 
411 void SwGetExpField::SetSubType(sal_uInt16 nType)
412 {
413  m_nSubType = nType;
414 }
415 
417 {
419  SwField::SetLanguage(nLng);
420  else
422 }
423 
424 bool SwGetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
425 {
426  switch( nWhichId )
427  {
428  case FIELD_PROP_DOUBLE:
429  rAny <<= GetValue();
430  break;
431  case FIELD_PROP_FORMAT:
432  rAny <<= static_cast<sal_Int32>(GetFormat());
433  break;
434  case FIELD_PROP_USHORT1:
435  rAny <<= static_cast<sal_Int16>(m_nSubType);
436  break;
437  case FIELD_PROP_PAR1:
438  rAny <<= GetFormula();
439  break;
440  case FIELD_PROP_SUBTYPE:
441  {
442  sal_Int16 nRet = lcl_SubTypeToAPI(GetSubType() & 0xff);
443  rAny <<= nRet;
444  }
445  break;
446  case FIELD_PROP_BOOL2:
447  rAny <<= 0 != (m_nSubType & nsSwExtendedSubType::SUB_CMD);
448  break;
449  case FIELD_PROP_PAR4:
450  rAny <<= m_sExpand;
451  break;
452  default:
453  return SwField::QueryValue(rAny, nWhichId);
454  }
455  return true;
456 }
457 
458 bool SwGetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
459 {
460  sal_Int32 nTmp = 0;
461  switch( nWhichId )
462  {
463  case FIELD_PROP_DOUBLE:
464  SwValueField::SetValue(*o3tl::doAccess<double>(rAny));
465  m_fValueRLHidden = *o3tl::doAccess<double>(rAny);
466  break;
467  case FIELD_PROP_FORMAT:
468  rAny >>= nTmp;
469  SetFormat(nTmp);
470  break;
471  case FIELD_PROP_USHORT1:
472  rAny >>= nTmp;
473  m_nSubType = static_cast<sal_uInt16>(nTmp);
474  break;
475  case FIELD_PROP_PAR1:
476  {
477  OUString sTmp;
478  rAny >>= sTmp;
479  SetFormula(sTmp);
480  break;
481  }
482  case FIELD_PROP_SUBTYPE:
483  nTmp = lcl_APIToSubType(rAny);
484  if( nTmp >=0 )
485  SetSubType( static_cast<sal_uInt16>((GetSubType() & 0xff00) | nTmp));
486  break;
487  case FIELD_PROP_BOOL2:
488  if(*o3tl::doAccess<bool>(rAny))
490  else
492  break;
493  case FIELD_PROP_PAR4:
494  {
495  OUString sTmp;
496  rAny >>= sTmp;
497  ChgExpStr(sTmp, nullptr);
498  break;
499  }
500  default:
501  return SwField::PutValue(rAny, nWhichId);
502  }
503  return true;
504 }
505 
506 SwSetExpFieldType::SwSetExpFieldType( SwDoc* pDc, const OUString& rName, sal_uInt16 nTyp )
508  m_sName( rName ),
509  m_sDelim( "." ),
510  m_nType(nTyp), m_nLevel( UCHAR_MAX ),
511  m_bDeleted( false )
512 {
514  EnableFormat(false); // do not use Numberformatter
515 }
516 
517 std::unique_ptr<SwFieldType> SwSetExpFieldType::Copy() const
518 {
519  std::unique_ptr<SwSetExpFieldType> pNew(new SwSetExpFieldType(GetDoc(), m_sName, m_nType));
520  pNew->m_bDeleted = m_bDeleted;
521  pNew->m_sDelim = m_sDelim;
522  pNew->m_nLevel = m_nLevel;
523 
524  return pNew;
525 }
526 
528 {
529  return m_sName;
530 }
531 
532 const OUString& SwSetExpField::GetExpStr(SwRootFrame const*const pLayout) const
533 {
534  return (pLayout && pLayout->IsHideRedlines()) ? msExpandRLHidden : msExpand;
535 }
536 
537 void SwSetExpField::ChgExpStr(const OUString& rExpand, SwRootFrame const*const pLayout)
538 {
539  if (!pLayout || pLayout->IsHideRedlines())
540  {
541  msExpandRLHidden = rExpand;
542  }
543  if (!pLayout || !pLayout->IsHideRedlines())
544  {
545  msExpand = rExpand;
546  }
547 }
548 
550 {
551  // do not expand further
552 }
553 
555 {
557  for( SwFormatField* pFormatField = aIter.First(); pFormatField; pFormatField = aIter.Next() )
558  pFormatField->GetField()->ChangeFormat( nFormat );
559 }
560 
562 {
563  if( !HasWriterListeners() )
564  return SVX_NUM_ARABIC;
565 
566  const SwField *pField = SwIterator<SwFormatField,SwSetExpFieldType>(*this).First()->GetField();
567  return pField->GetFormat();
568 }
569 
571 {
573  return;
574 
575  std::vector<sal_uInt16> aArr;
576 
577  // check if number is already used and if a new one needs to be created
579  for( SwFormatField* pF = aIter.First(); pF; pF = aIter.Next() )
580  {
581  const SwTextNode* pNd;
582  if( pF->GetField() != &rField && pF->GetTextField() &&
583  nullptr != ( pNd = pF->GetTextField()->GetpTextNode() ) &&
584  pNd->GetNodes().IsDocNodes() )
585  {
586  InsertSort( aArr, static_cast<SwSetExpField*>(pF->GetField())->GetSeqNumber() );
587  }
588  }
589 
590  // check first if number already exists
591  sal_uInt16 nNum = rField.GetSeqNumber();
592  if( USHRT_MAX != nNum )
593  {
594  std::vector<sal_uInt16>::size_type n {0};
595 
596  for( n = 0; n < aArr.size(); ++n )
597  if( aArr[ n ] >= nNum )
598  break;
599 
600  if( n == aArr.size() || aArr[ n ] > nNum )
601  return; // no -> use it
602  }
603 
604  // flagged all numbers, so determine the right number
605  std::vector<sal_uInt16>::size_type n = aArr.size();
606  OSL_ENSURE( n <= std::numeric_limits<sal_uInt16>::max(), "Array is too big for using a sal_uInt16 index" );
607 
608  if ( n > 0 && aArr[ n-1 ] != n-1 )
609  {
610  for( n = 0; n < aArr.size(); ++n )
611  if( n != aArr[ n ] )
612  break;
613  }
614 
615  rField.SetSeqNumber( n );
616 }
617 
619  SwRootFrame const*const pLayout)
620 {
621  rList.Clear();
622 
623  IDocumentRedlineAccess const& rIDRA(GetDoc()->getIDocumentRedlineAccess());
624 
626  for( SwFormatField* pF = aIter.First(); pF; pF = aIter.Next() )
627  {
628  const SwTextNode* pNd;
629  if( pF->GetTextField() &&
630  nullptr != ( pNd = pF->GetTextField()->GetpTextNode() ) &&
631  pNd->GetNodes().IsDocNodes()
632  && (!pLayout || !pLayout->IsHideRedlines()
633  || !sw::IsFieldDeletedInModel(rIDRA, *pF->GetTextField())))
634  {
635  SeqFieldLstElem aNew(
636  pNd->GetExpandText(pLayout),
637  static_cast<SwSetExpField*>(pF->GetField())->GetSeqNumber() );
638  rList.InsertSort( aNew );
639  }
640  }
641 
642  return rList.Count();
643 }
644 
646  SwRootFrame const*const pLayout)
647 {
648  const SwTextNode* pTextNd = rNd.FindOutlineNodeOfLevel(m_nLevel, pLayout);
649  if( pTextNd )
650  {
651  SwNumRule * pRule = pTextNd->GetNumRule();
652 
653  if (pRule)
654  {
655  // --> OD 2005-11-02 #i51089 - TUNING#
656  if (SwNodeNum const*const pNum = pTextNd->GetNum(pLayout))
657  {
658  // only get the number, without pre-/post-fixstrings
659  OUString const sNumber(pRule->MakeNumString(*pNum, false));
660 
661  if( !sNumber.isEmpty() )
662  rField.ChgExpStr(sNumber + m_sDelim + rField.GetExpStr(pLayout), pLayout);
663  }
664  else
665  {
666  OSL_ENSURE(pTextNd->GetNum(nullptr), "<SwSetExpFieldType::SetChapter(..)> - text node with numbering rule, but without number. This is a serious defect");
667  }
668  }
669  }
670 }
671 
672 void SwSetExpFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
673 {
674  switch( nWhichId )
675  {
676  case FIELD_PROP_SUBTYPE:
677  {
678  sal_Int16 nRet = lcl_SubTypeToAPI(GetType());
679  rAny <<= nRet;
680  }
681  break;
682  case FIELD_PROP_PAR2:
683  rAny <<= GetDelimiter();
684  break;
685  case FIELD_PROP_SHORT1:
686  {
687  sal_Int8 nRet = m_nLevel < MAXLEVEL? m_nLevel : -1;
688  rAny <<= nRet;
689  }
690  break;
691  default:
692  assert(false);
693  }
694 }
695 
696 void SwSetExpFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
697 {
698  switch( nWhichId )
699  {
700  case FIELD_PROP_SUBTYPE:
701  {
702  sal_Int32 nSet = lcl_APIToSubType(rAny);
703  if(nSet >=0)
704  SetType(static_cast<sal_uInt16>(nSet));
705  }
706  break;
707  case FIELD_PROP_PAR2:
708  {
709  OUString sTmp;
710  rAny >>= sTmp;
711  if( !sTmp.isEmpty() )
712  SetDelimiter( sTmp );
713  else
714  SetDelimiter( " " );
715  }
716  break;
717  case FIELD_PROP_SHORT1:
718  {
719  sal_Int8 nLvl = 0;
720  rAny >>= nLvl;
721  if(nLvl < 0 || nLvl >= MAXLEVEL)
722  SetOutlineLvl(UCHAR_MAX);
723  else
724  SetOutlineLvl(nLvl);
725  }
726  break;
727  default:
728  assert(false);
729  }
730 }
731 
733 {
734  OUStringBuffer aBuf(aNew.sDlgEntry);
735  const sal_Int32 nLen = aBuf.getLength();
736  for (sal_Int32 i = 0; i < nLen; ++i)
737  {
738  if (aBuf[i]<' ')
739  {
740  aBuf[i]=' ';
741  }
742  }
743  aNew.sDlgEntry = aBuf.makeStringAndClear();
744 
745  size_t nPos = 0;
746  bool bRet = SeekEntry( aNew, &nPos );
747  if( !bRet )
748  maData.insert( maData.begin() + nPos, aNew );
749  return bRet;
750 }
751 
752 bool SwSeqFieldList::SeekEntry( const SeqFieldLstElem& rNew, size_t* pP ) const
753 {
754  size_t nO = maData.size();
755  size_t nU = 0;
756  if( nO > 0 )
757  {
758  CollatorWrapper & rCaseColl = ::GetAppCaseCollator(),
759  & rColl = ::GetAppCollator();
760  const CharClass& rCC = GetAppCharClass();
761 
762  //#59900# Sorting should sort number correctly (e.g. "10" after "9" not after "1")
763  const OUString rTmp2 = rNew.sDlgEntry;
764  sal_Int32 nFndPos2 = 0;
765  const OUString sNum2( rTmp2.getToken( 0, ' ', nFndPos2 ));
766  bool bIsNum2IsNumeric = CharClass::isAsciiNumeric( sNum2 );
767  sal_Int32 nNum2 = bIsNum2IsNumeric ? sNum2.toInt32() : 0;
768 
769  nO--;
770  while( nU <= nO )
771  {
772  const size_t nM = nU + ( nO - nU ) / 2;
773 
774  //#59900# Sorting should sort number correctly (e.g. "10" after "9" not after "1")
775  const OUString rTmp1 = maData[nM].sDlgEntry;
776  sal_Int32 nFndPos1 = 0;
777  const OUString sNum1( rTmp1.getToken( 0, ' ', nFndPos1 ));
778  sal_Int32 nCmp;
779 
780  if( bIsNum2IsNumeric && rCC.isNumeric( sNum1 ) )
781  {
782  sal_Int32 nNum1 = sNum1.toInt32();
783  nCmp = nNum2 - nNum1;
784  if( 0 == nCmp )
785  {
786  OUString aTmp1 = nFndPos1 != -1 ? rTmp1.copy(nFndPos1) : OUString();
787  OUString aTmp2 = nFndPos2 != -1 ? rTmp2.copy(nFndPos2) : OUString();
788  nCmp = rCaseColl.compareString(aTmp2, aTmp1);
789  }
790  }
791  else
792  nCmp = rColl.compareString( rTmp2, rTmp1 );
793 
794  if( 0 == nCmp )
795  {
796  if( pP ) *pP = nM;
797  return true;
798  }
799  else if( 0 < nCmp )
800  nU = nM + 1;
801  else if( nM == 0 )
802  break;
803  else
804  nO = nM - 1;
805  }
806  }
807  if( pP ) *pP = nU;
808  return false;
809 }
810 
811 SwSetExpField::SwSetExpField(SwSetExpFieldType* pTyp, const OUString& rFormel,
812  sal_uLong nFormat)
813  : SwFormulaField( pTyp, nFormat, 0.0 )
814  , m_fValueRLHidden(0.0)
815  , mnSeqNo( USHRT_MAX )
816  , mnSubType(0)
817  , mpFormatField(nullptr)
818 {
819  SetFormula(rFormel);
820  // ignore SubType
821  mbInput = false;
822  if( IsSequenceField() )
823  {
825  m_fValueRLHidden = 1.0;
826  if( rFormel.isEmpty() )
827  {
828  SetFormula(pTyp->GetName() + "+1");
829  }
830  }
831 }
832 
834 {
835  mpFormatField = &rFormatField;
836 }
837 
838 OUString SwSetExpField::ExpandImpl(SwRootFrame const*const pLayout) const
839 {
841  { // we need the CommandString
842  return GetTyp()->GetName() + " = " + GetFormula();
843  }
845  { // value is visible
846  return (pLayout && pLayout->IsHideRedlines()) ? msExpandRLHidden : msExpand;
847  }
848  return OUString();
849 }
850 
853 {
854  SwFieldTypesEnum const nStrType( (IsSequenceField())
856  : mbInput
859 
860  OUString aStr(
861  SwFieldType::GetTypeStr( nStrType )
862  + " "
863  + GetTyp()->GetName() );
864 
865  // Sequence: without formula
866  if (SwFieldTypesEnum::Sequence != nStrType)
867  {
868  aStr += " = " + GetFormula();
869  }
870  return aStr;
871 }
872 
873 std::unique_ptr<SwField> SwSetExpField::Copy() const
874 {
875  std::unique_ptr<SwSetExpField> pTmp(new SwSetExpField(static_cast<SwSetExpFieldType*>(GetTyp()),
876  GetFormula(), GetFormat()));
877  pTmp->SwValueField::SetValue(GetValue());
878  pTmp->m_fValueRLHidden = m_fValueRLHidden;
879  pTmp->msExpand = msExpand;
880  pTmp->msExpandRLHidden = msExpandRLHidden;
881  pTmp->SetAutomaticLanguage(IsAutomaticLanguage());
882  pTmp->SetLanguage(GetLanguage());
883  pTmp->maPText = maPText;
884  pTmp->mbInput = mbInput;
885  pTmp->mnSeqNo = mnSeqNo;
886  pTmp->SetSubType(GetSubType());
887 
888  return std::unique_ptr<SwField>(pTmp.release());
889 }
890 
891 void SwSetExpField::SetSubType(sal_uInt16 nSub)
892 {
893  static_cast<SwSetExpFieldType*>(GetTyp())->SetType(nSub & 0xff);
894  mnSubType = nSub & 0xff00;
895 
896  OSL_ENSURE( (nSub & 0xff) != 3, "SubType is illegal!" );
897 }
898 
899 sal_uInt16 SwSetExpField::GetSubType() const
900 {
901  return static_cast<SwSetExpFieldType*>(GetTyp())->GetType() | mnSubType;
902 }
903 
904 void SwSetExpField::SetValue( const double& rAny )
905 {
907 
908  if( IsSequenceField() )
909  msExpand = FormatNumber( GetValue(), static_cast<SvxNumType>(GetFormat()), GetLanguage() );
910  else
911  msExpand = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue( rAny,
912  GetFormat(), GetLanguage());
913 }
914 
915 void SwSetExpField::SetValue(const double& rValue, SwRootFrame const*const pLayout)
916 {
917  if (!pLayout || !pLayout->IsHideRedlines())
918  {
919  SetValue(rValue);
920  }
921  if (!pLayout || pLayout->IsHideRedlines())
922  {
923  m_fValueRLHidden = rValue;
924  if (IsSequenceField())
925  {
926  msExpandRLHidden = FormatNumber(rValue, static_cast<SvxNumType>(GetFormat()), GetLanguage());
927  }
928  else
929  {
931  rValue, GetFormat(), GetLanguage());
932  }
933  }
934 }
935 
936 double SwSetExpField::GetValue(SwRootFrame const* pLayout) const
937 {
938  return (pLayout && pLayout->IsHideRedlines()) ? m_fValueRLHidden : GetValue();
939 }
940 
941 void SwGetExpField::SetValue( const double& rAny )
942 {
944  m_sExpand = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue( rAny, GetFormat(),
945  GetLanguage());
946 }
947 
948 void SwGetExpField::SetValue(const double& rValue, SwRootFrame const*const pLayout)
949 {
950  if (!pLayout || !pLayout->IsHideRedlines())
951  {
952  SetValue(rValue);
953  }
954  if (!pLayout || pLayout->IsHideRedlines())
955  {
956  m_fValueRLHidden = rValue;
958  rValue, GetFormat(), GetLanguage());
959  }
960 }
961 
962 double SwGetExpField::GetValue(SwRootFrame const* pLayout) const
963 {
964  return (pLayout && pLayout->IsHideRedlines()) ? m_fValueRLHidden : GetValue();
965 }
966 
974 sal_Int32 SwGetExpField::GetReferenceTextPos( const SwFormatField& rFormat, SwDoc& rDoc, sal_Int32 nHint)
975 {
976 
977  const SwTextField* pTextField = rFormat.GetTextField();
978  const SwTextNode& rTextNode = pTextField->GetTextNode();
979 
980  sal_Int32 nRet = nHint ? nHint : pTextField->GetStart() + 1;
981  OUString sNodeText = rTextNode.GetText();
982 
983  if(nRet<sNodeText.getLength())
984  {
985  sNodeText = sNodeText.copy(nRet);
986 
987  // now check if sNodeText starts with a non-alphanumeric character plus blanks
988  sal_uInt16 nSrcpt = g_pBreakIt->GetRealScriptOfText( sNodeText, 0 );
989 
990  static const sal_uInt16 nIds[] =
991  {
998  0, 0
999  };
1000  SwAttrSet aSet(rDoc.GetAttrPool(), nIds);
1001  rTextNode.GetParaAttr(aSet, nRet, nRet+1);
1002 
1003  if( RTL_TEXTENCODING_SYMBOL != static_cast<const SvxFontItem&>(aSet.Get(
1004  GetWhichOfScript( RES_CHRATR_FONT, nSrcpt )) ).GetCharSet() )
1005  {
1006  LanguageType eLang = static_cast<const SvxLanguageItem&>(aSet.Get(
1008  LanguageTag aLanguageTag( eLang);
1009  CharClass aCC( aLanguageTag);
1010  sal_Unicode c0 = sNodeText[0];
1011  bool bIsAlphaNum = aCC.isAlphaNumeric( sNodeText, 0 );
1012  if( !bIsAlphaNum ||
1013  (c0 == ' ' || c0 == '\t'))
1014  {
1015  // ignoring blanks
1016  nRet++;
1017  const sal_Int32 nLen = sNodeText.getLength();
1018  for (sal_Int32 i = 1;
1019  i<nLen && (sNodeText[i]==' ' || sNodeText[i]=='\t');
1020  ++i
1021  )
1022  ++nRet;
1023  }
1024  }
1025  }
1026  return nRet;
1027 }
1028 
1029 OUString SwSetExpField::GetPar1() const
1030 {
1031  return static_cast<const SwSetExpFieldType*>(GetTyp())->GetName();
1032 }
1033 
1034 OUString SwSetExpField::GetPar2() const
1035 {
1036  sal_uInt16 nType = static_cast<SwSetExpFieldType*>(GetTyp())->GetType();
1037 
1038  if (nType & nsSwGetSetExpType::GSE_STRING)
1039  return GetFormula();
1040  return GetExpandedFormula();
1041 }
1042 
1043 void SwSetExpField::SetPar2(const OUString& rStr)
1044 {
1045  sal_uInt16 nType = static_cast<SwSetExpFieldType*>(GetTyp())->GetType();
1046 
1047  if( !(nType & nsSwGetSetExpType::GSE_SEQ) || !rStr.isEmpty() )
1048  {
1049  if (nType & nsSwGetSetExpType::GSE_STRING)
1050  SetFormula(rStr);
1051  else
1052  SetExpandedFormula(rStr);
1053  }
1054 }
1055 
1056 bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
1057 {
1058  sal_Int32 nTmp32 = 0;
1059  sal_Int16 nTmp16 = 0;
1060  switch( nWhichId )
1061  {
1062  case FIELD_PROP_BOOL2:
1063  if(*o3tl::doAccess<bool>(rAny))
1065  else
1067  break;
1068  case FIELD_PROP_FORMAT:
1069  rAny >>= nTmp32;
1070  SetFormat(nTmp32);
1071  break;
1072  case FIELD_PROP_USHORT2:
1073  {
1074  rAny >>= nTmp16;
1075  if(nTmp16 <= css::style::NumberingType::NUMBER_NONE )
1076  SetFormat(nTmp16);
1077  else {
1078  //exception(wrong_value)
1079  ;
1080  }
1081  }
1082  break;
1083  case FIELD_PROP_USHORT1:
1084  rAny >>= nTmp16;
1085  mnSeqNo = nTmp16;
1086  break;
1087  case FIELD_PROP_PAR1:
1088  {
1089  OUString sTmp;
1090  rAny >>= sTmp;
1092  }
1093  break;
1094  case FIELD_PROP_PAR2:
1095  {
1096  OUString uTmp;
1097  rAny >>= uTmp;
1098  //I18N - if the formula contains only "TypeName+1"
1099  //and it's one of the initially created sequence fields
1100  //then the localized names has to be replaced by a programmatic name
1101  OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, uTmp, false);
1102  SetFormula( sMyFormula );
1103  }
1104  break;
1105  case FIELD_PROP_DOUBLE:
1106  {
1107  double fVal = 0.0;
1108  rAny >>= fVal;
1109  SetValue(fVal);
1110  m_fValueRLHidden = fVal;
1111  }
1112  break;
1113  case FIELD_PROP_SUBTYPE:
1114  nTmp32 = lcl_APIToSubType(rAny);
1115  if(nTmp32 >= 0)
1116  SetSubType(static_cast<sal_uInt16>((GetSubType() & 0xff00) | nTmp32));
1117  break;
1118  case FIELD_PROP_PAR3:
1119  rAny >>= maPText;
1120  break;
1121  case FIELD_PROP_BOOL3:
1122  if(*o3tl::doAccess<bool>(rAny))
1124  else
1126  break;
1127  case FIELD_PROP_BOOL1:
1128  {
1129  bool newInput(*o3tl::doAccess<bool>(rAny));
1130  if (newInput != GetInputFlag())
1131  {
1132  if (static_cast<SwSetExpFieldType*>(GetTyp())->GetType()
1134  {
1136  }
1137  else
1138  {
1139  SetInputFlag(newInput);
1140  }
1141  }
1142  }
1143  break;
1144  case FIELD_PROP_PAR4:
1145  {
1146  OUString sTmp;
1147  rAny >>= sTmp;
1148  ChgExpStr(sTmp, nullptr);
1149  }
1150  break;
1151  default:
1152  return SwField::PutValue(rAny, nWhichId);
1153  }
1154  return true;
1155 }
1156 
1157 bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
1158 {
1159  switch( nWhichId )
1160  {
1161  case FIELD_PROP_BOOL2:
1163  break;
1164  case FIELD_PROP_FORMAT:
1165  rAny <<= static_cast<sal_Int32>(GetFormat());
1166  break;
1167  case FIELD_PROP_USHORT2:
1168  rAny <<= static_cast<sal_Int16>(GetFormat());
1169  break;
1170  case FIELD_PROP_USHORT1:
1171  rAny <<= static_cast<sal_Int16>(mnSeqNo);
1172  break;
1173  case FIELD_PROP_PAR1:
1175  break;
1176  case FIELD_PROP_PAR2:
1177  {
1178  //I18N - if the formula contains only "TypeName+1"
1179  //and it's one of the initially created sequence fields
1180  //then the localized names has to be replaced by a programmatic name
1181  OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, GetFormula(), true);
1182  rAny <<= sMyFormula;
1183  }
1184  break;
1185  case FIELD_PROP_DOUBLE:
1186  rAny <<= GetValue();
1187  break;
1188  case FIELD_PROP_SUBTYPE:
1189  {
1190  sal_Int16 nRet = lcl_SubTypeToAPI(GetSubType() & 0xff);
1191  rAny <<= nRet;
1192  }
1193  break;
1194  case FIELD_PROP_PAR3:
1195  rAny <<= maPText;
1196  break;
1197  case FIELD_PROP_BOOL3:
1198  rAny <<= 0 != (mnSubType & nsSwExtendedSubType::SUB_CMD);
1199  break;
1200  case FIELD_PROP_BOOL1:
1201  rAny <<= GetInputFlag();
1202  break;
1203  case FIELD_PROP_PAR4:
1204  rAny <<= GetExpStr(nullptr);
1205  break;
1206  default:
1207  return SwField::QueryValue(rAny, nWhichId);
1208  }
1209  return true;
1210 }
1211 
1214  , mpDoc( pD )
1215 {
1216 }
1217 
1218 std::unique_ptr<SwFieldType> SwInputFieldType::Copy() const
1219 {
1220  return std::make_unique<SwInputFieldType>( mpDoc );
1221 }
1222 
1224  const OUString& rContent,
1225  const OUString& rPrompt,
1226  sal_uInt16 nSub,
1227  sal_uLong nFormat,
1228  bool bIsFormField )
1229  : SwField( pFieldType, nFormat, LANGUAGE_SYSTEM, false )
1230  , maContent(rContent)
1231  , maPText(rPrompt)
1232  , mnSubType(nSub)
1233  , mbIsFormField( bIsFormField )
1234  , mpFormatField( nullptr )
1235 {
1236 }
1237 
1239 {
1240 }
1241 
1243 {
1244  mpFormatField = &rFormatField;
1245 }
1246 
1247 
1248 void SwInputField::applyFieldContent( const OUString& rNewFieldContent )
1249 {
1250  if ( (mnSubType & 0x00ff) == INP_TXT )
1251  {
1252  maContent = rNewFieldContent;
1253  }
1254  else if( (mnSubType & 0x00ff) == INP_USR )
1255  {
1256  SwUserFieldType* pUserTyp = static_cast<SwUserFieldType*>(
1257  static_cast<SwInputFieldType*>(GetTyp())->GetDoc()->getIDocumentFieldsAccess().GetFieldType( SwFieldIds::User, getContent(), false ) );
1258  if( pUserTyp )
1259  {
1260  pUserTyp->SetContent( rNewFieldContent );
1261  if (!pUserTyp->IsModifyLocked())
1262  {
1263  // trigger update of the corresponding User Fields and other
1264  // related Input Fields
1265  bool bUnlock(false);
1266  if (GetFormatField() != nullptr)
1267  {
1268  SwTextInputField *const pTextInputField =
1269  dynamic_cast<SwTextInputField*>(GetFormatField()->GetTextField());
1270  if (pTextInputField != nullptr)
1271  {
1272  bUnlock = pTextInputField->LockNotifyContentChange();
1273  }
1274  }
1275  pUserTyp->UpdateFields();
1276  if (bUnlock)
1277  {
1278  SwTextInputField *const pTextInputField =
1279  dynamic_cast<SwTextInputField*>(GetFormatField()->GetTextField());
1280  if (pTextInputField != nullptr)
1281  {
1282  pTextInputField->UnlockNotifyContentChange();
1283  }
1284  }
1285  }
1286  }
1287  }
1288 }
1289 
1291 {
1292  OUString aStr(SwField::GetFieldName());
1293  if ((mnSubType & 0x00ff) == INP_USR)
1294  {
1295  aStr += GetTyp()->GetName() + " " + getContent();
1296  }
1297  return aStr;
1298 }
1299 
1300 std::unique_ptr<SwField> SwInputField::Copy() const
1301 {
1302  std::unique_ptr<SwInputField> pField(
1303  new SwInputField(
1304  static_cast<SwInputFieldType*>(GetTyp()),
1305  getContent(),
1306  maPText,
1307  GetSubType(),
1308  GetFormat(),
1309  mbIsFormField ));
1310 
1311  pField->SetHelp( maHelp );
1312  pField->SetToolTip( maToolTip );
1313 
1314  pField->SetAutomaticLanguage(IsAutomaticLanguage());
1315  return std::unique_ptr<SwField>(pField.release());
1316 }
1317 
1318 OUString SwInputField::ExpandImpl(SwRootFrame const*const) const
1319 {
1320  if((mnSubType & 0x00ff) == INP_TXT)
1321  {
1322  return getContent();
1323  }
1324 
1325  if( (mnSubType & 0x00ff) == INP_USR )
1326  {
1327  SwUserFieldType* pUserTyp = static_cast<SwUserFieldType*>(
1328  static_cast<SwInputFieldType*>(GetTyp())->GetDoc()->getIDocumentFieldsAccess().GetFieldType( SwFieldIds::User, getContent(), false ) );
1329  if( pUserTyp )
1330  return pUserTyp->GetContent();
1331  }
1332 
1333  return OUString();
1334 }
1335 
1337 {
1338  return mbIsFormField
1339  || !maHelp.isEmpty()
1340  || !maToolTip.isEmpty();
1341 }
1342 
1343 bool SwInputField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
1344 {
1345  switch( nWhichId )
1346  {
1347  case FIELD_PROP_PAR1:
1348  rAny <<= getContent();
1349  break;
1350  case FIELD_PROP_PAR2:
1351  rAny <<= maPText;
1352  break;
1353  case FIELD_PROP_PAR3:
1354  rAny <<= maHelp;
1355  break;
1356  case FIELD_PROP_PAR4:
1357  rAny <<= maToolTip;
1358  break;
1359  default:
1360  assert(false);
1361  }
1362  return true;
1363 }
1364 
1365 bool SwInputField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
1366 {
1367  switch( nWhichId )
1368  {
1369  case FIELD_PROP_PAR1:
1370  rAny >>= maContent;
1371  break;
1372  case FIELD_PROP_PAR2:
1373  rAny >>= maPText;
1374  break;
1375  case FIELD_PROP_PAR3:
1376  rAny >>= maHelp;
1377  break;
1378  case FIELD_PROP_PAR4:
1379  rAny >>= maToolTip;
1380  break;
1381  default:
1382  assert(false);
1383  }
1384  return true;
1385 }
1386 
1388 void SwInputField::SetPar1(const OUString& rStr)
1389 {
1390  maContent = rStr;
1391 }
1392 
1393 OUString SwInputField::GetPar1() const
1394 {
1395  return getContent();
1396 }
1397 
1398 void SwInputField::SetPar2(const OUString& rStr)
1399 {
1400  maPText = rStr;
1401 }
1402 
1403 OUString SwInputField::GetPar2() const
1404 {
1405  return maPText;
1406 }
1407 
1408 void SwInputField::SetHelp(const OUString & rStr)
1409 {
1410  maHelp = rStr;
1411 }
1412 
1413 const OUString& SwInputField::GetHelp() const
1414 {
1415  return maHelp;
1416 }
1417 
1418 void SwInputField::SetToolTip(const OUString & rStr)
1419 {
1420  maToolTip = rStr;
1421 }
1422 
1423 const OUString& SwInputField::GetToolTip() const
1424 {
1425  return maToolTip;
1426 }
1427 
1428 sal_uInt16 SwInputField::GetSubType() const
1429 {
1430  return mnSubType;
1431 }
1432 
1433 void SwInputField::SetSubType(sal_uInt16 nSub)
1434 {
1435  mnSubType = nSub;
1436 }
1437 
1438 /* 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:891
Instances of SwFields and those derived from it occur 0 to n times.
Definition: fldbas.hxx:234
Base class of the Writer layout elements.
Definition: frame.hxx:295
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:149
void SetDelimiter(const OUString &s)
Definition: expfld.hxx:178
Definition: calc.hxx:184
bool IsFollow() const
Definition: flowfrm.hxx:166
The shared part of a user field.
Definition: usrfld.hxx:35
void GetContentPosition(const Point &rPt, SwPosition &rPos) const
Same as SwLayoutFrame::GetContentPos().
Definition: trvlfrm.cxx:1375
bool mbInput
Definition: expfld.hxx:205
Marks a position in the document model.
Definition: pam.hxx:35
#define RES_CHRATR_CJK_LANGUAGE
Definition: hintids.hxx:93
sal_Int32 compareString(const OUString &s1, const OUString &s2) const
bool IsInDocBody() const
Definition: frame.hxx:919
const SwNodeNum * GetNum(SwRootFrame const *pLayout=nullptr) const
Definition: ndtxt.cxx:3967
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: expfld.cxx:458
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: expfld.cxx:1318
LanguageType GetLanguage() const
Language at field position.
Definition: fldbas.hxx:393
bool isNumeric(const OUString &rStr) const
OUString MakeNumString(const SwNodeNum &, bool bInclStrings=true) const
Definition: number.cxx:610
#define RES_CHRATR_LANGUAGE
Definition: hintids.hxx:79
const OUString & GetText() const
Definition: ndtxt.hxx:210
void SetType(sal_uInt16 nTyp)
Definition: expfld.hxx:187
void EnableFormat(bool bFormat=true)
Definition: fldbas.hxx:420
sal_uInt32 GetFormat() const
Query parameters for dialog and for BASIC.
Definition: fldbas.hxx:388
const SwExtendedSubType SUB_INVISIBLE
Invisible.
Definition: fldbas.hxx:206
signed char sal_Int8
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
pool item to which the SwSetExpField belongs
Definition: expfld.cxx:838
virtual SwFieldType * GetFieldType(SwFieldIds nResId, const OUString &rName, bool bDbFieldMatching) const =0
void ChgExpStr(const OUString &rExpand, SwRootFrame const *pLayout)
Definition: expfld.cxx:537
const SwTable * GetTable() const
Definition: tabfrm.hxx:144
SwNodeIndex nNode
Definition: pam.hxx:37
sal_uInt16 mnSubType
Definition: expfld.hxx:287
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
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: expfld.cxx:1365
virtual void SetValue(const double &rVal) override
Definition: expfld.cxx:941
const OUString & GetExpStr(SwRootFrame const *pLayout) const
Definition: expfld.cxx:532
static OUString LocalizeFormula(const SwSetExpField &rField, const OUString &rFormula, bool bQuery)
Definition: unofield.cxx:1054
Base class of all fields.
Definition: fldbas.hxx:280
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
Definition: doc.hxx:185
TElementType * Next()
Definition: calbck.hxx:373
aBuf
OUString sDlgEntry
Definition: expfld.hxx:49
#define RES_CHRATR_FONT
Definition: hintids.hxx:76
const ScDocument * mpDoc
SwNode & GetNode() const
Definition: ndindex.hxx:119
bool InsertSort(SeqFieldLstElem aNew)
Definition: expfld.cxx:732
sal_uInt16 GetRowsToRepeat() const
Definition: swtable.hxx:193
void Pos(const Point &rNew)
Definition: swrect.hxx:167
#define RES_CHRATR_CJK_FONT
Definition: hintids.hxx:91
SwContentFrame * FindFirstBodyContent()
Definition: pagefrm.hxx:333
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:899
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:333
void SetSeqRefNo(SwSetExpField &rField)
Definition: expfld.cxx:570
#define RES_DOCPOS_UPDATE
Definition: hintids.hxx:293
bool HasWriterListeners() const
Definition: calbck.hxx:208
The root element of a Writer document layout.
Definition: rootfrm.hxx:79
virtual OUString GetPar1() const override
Content.
Definition: expfld.cxx:1393
bool IsFootnoteFrame() const
Definition: frame.hxx:1178
virtual void SetPar2(const OUString &rStr) override
Definition: expfld.cxx:1043
#define FIELD_PROP_SUBTYPE
Definition: unofldmid.h:27
virtual void SetPar2(const OUString &rStr) override
Definition: expfld.cxx:401
bool isFrameAreaDefinitionValid() const
Definition: frame.hxx:167
sal_uInt16 GetRealScriptOfText(const OUString &rText, sal_Int32 nPos) const
Definition: breakit.cxx:83
const OUString & GetHelp() const
Definition: expfld.cxx:1413
double m_fValueRLHidden
SwValueField; hidden redlines.
Definition: expfld.hxx:84
OUString GetExpandedFormula() const
Definition: fldbas.cxx:727
virtual void QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: expfld.cxx:672
#define FIELD_PROP_FORMAT
Definition: unofldmid.h:26
void UpdateFields() const
Definition: fldbas.hxx:272
OUString maPText
Definition: expfld.hxx:204
void SetChapter(SwSetExpField &rField, const SwNode &rNd, SwRootFrame const *pLayout)
Definition: expfld.cxx:645
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
Definition: doc.cxx:356
virtual void Modify(const SfxPoolItem *pOld, const SfxPoolItem *pNew) override
Overlay, because get-field cannot be changed and therefore does not need to be updated.
Definition: expfld.cxx:274
sal_uInt16 sal_Unicode
bool IsFlyFrame() const
Definition: frame.hxx:1186
static void TransmuteLeadToInputField(SwSetExpField &rField)
Convert between SwSetExpField with InputFlag false and InputFlag true.
Definition: unofield.cxx:1299
size_t Count()
Definition: expfld.hxx:64
OUString ReplacePoint(const OUString &rTmpName, bool bWithCommandType)
Definition: expfld.cxx:104
def Input(s)
void applyFieldContent(const OUString &rNewFieldContent)
Definition: expfld.cxx:1248
OUString m_sExpandRLHidden
hidden redlines
Definition: expfld.hxx:86
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: expfld.cxx:305
SwIndex nContent
Definition: pam.hxx:38
const SwRect & getFrameArea() const
Definition: frame.hxx:175
virtual std::unique_ptr< SwField > Copy() const override
Definition: expfld.cxx:323
const SwTextField * GetTextField() const
Definition: fmtfld.hxx:88
bool SeekEntry(const SeqFieldLstElem &rNew, size_t *pPos) const
Definition: expfld.cxx:752
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: expfld.cxx:1218
void ChgExpStr(const OUString &rExpand, SwRootFrame const *pLayout)
Definition: expfld.cxx:293
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhichId)
Definition: fldbas.cxx:306
SwBreakIt * g_pBreakIt
Definition: breakit.cxx:33
SVX_NUM_ARABIC
virtual OUString GetPar1() const override
Query name only.
Definition: expfld.cxx:1029
bool IsTextFrame() const
Definition: frame.hxx:1210
sal_Int32 GetStart() const
Definition: txatbase.hxx:82
const sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:95
bool const mbIsFormField
Definition: expfld.hxx:288
static sal_Int32 lcl_APIToSubType(const uno::Any &rAny)
Definition: expfld.cxx:86
SwDoc *const mpDoc
Definition: expfld.hxx:272
void SetToolTip(const OUString &rStr)
Definition: expfld.cxx:1418
virtual void SetLanguage(LanguageType nLng) override
set language of the format
Definition: fldbas.cxx:625
virtual void SetValue(const double &rVal) override
Definition: expfld.cxx:904
OUString FormatNumber(sal_uInt32 nNum, SvxNumType nFormat, LanguageType nLang)
expand numbering
Definition: fldbas.cxx:436
OUString m_sDelim
Definition: expfld.hxx:147
void SetHelp(const OUString &rStr)
Definition: expfld.cxx:1408
void SetExpandedFormula(const OUString &rStr)
Definition: fldbas.cxx:708
virtual OUString GetFieldName() const override
get name or content
Definition: expfld.cxx:1290
#define FIELD_PROP_DOUBLE
Definition: unofldmid.h:34
const SwGetSetExpType GSE_EXPR
Expression.
Definition: fldbas.hxx:197
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhichId) const
Definition: fldbas.cxx:293
virtual OUString GetFieldName() const override
get name or content
Definition: expfld.cxx:313
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: expfld.cxx:1056
sal_uInt16 GetSeqNumber() const
Definition: expfld.hxx:243
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
Definition: ndarr.hxx:164
sal_Int32 m_nLevel
void SetFormula(const OUString &rStr)
Definition: fldbas.cxx:693
double GetDouble() const
Definition: calc.cxx:1410
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:974
virtual void SetPar1(const OUString &rStr)
Definition: fldbas.cxx:278
static OUString GetTypeStr(SwFieldTypesEnum nTypeId)
Definition: fldbas.cxx:120
Style of a layout element.
Definition: frmfmt.hxx:57
virtual std::unique_ptr< SwField > Copy() const override
Definition: expfld.cxx:1300
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: expfld.cxx:1157
const SwFormatAnchor & GetAnchor(bool=true) const
Definition: fmtanchr.hxx:81
#define RES_CHRATR_CTL_FONT
Definition: hintids.hxx:96
virtual sal_uInt16 GetSubType() const override
Definition: expfld.cxx:406
bool m_bIsInBodyText
Definition: expfld.hxx:87
long AdjustY(long nVertMove)
const SwStartNode * StartOfSectionNode() const
Definition: node.hxx:131
const SwExtendedSubType SUB_CMD
Show command.
Definition: fldbas.hxx:205
SwIndex & Assign(SwIndexReg *, sal_Int32)
Definition: index.cxx:198
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:658
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:2062
#define FIELD_PROP_BOOL2
Definition: unofldmid.h:29
TElementType * First()
Definition: calbck.hxx:342
int i
QPRO_FUNC_TYPE const nType
#define FIELD_PROP_USHORT2
Definition: unofldmid.h:32
SwFieldTypesEnum
List of FieldTypes at UI.
Definition: fldbas.hxx:87
FlyAnchors.
Definition: fmtanchr.hxx:34
SwFieldIds
Definition: fldbas.hxx:38
const OUString & getContent() const
Definition: expfld.hxx:296
SwLayoutFrame * GetUpper()
Definition: frame.hxx:656
virtual void Modify(const SfxPoolItem *pOld, const SfxPoolItem *pNew) override
Definition: expfld.cxx:549
virtual void SetSubType(sal_uInt16 nType) override
Definition: expfld.cxx:411
void SetSeqFormat(sal_uLong nFormat)
Definition: expfld.cxx:554
OUString const m_sName
Definition: expfld.hxx:146
SwFormatField * mpFormatField
Definition: expfld.hxx:208
virtual void SetPar1(const OUString &rStr) override
set condition
Definition: expfld.cxx:1388
sal_uInt16 GetWhichOfScript(sal_uInt16 nWhich, sal_uInt16 nScript)
Definition: hints.cxx:195
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
Definition: ndtxt.cxx:2813
void SetFormat(sal_uInt32 const nSet)
Definition: fldbas.hxx:294
virtual OUString GetFormula() const override
Definition: fldbas.cxx:688
virtual void PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: expfld.cxx:696
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: expfld.cxx:517
Marks a node in the document model.
Definition: ndindex.hxx:31
SwNodes & GetNodes()
Node is in which nodes-array/doc?
Definition: node.hxx:693
sal_uInt16 mnSeqNo
Definition: expfld.hxx:206
virtual OUString GetPar2() const override
Change formula.
Definition: expfld.cxx:396
SwDoc * GetDoc() const
Definition: fldbas.hxx:410
std::vector< SeqFieldLstElem > maData
Definition: expfld.hxx:59
bool IsAutomaticLanguage() const
Definition: fldbas.hxx:370
SwSetExpFieldType(SwDoc *pDoc, const OUString &rName, sal_uInt16 nType=nsSwGetSetExpType::GSE_EXPR)
Definition: expfld.cxx:506
SwFormatField * mpFormatField
Definition: expfld.hxx:290
A page of the document layout.
Definition: pagefrm.hxx:40
SwGetExpField(SwGetExpFieldType *, const OUString &rFormel, sal_uInt16 nSubType, sal_uLong nFormat)
Definition: expfld.cxx:281
virtual bool GetCursorOfst(SwPosition *, Point &, SwCursorMoveState *=nullptr, bool bTestBackground=false) const
Definition: unusedf.cxx:46
#define DB_DELIM
Definition: swtypes.hxx:141
#define FIELD_PROP_PAR3
Definition: unofldmid.h:25
SwFieldType * GetTyp() const
Definition: fldbas.hxx:383
virtual OUString GetName() const override
Only in derived classes.
Definition: expfld.cxx:527
bool GetInputFlag() const
Definition: expfld.hxx:264
void NotifyClients(const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue)
Definition: calbck.cxx:167
virtual void FieldsToCalc(SwCalc &rCalc, sal_uLong nLastNd, sal_uInt16 nLastCnt)=0
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:399
sal_uLong GetSeqFormat() const
Definition: expfld.cxx:561
SwSbxValue Calculate(const OUString &rStr)
Definition: calc.cxx:347
void SetFormatField(SwFormatField &rFormatField)
Definition: expfld.cxx:833
bool isAlphaNumeric(const OUString &rStr, sal_Int32 nPos) const
bool IsModifyLocked() const
Definition: calbck.hxx:218
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
const SwGetSetExpType GSE_SEQ
Sequence.
Definition: fldbas.hxx:198
bool m_bLateInitialization
Definition: expfld.hxx:90
SwContentFrame * FindLastBodyContent()
Searches the last ContentFrame in BodyText below the page.
Definition: findfrm.cxx:51
SwRowFrame * GetFirstNonHeadlineRow() const
Definition: tabfrm.cxx:5360
const SwTextNode * FindOutlineNodeOfLevel(sal_uInt8 nLvl, SwRootFrame const *pLayout=nullptr) const
Definition: node.cxx:762
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:3383
OUString maToolTip
Definition: expfld.hxx:286
virtual void SetLanguage(LanguageType nLng)
Definition: fldbas.cxx:362
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:135
bool isFormField() const
Definition: expfld.cxx:1336
sal_uInt16 m_nSubType
Definition: expfld.hxx:88
SwSetExpField(SwSetExpFieldType *, const OUString &rFormel, sal_uLong nFormat=0)
Definition: expfld.cxx:811
#define FIELD_PROP_PAR2
Definition: unofldmid.h:24
SwInputFieldType(SwDoc *pDoc)
Definition: expfld.cxx:1212
bool IsFieldDeletedInModel(IDocumentRedlineAccess const &rIDRA, SwTextField const &rTextField)
OUString maPText
Definition: expfld.hxx:284
#define RES_CHRATR_CTL_LANGUAGE
Definition: hintids.hxx:98
virtual ~SwInputField() override
Definition: expfld.cxx:1238
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:261
SwFormatField * GetFormatField()
Definition: expfld.hxx:310
SwNodes & GetNodes()
Definition: doc.hxx:402
sal_uInt16 mnSubType
Definition: expfld.hxx:207
void SetInputFlag(bool bInp)
Definition: expfld.hxx:261
bool LockNotifyContentChange()
Definition: atrfld.cxx:558
virtual std::unique_ptr< SwField > Copy() const override
Definition: expfld.cxx:873
static const OUString & GetUIName(const OUString &rName, SwGetPoolIdFromName)
virtual OUString GetFieldName() const
get name or content
Definition: fldbas.cxx:247
const SwGetSetExpType GSE_FORMULA
Formula.
Definition: fldbas.hxx:199
OUString GetContent(sal_uInt32 nFormat=0)
Definition: usrfld.cxx:266
bool IsHideRedlines() const
Replacement for sw::DocumentRedlineManager::GetRedlineFlags() (this is layout-level redline hiding)...
Definition: rootfrm.hxx:416
void InsertSort(std::vector< sal_uInt16 > &rArr, sal_uInt16 nIdx)
Definition: untbl.cxx:3022
const SvxPageUsage aArr[]
static bool isAsciiNumeric(const OUString &rStr)
virtual void SetSubType(sal_uInt16 nSub) override
Definition: expfld.cxx:1433
virtual OUString GetFieldName() const override
Definition: expfld.cxx:852
const OUString & GetToolTip() const
Definition: expfld.cxx:1423
void UnlockNotifyContentChange()
Definition: atrfld.cxx:568
bool IsDocNodes() const
Is the NodesArray the regular one of Doc? (and not the UndoNds, ...) Implementation in doc...
Definition: nodes.cxx:2334
#define FIELD_PROP_PAR4
Definition: unofldmid.h:36
const SwGetSetExpType GSE_STRING
String.
Definition: fldbas.hxx:196
virtual void SetValue(const double &rVal)
Definition: fldbas.cxx:672
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:1034
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:340
virtual void SetLanguage(LanguageType nLng) override
set language of the format
Definition: expfld.cxx:416
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:66
OUString ExpandValue(const double &rVal, sal_uInt32 nFormat, LanguageType nLng) const
Definition: fldbas.hxx:451
double m_fValueRLHidden
SwValueField; hidden redlines.
Definition: expfld.hxx:201
OUString m_sExpand
Definition: expfld.hxx:85
sal_Int32 nPos
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:709
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 GetCursorOfst failed...
Definition: trvlfrm.cxx:1179
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: expfld.cxx:1343
CollatorWrapper & GetAppCaseCollator()
Definition: init.cxx:753
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:1223
virtual double GetValue() const
Definition: fldbas.cxx:667
virtual void SetPar2(const OUString &rStr) override
Definition: expfld.cxx:1398
const SwTextNode & GetTextNode() const
Definition: txtftn.hxx:69
OUString maContent
Definition: expfld.hxx:283
aStr
SwContentNode * GoNext(SwNodeIndex *) const
Definition: nodes.cxx:1271
void SetFormatField(SwFormatField &rFormatField)
Definition: expfld.cxx:1242
virtual OUString GetPar2() const override
aPromptText
Definition: expfld.cxx:1403
bool IsFooterFrame() const
Definition: frame.hxx:1170
sal_uInt16 Which() const
SwRootFrame * getRootFrame()
Definition: frame.hxx:657
T should be a subclass of SwHash.
Definition: calc.hxx:143
void Clear()
Definition: expfld.hxx:67
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: expfld.cxx:424
const SwAttrPool & GetAttrPool() const
Definition: doc.hxx:1309
virtual sal_uInt16 GetSubType() const override
Definition: expfld.cxx:1428
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:842
CollatorWrapper & GetAppCollator()
Definition: init.cxx:741
bool IsHeaderFrame() const
Definition: frame.hxx:1166
bool IsInHeadline(const SwFrame &rFrame) const
Definition: tabfrm.cxx:5341
void SetContent(const OUString &rStr, sal_uInt32 nFormat=0)
Definition: usrfld.cxx:282
size_t GetSeqFieldList(SwSeqFieldList &rList, SwRootFrame const *pLayout)
Definition: expfld.cxx:618
SwTabFrame * FindTabFrame()
Definition: frame.hxx:1075
#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
const OUString m_sName