LibreOffice Module sw (master)  1
xmlfmt.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 <rtl/ustrbuf.hxx>
21 #include <sal/log.hxx>
22 #include <osl/diagnose.h>
23 #include <tools/diagnose_ex.h>
24 #include <xmloff/nmspmap.hxx>
25 #include <format.hxx>
26 #include <fmtcol.hxx>
27 #include <hints.hxx>
28 #include <poolfmt.hxx>
29 #include <charfmt.hxx>
30 #include <paratr.hxx>
31 #include <doc.hxx>
32 #include <docary.hxx>
34 #include <unostyle.hxx>
35 #include <unoprnms.hxx>
36 #include <fmtpdsc.hxx>
37 #include <pagedesc.hxx>
38 #include <xmloff/xmlnmspe.hxx>
39 #include <xmloff/i18nmap.hxx>
40 #include <xmloff/xmltkmap.hxx>
41 #include "xmlitem.hxx"
42 #include <xmloff/xmlstyle.hxx>
43 #include <xmloff/txtstyli.hxx>
44 #include <xmloff/txtimp.hxx>
45 #include <xmloff/families.hxx>
50 #include <com/sun/star/beans/XPropertySet.hpp>
51 #include "xmlimp.hxx"
52 #include "xmltbli.hxx"
53 #include <cellatr.hxx>
54 #include <SwStyleNameMapper.hxx>
55 #include <xmloff/attrlist.hxx>
56 #include <unotxdoc.hxx>
57 #include <docsh.hxx>
58 #include <ccoll.hxx>
59 
60 #include <memory>
61 
62 using namespace ::com::sun::star;
63 using namespace ::com::sun::star::beans;
64 using namespace ::com::sun::star::uno;
65 using namespace ::xmloff::token;
66 
68 {
69  OUString const sInput;
70 
72  sal_uInt32 nSubCondition;
73 
74  sal_Int32 nPos;
75  sal_Int32 const nLength;
76 
77  inline bool SkipWS();
78  inline bool MatchChar( sal_Unicode c );
79  inline bool MatchName( OUString& rName );
80  inline bool MatchNumber( sal_uInt32& rNumber );
81 
82 public:
83 
84  explicit SwXMLConditionParser_Impl( const OUString& rInp );
85 
86  bool IsValid() const { return Master_CollCondition::NONE != nCondition; }
87 
89  sal_uInt32 GetSubCondition() const { return nSubCondition; }
90 };
91 
93 {
94  while( nPos < nLength && ' ' == sInput[nPos] )
95  nPos++;
96  return true;
97 }
98 
100 {
101  bool bRet = false;
102  if( nPos < nLength && c == sInput[nPos] )
103  {
104  nPos++;
105  bRet = true;
106  }
107  return bRet;
108 }
109 
110 inline bool SwXMLConditionParser_Impl::MatchName( OUString& rName )
111 {
112  OUStringBuffer sBuffer( nLength );
113  while( nPos < nLength &&
114  ( ('a' <= sInput[nPos] && sInput[nPos] <= 'z') ||
115  '-' == sInput[nPos] ) )
116  {
117  sBuffer.append( sInput[nPos] );
118  nPos++;
119  }
120  rName = sBuffer.makeStringAndClear();
121  return !rName.isEmpty();
122 }
123 
124 inline bool SwXMLConditionParser_Impl::MatchNumber( sal_uInt32& rNumber )
125 {
126  OUStringBuffer sBuffer( nLength );
127  while( nPos < nLength && '0' <= sInput[nPos] && sInput[nPos] <= '9' )
128  {
129  sBuffer.append( sInput[nPos] );
130  nPos++;
131  }
132 
133  OUString sNum( sBuffer.makeStringAndClear() );
134  if( !sNum.isEmpty() )
135  rNumber = sNum.toInt32();
136  return !sNum.isEmpty();
137 }
138 
140  sInput( rInp ),
141  nCondition( Master_CollCondition::NONE ),
142  nSubCondition( 0 ),
143  nPos( 0 ),
144  nLength( rInp.getLength() )
145 {
146  OUString sFunc;
147  bool bHasSub = false;
148  sal_uInt32 nSub = 0;
149  bool bOK = SkipWS() && MatchName( sFunc ) && SkipWS() &&
150  MatchChar( '(' ) && SkipWS() && MatchChar( ')' ) && SkipWS();
151  if( bOK && MatchChar( '=' ) )
152  {
153  bOK = SkipWS() && MatchNumber( nSub ) && SkipWS();
154  bHasSub = true;
155  }
156 
157  bOK &= nPos == nLength;
158 
159  if( bOK )
160  {
161  if( IsXMLToken( sFunc, XML_ENDNOTE ) && !bHasSub )
163  else if( IsXMLToken( sFunc, XML_FOOTER ) && !bHasSub )
165  else if( IsXMLToken( sFunc, XML_FOOTNOTE ) && !bHasSub )
167  else if( IsXMLToken( sFunc, XML_HEADER ) && !bHasSub )
169  else if( IsXMLToken( sFunc, XML_LIST_LEVEL) &&
170  nSub >=1 && nSub <= MAXLEVEL )
171  {
173  nSubCondition = nSub-1;
174  }
175  else if( IsXMLToken( sFunc, XML_OUTLINE_LEVEL) &&
176  nSub >=1 && nSub <= MAXLEVEL )
177  {
179  nSubCondition = nSub-1;
180  }
181  else if( IsXMLToken( sFunc, XML_SECTION ) && !bHasSub )
182  {
184  }
185  else if( IsXMLToken( sFunc, XML_TABLE ) && !bHasSub )
186  {
188  }
189  else if( IsXMLToken( sFunc, XML_TABLE_HEADER ) && !bHasSub )
190  {
192  }
193  else if( IsXMLToken( sFunc, XML_TEXT_BOX ) && !bHasSub )
194  {
196  }
197  }
198 }
199 
201 {
203  sal_uInt32 nSubCondition;
204 
205  OUString sApplyStyle;
206 
207 public:
208 
210  SvXMLImport& rImport, sal_uInt16 nPrfx,
211  const OUString& rLName,
212  const uno::Reference< xml::sax::XAttributeList > & xAttrList );
213 
214  bool IsValid() const { return Master_CollCondition::NONE != nCondition; }
215 
217  sal_uInt32 getSubCondition() const { return nSubCondition; }
218  OUString const &getApplyStyle() const { return sApplyStyle; }
219 };
220 
222  SvXMLImport& rImport, sal_uInt16 nPrfx,
223  const OUString& rLName,
224  const uno::Reference< xml::sax::XAttributeList > & xAttrList ) :
225  SvXMLImportContext( rImport, nPrfx, rLName ),
226  nCondition( Master_CollCondition::NONE ),
227  nSubCondition( 0 )
228 {
229  sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
230  for( sal_Int16 i=0; i < nAttrCount; i++ )
231  {
232  const OUString& rAttrName = xAttrList->getNameByIndex( i );
233  OUString aLocalName;
234  const sal_uInt16 nPrefix =
236  &aLocalName );
237  const OUString& rValue = xAttrList->getValueByIndex( i );
238 
239  // TODO: use a map here
240  if( XML_NAMESPACE_STYLE == nPrefix )
241  {
242  if( IsXMLToken( aLocalName, XML_CONDITION ) )
243  {
244  SwXMLConditionParser_Impl aCondParser( rValue );
245  if( aCondParser.IsValid() )
246  {
247  nCondition = aCondParser.GetCondition();
248  nSubCondition = aCondParser.GetSubCondition();
249  }
250  }
251  else if( IsXMLToken( aLocalName, XML_APPLY_STYLE_NAME ) )
252  {
253  sApplyStyle = rValue;
254  }
255  }
256  }
257 }
258 
259 typedef std::vector<rtl::Reference<SwXMLConditionContext_Impl>> SwXMLConditions_Impl;
260 
262 {
263  std::unique_ptr<SwXMLConditions_Impl> pConditions;
264  uno::Reference < style::XStyle > xNewStyle;
265 
266 protected:
267 
268  virtual uno::Reference < style::XStyle > Create() override;
269  virtual void Finish( bool bOverwrite ) override;
270 
271 public:
272 
273 
274  SwXMLTextStyleContext_Impl( SwXMLImport& rImport, sal_uInt16 nPrfx,
275  const OUString& rLName,
276  const uno::Reference< xml::sax::XAttributeList > & xAttrList,
277  sal_uInt16 nFamily,
278  SvXMLStylesContext& rStyles );
279 
281  sal_uInt16 nPrefix,
282  const OUString& rLocalName,
283  const uno::Reference< xml::sax::XAttributeList > & xAttrList ) override;
284 };
285 
286 
287 uno::Reference < style::XStyle > SwXMLTextStyleContext_Impl::Create()
288 {
289 
291  {
292  uno::Reference< lang::XMultiServiceFactory > xFactory( GetImport().GetModel(),
293  uno::UNO_QUERY );
294  if( xFactory.is() )
295  {
296  uno::Reference < uno::XInterface > xIfc =
297  xFactory->createInstance( "com.sun.star.style.ConditionalParagraphStyle" );
298  if( xIfc.is() )
299  xNewStyle.set( xIfc, uno::UNO_QUERY );
300  }
301  }
302  else
303  {
305  }
306 
307  return xNewStyle;
308 }
309 
310 void
312 {
313 
315  {
316  CommandStruct const*const pCommands = SwCondCollItem::GetCmds();
317 
318  Reference< XPropertySet > xPropSet( xNewStyle, UNO_QUERY );
319 
320  uno::Sequence< beans::NamedValue > aSeq( pConditions->size() );
321 
322  for (std::vector<rtl::Reference<SwXMLConditionContext_Impl>>::size_type i = 0;
323  i < pConditions->size(); ++i)
324  {
325  assert((*pConditions)[i]->IsValid()); // checked before inserting
326  Master_CollCondition nCond = (*pConditions)[i]->getCondition();
327  sal_uInt32 nSubCond = (*pConditions)[i]->getSubCondition();
328 
329  for (size_t j = 0; j < COND_COMMAND_COUNT; ++j)
330  {
331  if (pCommands[j].nCnd == nCond &&
332  pCommands[j].nSubCond == nSubCond)
333  {
334  aSeq[i].Name = GetCommandContextByIndex( j );
335  aSeq[i].Value <<= GetImport().GetStyleDisplayName(
336  GetFamily(), (*pConditions)[i]->getApplyStyle() );
337  break;
338  }
339  }
340  }
341 
342  try
343  {
344  xPropSet->setPropertyValue(UNO_NAME_PARA_STYLE_CONDITIONS, uno::makeAny(aSeq));
345  }
346  catch (uno::Exception const&)
347  {
348  TOOLS_WARN_EXCEPTION("sw.xml", "exception when setting ParaStyleConditions");
349  }
350  }
351  XMLTextStyleContext::Finish( bOverwrite );
352 }
353 
355  sal_uInt16 nPrfx, const OUString& rLName,
356  const uno::Reference< xml::sax::XAttributeList > & xAttrList,
357  sal_uInt16 nFamily,
358  SvXMLStylesContext& rStyles ) :
359  XMLTextStyleContext( rImport, nPrfx, rLName, xAttrList, rStyles, nFamily )
360 {
361 }
362 
364  sal_uInt16 nPrefix,
365  const OUString& rLocalName,
366  const uno::Reference< xml::sax::XAttributeList > & xAttrList )
367 {
368  SvXMLImportContextRef xContext;
369 
370  if( XML_NAMESPACE_STYLE == nPrefix && IsXMLToken( rLocalName, XML_MAP ) )
371  {
373  new SwXMLConditionContext_Impl( GetImport(), nPrefix,
374  rLocalName, xAttrList )};
375  if( xCond->IsValid() )
376  {
377  if( !pConditions )
378  pConditions = std::make_unique<SwXMLConditions_Impl>();
379  pConditions->push_back( xCond );
380  }
381  xContext = xCond.get();
382  }
383 
384  if (!xContext)
385  xContext = XMLTextStyleContext::CreateChildContext( nPrefix, rLocalName,
386  xAttrList );
387 
388  return xContext;
389 }
390 
392 {
393  OUString sMasterPageName;
394  std::unique_ptr<SfxItemSet> pItemSet;
397 
398  OUString sDataStyleName;
399 
403 
405  sal_uInt16 nPrefix,
406  const OUString& rLName,
407  const uno::Reference< xml::sax::XAttributeList > & xAttrList);
408 
409 protected:
410 
411  virtual void SetAttribute( sal_uInt16 nPrefixKey,
412  const OUString& rLocalName,
413  const OUString& rValue ) override;
414 
415  SwXMLImport& GetSwImport() { return static_cast<SwXMLImport&>(GetImport()); }
416 
417 public:
418 
419 
421  SwXMLImport& rImport, sal_uInt16 nPrfx,
422  const OUString& rLName,
423  const uno::Reference< xml::sax::XAttributeList > & xAttrList,
424  SvXMLStylesContext& rStylesC,
425  sal_uInt16 nFamily);
426 
427  virtual void CreateAndInsert( bool bOverwrite ) override;
428 
430  sal_uInt16 nPrefix,
431  const OUString& rLocalName,
432  const uno::Reference< xml::sax::XAttributeList > & xAttrList ) override;
433 
434  // The item set may be empty!
435  SfxItemSet *GetItemSet() { return pItemSet.get(); }
436 
437  bool HasMasterPageName() const { return bHasMasterPageName; }
438 
439  bool IsPageDescConnected() const { return bPageDescConnected; }
440  void ConnectPageDesc();
441 
442  bool ResolveDataStyleName();
443 };
444 
446  const OUString& rLocalName,
447  const OUString& rValue )
448 {
449  if( XML_NAMESPACE_STYLE == nPrefixKey )
450  {
451  if ( IsXMLToken( rLocalName, XML_MASTER_PAGE_NAME ) )
452  {
453  sMasterPageName = rValue;
454  bHasMasterPageName = true;
455  }
456  else if ( IsXMLToken( rLocalName, XML_DATA_STYLE_NAME ) )
457  {
458  // if we have a valid data style name
459  if (!rValue.isEmpty())
460  {
461  sDataStyleName = rValue;
462  bDataStyleIsResolved = false; // needs to be resolved
463  }
464  }
465  else
466  {
467  SvXMLStyleContext::SetAttribute( nPrefixKey, rLocalName, rValue );
468  }
469  }
470  else
471  {
472  SvXMLStyleContext::SetAttribute( nPrefixKey, rLocalName, rValue );
473  }
474 }
475 
477  sal_uInt16 nPrefix, const OUString& rLName,
478  const uno::Reference< xml::sax::XAttributeList > & xAttrList )
479 {
480  OSL_ENSURE( !pItemSet,
481  "SwXMLItemSetStyleContext_Impl::CreateItemSetContext: item set exists" );
482 
483  SvXMLImportContext *pContext = nullptr;
484 
486 
487  SfxItemPool& rItemPool = pDoc->GetAttrPool();
488  switch( GetFamily() )
489  {
491  pItemSet.reset( new SfxItemSet( rItemPool, aTableSetRange ) );
492  break;
494  pItemSet.reset( new SfxItemSet( rItemPool, svl::Items<RES_FRM_SIZE, RES_FRM_SIZE>{} ) );
495  break;
497  pItemSet.reset( new SfxItemSet( rItemPool, aTableLineSetRange ) );
498  break;
500  pItemSet.reset( new SfxItemSet( rItemPool, aTableBoxSetRange ) );
501  break;
502  default:
503  OSL_ENSURE( false,
504  "SwXMLItemSetStyleContext_Impl::CreateItemSetContext: unknown family" );
505  break;
506  }
507  if( pItemSet )
509  nPrefix, rLName, xAttrList, GetFamily(),
510  *pItemSet );
511  if( !pContext )
512  {
513  pItemSet.reset();
514  }
515 
516  return pContext;
517 }
518 
519 
521  sal_uInt16 nPrfx, const OUString& rLName,
522  const uno::Reference< xml::sax::XAttributeList > & xAttrList,
523  SvXMLStylesContext& rStylesC,
524  sal_uInt16 nFamily ) :
525  SvXMLStyleContext( rImport, nPrfx, rLName, xAttrList, nFamily ),
526  pTextStyle( nullptr ),
527  rStyles( rStylesC ),
528  bHasMasterPageName( false ),
529  bPageDescConnected( false ),
530  bDataStyleIsResolved( true )
531 {
532 }
533 
535 {
536  if( pTextStyle )
537  pTextStyle->CreateAndInsert( bOverwrite );
538 }
539 
541  sal_uInt16 nPrefix,
542  const OUString& rLocalName,
543  const uno::Reference< xml::sax::XAttributeList > & xAttrList )
544 {
545  SvXMLImportContextRef xContext;
546 
547  if( XML_NAMESPACE_STYLE == nPrefix )
548  {
549  if( IsXMLToken( rLocalName, XML_TABLE_PROPERTIES ) ||
550  IsXMLToken( rLocalName, XML_TABLE_COLUMN_PROPERTIES ) ||
551  IsXMLToken( rLocalName, XML_TABLE_ROW_PROPERTIES ) ||
552  IsXMLToken( rLocalName, XML_TABLE_CELL_PROPERTIES ) )
553  {
554  xContext = CreateItemSetContext( nPrefix, rLocalName, xAttrList );
555  }
556  else if( IsXMLToken( rLocalName, XML_TEXT_PROPERTIES ) ||
557  IsXMLToken( rLocalName, XML_PARAGRAPH_PROPERTIES ))
558  {
559  if( !pTextStyle )
560  {
562  const OUString aStr = GetImport().GetNamespaceMap().GetQNameByKey(
563  nPrefix, GetXMLToken(XML_NAME) );
564  pTmp->AddAttribute( aStr, GetName() );
565  uno::Reference <xml::sax::XAttributeList> xTmpAttrList = pTmp;
567  rLocalName, xTmpAttrList, XML_STYLE_FAMILY_TEXT_PARAGRAPH, rStyles );
568  pTextStyle->StartElement( xTmpAttrList );
570  }
571  xContext = pTextStyle->CreateChildContext( nPrefix, rLocalName, xAttrList );
572  }
573  }
574 
575  if (!xContext)
576  xContext = SvXMLStyleContext::CreateChildContext( nPrefix, rLocalName,
577  xAttrList );
578 
579  return xContext;
580 }
581 
583 {
585  return;
586  bPageDescConnected = true;
587 
589 
590  // #i40788# - first determine the display name of the page style,
591  // then map this name to the corresponding user interface name.
593  sMasterPageName );
595  sName,
597  SwPageDesc *pPageDesc = pDoc->FindPageDesc(sName);
598  if( !pPageDesc )
599  {
600  // If the page style is a pool style, then we maybe have to create it
601  // first if it hasn't been used by now.
602  const sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sName, SwGetPoolIdFromName::PageDesc );
603  if( USHRT_MAX != nPoolId )
604  pPageDesc = pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool( nPoolId, false );
605  }
606 
607  if( !pPageDesc )
608  return;
609 
610  if( !pItemSet )
611  {
612  SfxItemPool& rItemPool = pDoc->GetAttrPool();
613  pItemSet.reset( new SfxItemSet( rItemPool, aTableSetRange ) );
614  }
615 
616  const SfxPoolItem *pItem;
617  std::unique_ptr<SwFormatPageDesc> pFormatPageDesc;
618  if( SfxItemState::SET == pItemSet->GetItemState( RES_PAGEDESC, false,
619  &pItem ) )
620  {
621  if( static_cast<const SwFormatPageDesc *>(pItem)->GetPageDesc() != pPageDesc )
622  pFormatPageDesc.reset(new SwFormatPageDesc( *static_cast<const SwFormatPageDesc *>(pItem) ));
623  }
624  else
625  pFormatPageDesc.reset(new SwFormatPageDesc());
626 
627  if( pFormatPageDesc )
628  {
629  pFormatPageDesc->RegisterToPageDesc( *pPageDesc );
630  pItemSet->Put( *pFormatPageDesc );
631  }
632 }
633 
635 {
636  // resolve, if not already done
637  if (! bDataStyleIsResolved)
638  {
639  // get the format key
640  sal_Int32 nFormat =
641  GetImport().GetTextImport()->GetDataStyleKey(sDataStyleName);
642 
643  // if the key is valid, insert Item into ItemSet
644  if( -1 != nFormat )
645  {
646  if( !pItemSet )
647  {
649 
650  SfxItemPool& rItemPool = pDoc->GetAttrPool();
651  pItemSet.reset( new SfxItemSet( rItemPool, aTableBoxSetRange ) );
652  }
653  SwTableBoxNumFormat aNumFormatItem(nFormat);
654  pItemSet->Put(aNumFormatItem);
655  }
656 
657  // now resolved
658  bDataStyleIsResolved = true;
659  return true;
660  }
661  else
662  {
663  // was already resolved; nothing to do
664  return false;
665  }
666 }
667 
669 {
670  SwXMLImport& GetSwImport() { return static_cast<SwXMLImport&>(GetImport()); }
671  const SwXMLImport& GetSwImport() const
672  { return static_cast<const SwXMLImport&>(GetImport()); }
673 
674 protected:
675 
676  virtual SvXMLStyleContext *CreateStyleChildContext( sal_uInt16 nPrefix,
677  const OUString& rLocalName,
678  const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override;
679 
680  virtual SvXMLStyleContext *CreateStyleStyleChildContext( sal_uInt16 nFamily,
681  sal_uInt16 nPrefix, const OUString& rLocalName,
682  const uno::Reference< xml::sax::XAttributeList > & xAttrList ) override;
684  sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString& rLocalName,
685  const uno::Reference< xml::sax::XAttributeList > & xAttrList ) override;
686  // HACK
688  sal_uInt16 nFamily ) const override;
689 
690  virtual uno::Reference < container::XNameContainer >
691  GetStylesContainer( sal_uInt16 nFamily ) const override;
692  virtual OUString GetServiceName( sal_uInt16 nFamily ) const override;
693  // HACK
694 
695 public:
696 
697 
699  SwXMLImport& rImport,
700  const OUString& rLName ,
701  const uno::Reference< xml::sax::XAttributeList > & xAttrList,
702  bool bAuto );
703 
704  virtual bool InsertStyleFamily( sal_uInt16 nFamily ) const override;
705 
706  virtual void EndElement() override;
707 };
708 
710  const OUString& rLocalName,
711  const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList )
712 {
713  SvXMLStyleContext* pContext = nullptr;
714 
715  if(nPrefix == XML_NAMESPACE_TABLE && IsXMLToken(rLocalName, XML_TABLE_TEMPLATE))
716  {
717  rtl::Reference<XMLTableImport> xTableImport = GetImport().GetShapeImport()->GetShapeTableImport();
718  pContext = xTableImport->CreateTableTemplateContext(nPrefix, rLocalName, xAttrList);
719  }
720  if (!pContext)
721  pContext = SvXMLStylesContext::CreateStyleChildContext(nPrefix, rLocalName, xAttrList);
722 
723  return pContext;
724 }
725 
727  sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString& rLocalName,
728  const uno::Reference< xml::sax::XAttributeList > & xAttrList )
729 {
730  SvXMLStyleContext *pStyle = nullptr;
731 
732  switch( nFamily )
733  {
735  pStyle = new SwXMLTextStyleContext_Impl( GetSwImport(), nPrefix,
736  rLocalName, xAttrList, nFamily, *this );
737  break;
742  // Distinguish real and automatic styles.
743  if (IsAutomaticStyle())
744  pStyle = new SwXMLItemSetStyleContext_Impl(GetSwImport(), nPrefix, rLocalName, xAttrList, *this, nFamily);
745  else if (nFamily == XML_STYLE_FAMILY_TABLE_CELL) // Real cell styles are used for table-template import.
746  pStyle = new XMLPropStyleContext(GetSwImport(), nPrefix, rLocalName, xAttrList, *this, nFamily);
747  else
748  SAL_WARN("sw.xml", "Context does not exists for non automatic table, column or row style.");
749  break;
751  // As long as there are no element items, we can use the text
752  // style class.
753  pStyle = new XMLTextShapeStyleContext( GetImport(), nPrefix,
754  rLocalName, xAttrList, *this, nFamily );
755  break;
756  default:
758  nPrefix,
759  rLocalName,
760  xAttrList );
761  break;
762  }
763 
764  return pStyle;
765 }
766 
768  sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString& rLocalName,
769  const uno::Reference< xml::sax::XAttributeList > & xAttrList )
770 {
771  SvXMLStyleContext *pStyle = nullptr;
772 
773  switch( nFamily )
774  {
778  pStyle = new XMLTextStyleContext( GetImport(), nPrefix, rLocalName,
779  xAttrList, *this, nFamily,
780  true );
781  break;
783  // There are no writer specific defaults for graphic styles!
784  pStyle = new XMLGraphicsDefaultStyle( GetImport(), nPrefix,
785  rLocalName, xAttrList, *this );
786  break;
787  default:
789  nPrefix,
790  rLocalName,
791  xAttrList );
792  break;
793  }
794 
795  return pStyle;
796 }
797 
799  SwXMLImport& rImport, const OUString& rLName,
800  const uno::Reference< xml::sax::XAttributeList > & xAttrList,
801  bool bAuto ) :
802  SvXMLStylesContext( rImport, XML_NAMESPACE_OFFICE, rLName, xAttrList, bAuto )
803 {
804 }
805 
806 bool SwXMLStylesContext_Impl::InsertStyleFamily( sal_uInt16 nFamily ) const
807 {
808  const SwXMLImport& rSwImport = GetSwImport();
809  const SfxStyleFamily nStyleFamilyMask = rSwImport.GetStyleFamilyMask();
810 
811  bool bIns = true;
812  switch( nFamily )
813  {
815  bIns = bool(nStyleFamilyMask & SfxStyleFamily::Para);
816  break;
818  bIns = bool(nStyleFamilyMask & SfxStyleFamily::Char);
819  break;
821  bIns = bool(nStyleFamilyMask & SfxStyleFamily::Frame);
822  break;
824  bIns = bool(nStyleFamilyMask & SfxStyleFamily::Pseudo);
825  break;
831  bIns = !(rSwImport.IsInsertMode() || rSwImport.IsStylesOnlyMode() ||
832  rSwImport.IsBlockMode());
833  break;
834  default:
835  bIns = SvXMLStylesContext::InsertStyleFamily( nFamily );
836  break;
837  }
838 
839  return bIns;
840 }
841 
843  sal_uInt16 nFamily ) const
844 {
846  if( nFamily == XML_STYLE_FAMILY_TABLE_TABLE )
848  const_cast<SwXMLStylesContext_Impl*>( this )->GetImport() );
849  else if( nFamily == XML_STYLE_FAMILY_TABLE_ROW )
851  const_cast<SwXMLStylesContext_Impl*>( this )->GetImport() );
852  else if( nFamily == XML_STYLE_FAMILY_TABLE_CELL )
854  const_cast<SwXMLStylesContext_Impl*>( this )->GetImport() );
855  else
856  xMapper = SvXMLStylesContext::GetImportPropertyMapper( nFamily );
857  return xMapper;
858 }
859 
860 uno::Reference < container::XNameContainer > SwXMLStylesContext_Impl::GetStylesContainer(
861  sal_uInt16 nFamily ) const
862 {
863  uno::Reference < container::XNameContainer > xStyles;
864  if( XML_STYLE_FAMILY_SD_GRAPHICS_ID == nFamily )
865  xStyles = const_cast<SvXMLImport *>(&GetImport())->GetTextImport()->GetFrameStyles();
866  else if( XML_STYLE_FAMILY_TABLE_CELL == nFamily )
867  xStyles = const_cast<SvXMLImport *>(&GetImport())->GetTextImport()->GetCellStyles();
868 
869  if (!xStyles.is())
870  xStyles = SvXMLStylesContext::GetStylesContainer( nFamily );
871 
872  return xStyles;
873 }
874 
875 OUString SwXMLStylesContext_Impl::GetServiceName( sal_uInt16 nFamily ) const
876 {
877  if( XML_STYLE_FAMILY_SD_GRAPHICS_ID == nFamily )
878  return "com.sun.star.style.FrameStyle";
879  else if( XML_STYLE_FAMILY_TABLE_CELL == nFamily )
880  return "com.sun.star.style.CellStyle";
881 
882  return SvXMLStylesContext::GetServiceName( nFamily );
883 }
884 
886 {
888 }
889 
891 {
892 protected:
893  virtual bool InsertStyleFamily( sal_uInt16 nFamily ) const override;
894 
895  SwXMLImport& GetSwImport() { return static_cast<SwXMLImport&>(GetImport()); }
896  const SwXMLImport& GetSwImport() const
897  { return static_cast<const SwXMLImport&>(GetImport()); }
898 
899 public:
900 
901 
903  SwXMLImport& rImport,
904  const OUString& rLName ,
905  const uno::Reference< xml::sax::XAttributeList > & xAttrList );
906 
907  virtual void EndElement() override;
908 };
909 
910 
912  SwXMLImport& rImport,
913  const OUString& rLName ,
914  const uno::Reference< xml::sax::XAttributeList > & xAttrList ) :
915  XMLTextMasterStylesContext( rImport, XML_NAMESPACE_OFFICE, rLName, xAttrList )
916 {
917 }
918 
919 bool SwXMLMasterStylesContext_Impl::InsertStyleFamily( sal_uInt16 nFamily ) const
920 {
921  bool bIns;
922 
923  const SwXMLImport& rSwImport = GetSwImport();
924  const SfxStyleFamily nStyleFamilyMask = rSwImport.GetStyleFamilyMask();
925  if( XML_STYLE_FAMILY_MASTER_PAGE == nFamily )
926  bIns = bool(nStyleFamilyMask & SfxStyleFamily::Page);
927  else
929 
930  return bIns;
931 }
932 
934 {
935  FinishStyles( !GetSwImport().IsInsertMode() );
937 }
938 
940  const OUString& rLocalName,
941  const uno::Reference< xml::sax::XAttributeList > & xAttrList,
942  bool bAuto )
943 {
944  SvXMLStylesContext *pContext =
945  new SwXMLStylesContext_Impl( *this, rLocalName,
946  xAttrList, bAuto );
947  if( bAuto )
948  SetAutoStyles( pContext );
949  else
950  SetStyles( pContext );
951 
952  return pContext;
953 }
954 
956  const OUString& rLocalName,
957  const uno::Reference< xml::sax::XAttributeList > & xAttrList )
958 {
959  SvXMLStylesContext *pContext =
960  new SwXMLMasterStylesContext_Impl( *this, rLocalName, xAttrList );
961  SetMasterStyles( pContext );
962 
963  return pContext;
964 }
965 
966 void SwXMLImport::InsertStyles( bool bAuto )
967 {
968  if( bAuto && GetAutoStyles() )
970  if( !bAuto && GetStyles() )
971  GetStyles()->CopyStylesToDoc( !IsInsertMode(), false );
972 }
973 
975 {
976  if( GetStyles() )
978 }
979 
981 {
982  if( !pDoc )
983  pDoc = SwImport::GetDocFromXMLImport( *this );
984 
985  const SwTextFormatColls& rColls = *pDoc->GetTextFormatColls();
986  const size_t nCount = rColls.size();
987  for( size_t i=0; i < nCount; ++i )
988  {
989  SwTextFormatColl *pColl = rColls[i];
990  if( pColl && RES_CONDTXTFMTCOLL == pColl->Which() )
991  {
992  const SwFormatCollConditions& rConditions =
993  static_cast<const SwConditionTextFormatColl *>(pColl)->GetCondColls();
994  bool bSendModify = false;
995  for( size_t j=0; j < rConditions.size() && !bSendModify; ++j )
996  {
997  const SwCollCondition& rCond = *rConditions[j];
998  switch( rCond.GetCondition() )
999  {
1004  bSendModify = true;
1005  break;
1006  default: break;
1007  }
1008  }
1009  if( bSendModify )
1010  {
1011  SwCondCollCondChg aMsg( pColl );
1012  pColl->ModifyNotification( &aMsg, &aMsg );
1013  }
1014  }
1015  }
1016 }
1017 
1019  sal_uInt16 nFamily,
1020  const OUString& rName,
1021  const SfxItemSet **ppItemSet ) const
1022 {
1023  SwXMLItemSetStyleContext_Impl *pStyle = nullptr;
1024  if( GetAutoStyles() )
1025  {
1026  pStyle = const_cast<SwXMLItemSetStyleContext_Impl*>(dynamic_cast< const SwXMLItemSetStyleContext_Impl* >(
1027  GetAutoStyles()->
1028  FindStyleChildContext( nFamily, rName,
1029  true ) ) );
1030  if( pStyle )
1031  {
1032  if( ppItemSet )
1033  {
1034  if( XML_STYLE_FAMILY_TABLE_TABLE == pStyle->GetFamily() &&
1035  pStyle->HasMasterPageName() &&
1036  !pStyle->IsPageDescConnected() )
1037  pStyle->ConnectPageDesc();
1038  (*ppItemSet) = pStyle->GetItemSet();
1039 
1040  // resolve data style name late
1041  if( XML_STYLE_FAMILY_TABLE_CELL == pStyle->GetFamily() &&
1042  pStyle->ResolveDataStyleName() )
1043  {
1044  (*ppItemSet) = pStyle->GetItemSet();
1045  }
1046 
1047  }
1048  }
1049  }
1050 
1051  return pStyle != nullptr;
1052 }
1053 
1054 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxItemSet * GetItemSet()
Definition: xmlfmt.cxx:435
#define UNO_NAME_PARA_STYLE_CONDITIONS
Definition: unoprnms.hxx:784
XML_MAP
bool IsXMLToken(const OUString &rString, enum XMLTokenEnum eToken)
SwXMLMasterStylesContext_Impl(SwXMLImport &rImport, const OUString &rLName, const uno::Reference< xml::sax::XAttributeList > &xAttrList)
Definition: xmlfmt.cxx:911
virtual bool InsertStyleFamily(sal_uInt16 nFamily) const
XML_TEXT_PROPERTIES
bool MatchName(OUString &rName)
Definition: xmlfmt.cxx:110
virtual SvXMLStyleContext * CreateStyleStyleChildContext(sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString &rLocalName, const uno::Reference< xml::sax::XAttributeList > &xAttrList) override
Definition: xmlfmt.cxx:726
XML_OUTLINE_LEVEL
Represents the style of a paragraph.
Definition: fmtcol.hxx:55
void SetStyles(SvXMLStylesContext *pStyles)
#define RES_CONDTXTFMTCOLL
Definition: hintids.hxx:278
bool HasMasterPageName() const
Definition: xmlfmt.cxx:437
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
Definition: fmtpdsc.hxx:35
OUString GetStyleDisplayName(sal_uInt16 nFamily, const OUString &rName) const
void CopyAutoStylesToDoc()
XML_TEXT_BOX
const SwXMLImport & GetSwImport() const
Definition: xmlfmt.cxx:671
void FinishStyles()
Definition: xmlfmt.cxx:974
virtual SvXMLImportContextRef CreateChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
SwXMLTextStyleContext_Impl * pTextStyle
Definition: xmlfmt.cxx:395
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
virtual SvXMLStyleContext * CreateDefaultStyleStyleChildContext(sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
XML_TABLE_PROPERTIES
XML_NAME
virtual uno::Reference< style::XStyle > Create() override
Definition: xmlfmt.cxx:287
#define XML_STYLE_FAMILY_TEXT_PARAGRAPH
Master_CollCondition nCondition
Definition: xmlfmt.cxx:71
SwXMLItemSetStyleContext_Impl(SwXMLImport &rImport, sal_uInt16 nPrfx, const OUString &rLName, const uno::Reference< xml::sax::XAttributeList > &xAttrList, SvXMLStylesContext &rStylesC, sal_uInt16 nFamily)
Definition: xmlfmt.cxx:520
XML_APPLY_STYLE_NAME
virtual void CreateAndInsert(bool bOverwrite) override
Definition: xmlfmt.cxx:534
SvXMLImport & GetImport()
bool IsBlockMode() const
Definition: xmlimp.hxx:156
Definition: doc.hxx:185
virtual SvXMLImportContextRef CreateChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const uno::Reference< xml::sax::XAttributeList > &xAttrList) override
Definition: xmlfmt.cxx:363
virtual SvXMLStyleContext * CreateStyleChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
Master_CollCondition GetCondition() const
Definition: fmtcol.hxx:192
XML_MASTER_PAGE_NAME
#define XML_STYLE_FAMILY_TABLE_CELL
Master_CollCondition
Conditional styles.
Definition: fmtcol.hxx:157
virtual SvXMLImportContextRef CreateChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const uno::Reference< xml::sax::XAttributeList > &xAttrList) override
Definition: xmlfmt.cxx:540
SvXMLNamespaceMap & GetNamespaceMap()
SwXMLTextStyleContext_Impl(SwXMLImport &rImport, sal_uInt16 nPrfx, const OUString &rLName, const uno::Reference< xml::sax::XAttributeList > &xAttrList, sal_uInt16 nFamily, SvXMLStylesContext &rStyles)
Definition: xmlfmt.cxx:354
sal_Int32 const nLength
Definition: xmlfmt.cxx:75
OUString const & getApplyStyle() const
Definition: xmlfmt.cxx:218
XML_TABLE_COLUMN_PROPERTIES
virtual OUString GetServiceName(sal_uInt16 nFamily) const override
Definition: xmlfmt.cxx:875
virtual SvXMLStyleContext * CreateStyleStyleChildContext(sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
rtl::Reference< XMLTextImportHelper > const & GetTextImport()
virtual void EndElement() override
Definition: xmlfmt.cxx:933
XML_TABLE_TEMPLATE
#define XML_STYLE_FAMILY_TABLE_TABLE
virtual bool InsertStyleFamily(sal_uInt16 nFamily) const override
Definition: xmlfmt.cxx:806
virtual rtl::Reference< SvXMLImportPropertyMapper > GetImportPropertyMapper(sal_uInt16 nFamily) const
sal_uInt16 GetKeyByAttrName(const OUString &rAttrName, OUString *pPrefix, OUString *pLocalName, OUString *pNamespace) const
static const CommandStruct * GetCmds()
Definition: ccoll.hxx:58
std::unique_ptr< SfxItemSet > pItemSet
Definition: xmlfmt.cxx:394
bool IsAutomaticStyle() const
SvXMLImportContext * CreateMasterStylesContext(const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
Definition: xmlfmt.cxx:955
SvXMLImportContext * CreateTableItemImportContext(sal_uInt16 nPrefix, const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList, sal_uInt16 nSubFamily, SfxItemSet &rItemSet)
Definition: xmlitemi.cxx:339
sal_uInt16 sal_Unicode
virtual OUString GetServiceName(sal_uInt16 nFamily) const
bool IsStylesOnlyMode() const
Definition: xmlimp.hxx:155
XML_TABLE_CELL_PROPERTIES
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
XML_TABLE
bool MatchChar(sal_Unicode c)
Definition: xmlfmt.cxx:99
bool IsValid() const
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
Definition: doc.cxx:458
XML_HEADER
virtual css::uno::Reference< css::style::XStyle > Create()
const sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:95
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
#define XML_STYLE_FAMILY_TABLE_ROW
Master_CollCondition getCondition() const
Definition: xmlfmt.cxx:216
#define XML_STYLE_FAMILY_MASTER_PAGE
#define XML_STYLE_FAMILY_SD_GRAPHICS_ID
sal_uInt32 getSubCondition() const
Definition: xmlfmt.cxx:217
SfxStyleFamily
virtual void SetAttribute(sal_uInt16 nPrefixKey, const OUString &rLocalName, const OUString &rValue) override
Definition: xmlfmt.cxx:445
SwXMLConditionContext_Impl(SvXMLImport &rImport, sal_uInt16 nPrfx, const OUString &rLName, const uno::Reference< xml::sax::XAttributeList > &xAttrList)
Definition: xmlfmt.cxx:221
virtual bool InsertStyleFamily(sal_uInt16 nFamily) const override
Definition: xmlfmt.cxx:919
std::vector< rtl::Reference< SwXMLConditionContext_Impl > > SwXMLConditions_Impl
Definition: xmlfmt.cxx:259
static SvXMLImportPropertyMapper * CreateTableDefaultExtPropMapper(SvXMLImport &)
SvXMLStylesContext * GetStyles()
virtual void ModifyNotification(const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue)
Definition: calbck.hxx:154
virtual SwPageDesc * GetPageDescFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return required automatic page style.
OUString const sInput
Definition: xmlfmt.cxx:69
SwPageDesc * FindPageDesc(const OUString &rName, size_t *pPos=nullptr) const
Definition: docdesc.cxx:829
XML_DATA_STYLE_NAME
std::unique_ptr< SwXMLConditions_Impl > pConditions
Definition: xmlfmt.cxx:263
virtual uno::Reference< container::XNameContainer > GetStylesContainer(sal_uInt16 nFamily) const override
Definition: xmlfmt.cxx:860
sal_uInt16 const aTableSetRange[]
Definition: init.cxx:192
#define XML_STYLE_FAMILY_TEXT_OUTLINE
SvXMLImportContext * CreateItemSetContext(sal_uInt16 nPrefix, const OUString &rLName, const uno::Reference< xml::sax::XAttributeList > &xAttrList)
Definition: xmlfmt.cxx:476
sal_uInt16 GetFamily() const
sal_uInt32 GetSubCondition() const
Definition: xmlfmt.cxx:89
#define TOOLS_WARN_EXCEPTION(area, stream)
OUString GetCommandContextByIndex(sal_Int16 nIndex)
Definition: ccoll.cxx:88
virtual void EndElement() override
Definition: xmlfmt.cxx:885
virtual void Finish(bool bOverwrite) override
void CopyStylesToDoc(bool bOverwrite, bool bFinish=true)
virtual rtl::Reference< SvXMLImportPropertyMapper > GetImportPropertyMapper(sal_uInt16 nFamily) const override
Definition: xmlfmt.cxx:842
XML_TABLE_HEADER
virtual void CreateAndInsert(bool bOverwrite) override
bool FindAutomaticStyle(sal_uInt16 nFamily, const OUString &rName, const SfxItemSet **ppItemSet) const
Definition: xmlfmt.cxx:1018
OUString sName
void SetMasterStyles(SvXMLStylesContext *pMasterStyles)
SwXMLImport & GetSwImport()
Definition: xmlfmt.cxx:415
int i
void UpdateTextCollConditions(SwDoc *pDoc)
Definition: xmlfmt.cxx:980
size_t size() const
Definition: docary.hxx:91
XML_PARAGRAPH_PROPERTIES
#define COND_COMMAND_COUNT
Definition: ccoll.hxx:29
sal_uInt16 const aTableBoxSetRange[]
Definition: init.cxx:220
bool IsValid() const
Definition: xmlfmt.cxx:86
virtual css::uno::Reference< css::container::XNameContainer > GetStylesContainer(sal_uInt16 nFamily) const
#define XML_STYLE_FAMILY_TEXT_BIBLIOGRAPHYCONFIG
XML_TABLE_ROW_PROPERTIES
virtual void Finish(bool bOverwrite) override
Definition: xmlfmt.cxx:311
virtual SvXMLStyleContext * CreateDefaultStyleStyleChildContext(sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString &rLocalName, const uno::Reference< xml::sax::XAttributeList > &xAttrList) override
Definition: xmlfmt.cxx:767
void InsertStyles(bool bAuto)
Definition: xmlfmt.cxx:966
virtual SvXMLImportContextRef CreateChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
OUString GetQNameByKey(sal_uInt16 nKey, const OUString &rLocalName, bool bCache=true) const
#define XML_STYLE_FAMILY_TEXT_ENDNOTECONFIG
XML_FOOTER
SwXMLStylesContext_Impl(SwXMLImport &rImport, const OUString &rLName, const uno::Reference< xml::sax::XAttributeList > &xAttrList, bool bAuto)
Definition: xmlfmt.cxx:798
std::vector< std::unique_ptr< SwCollCondition >> SwFormatCollConditions
Definition: fmtcol.hxx:200
sal_uInt16 const aTableLineSetRange[]
Definition: init.cxx:208
SwXMLConditionParser_Impl(const OUString &rInp)
Definition: xmlfmt.cxx:139
Master_CollCondition nCondition
Definition: xmlfmt.cxx:202
SvXMLStylesContext & rStyles
Definition: xmlfmt.cxx:396
XML_FOOTNOTE
static SvXMLImportPropertyMapper * CreateTableCellExtPropMapper(SvXMLImport &)
SfxStyleFamily GetStyleFamilyMask() const
Definition: xmlimp.hxx:153
sal_uInt16 Which() const
for Querying of Writer-functions.
Definition: format.hxx:78
bool MatchNumber(sal_uInt32 &rNumber)
Definition: xmlfmt.cxx:124
uno::Reference< style::XStyle > xNewStyle
Definition: xmlfmt.cxx:264
virtual SvXMLStyleContext * CreateStyleChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
Definition: xmlfmt.cxx:709
#define XML_STYLE_FAMILY_TEXT_LIST
const SwTextFormatColls * GetTextFormatColls() const
Definition: doc.hxx:774
const OUString & GetName() const
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
bool IsValid() const
Definition: xmlfmt.cxx:214
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:261
SvXMLImportContext * CreateStylesContext(const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList, bool bAuto)
Definition: xmlfmt.cxx:939
#define XML_STYLE_FAMILY_TABLE_COLUMN
double getLength(const B2DPolygon &rCandidate)
void SetAutoStyles(SvXMLStylesContext *pAutoStyles)
void AddStyle(SvXMLStyleContext &rNew)
virtual void SetAttribute(sal_uInt16 nPrefixKey, const OUString &rLocalName, const OUString &rValue)
void AddAttribute(const OUString &sName, const OUString &sValue)
#define SAL_WARN(area, stream)
XML_SECTION
Master_CollCondition GetCondition() const
Definition: xmlfmt.cxx:88
sal_Int32 const nLength
SwDoc * GetDocFromXMLImport(SvXMLImport const &)
Definition: xmlimp.cxx:1711
static SvXMLImportPropertyMapper * CreateTableRowDefaultExtPropMapper(SvXMLImport &)
bool IsPageDescConnected() const
Definition: xmlfmt.cxx:439
#define RES_PAGEDESC
Definition: hintids.hxx:198
virtual bool InsertStyleFamily(sal_uInt16 nFamily) const override
#define XML_STYLE_FAMILY_TEXT_FOOTNOTECONFIG
SvXMLStylesContext * GetAutoStyles()
const SwXMLImport & GetSwImport() const
Definition: xmlfmt.cxx:896
sal_Int32 nPos
SwXMLImport & GetSwImport()
Definition: xmlfmt.cxx:670
SwXMLImport & GetSwImport()
Definition: xmlfmt.cxx:895
aStr
void FinishStyles(bool bOverwrite)
sal_uInt32 nSubCondition
Definition: xmlfmt.cxx:72
#define XML_STYLE_FAMILY_TEXT_TEXT
XML_ENDNOTE
const SwAttrPool & GetAttrPool() const
Definition: doc.hxx:1308
rtl::Reference< XMLShapeImportHelper > const & GetShapeImport()
#define XML_STYLE_FAMILY_TEXT_LINENUMBERINGCONFIG
XML_CONDITION
XML_LIST_LEVEL
bool IsInsertMode() const
Definition: xmlimp.hxx:154