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  css::uno::Any ex( cppu::getCaughtException() );
349  SAL_WARN("sw.xml", "exception when setting ParaStyleConditions: " << exceptionToString(ex));
350  }
351  }
352  XMLTextStyleContext::Finish( bOverwrite );
353 }
354 
356  sal_uInt16 nPrfx, const OUString& rLName,
357  const uno::Reference< xml::sax::XAttributeList > & xAttrList,
358  sal_uInt16 nFamily,
359  SvXMLStylesContext& rStyles ) :
360  XMLTextStyleContext( rImport, nPrfx, rLName, xAttrList, rStyles, nFamily )
361 {
362 }
363 
365  sal_uInt16 nPrefix,
366  const OUString& rLocalName,
367  const uno::Reference< xml::sax::XAttributeList > & xAttrList )
368 {
369  SvXMLImportContextRef xContext;
370 
371  if( XML_NAMESPACE_STYLE == nPrefix && IsXMLToken( rLocalName, XML_MAP ) )
372  {
374  new SwXMLConditionContext_Impl( GetImport(), nPrefix,
375  rLocalName, xAttrList )};
376  if( xCond->IsValid() )
377  {
378  if( !pConditions )
379  pConditions = std::make_unique<SwXMLConditions_Impl>();
380  pConditions->push_back( xCond );
381  }
382  xContext = xCond.get();
383  }
384 
385  if (!xContext)
386  xContext = XMLTextStyleContext::CreateChildContext( nPrefix, rLocalName,
387  xAttrList );
388 
389  return xContext;
390 }
391 
393 {
394  OUString sMasterPageName;
395  std::unique_ptr<SfxItemSet> pItemSet;
398 
399  OUString sDataStyleName;
400 
404 
406  sal_uInt16 nPrefix,
407  const OUString& rLName,
408  const uno::Reference< xml::sax::XAttributeList > & xAttrList);
409 
410 protected:
411 
412  virtual void SetAttribute( sal_uInt16 nPrefixKey,
413  const OUString& rLocalName,
414  const OUString& rValue ) override;
415 
416  SwXMLImport& GetSwImport() { return static_cast<SwXMLImport&>(GetImport()); }
417 
418 public:
419 
420 
422  SwXMLImport& rImport, sal_uInt16 nPrfx,
423  const OUString& rLName,
424  const uno::Reference< xml::sax::XAttributeList > & xAttrList,
425  SvXMLStylesContext& rStylesC,
426  sal_uInt16 nFamily);
427 
428  virtual void CreateAndInsert( bool bOverwrite ) override;
429 
431  sal_uInt16 nPrefix,
432  const OUString& rLocalName,
433  const uno::Reference< xml::sax::XAttributeList > & xAttrList ) override;
434 
435  // The item set may be empty!
436  SfxItemSet *GetItemSet() { return pItemSet.get(); }
437 
438  bool HasMasterPageName() const { return bHasMasterPageName; }
439 
440  bool IsPageDescConnected() const { return bPageDescConnected; }
441  void ConnectPageDesc();
442 
443  bool ResolveDataStyleName();
444 };
445 
447  const OUString& rLocalName,
448  const OUString& rValue )
449 {
450  if( XML_NAMESPACE_STYLE == nPrefixKey )
451  {
452  if ( IsXMLToken( rLocalName, XML_MASTER_PAGE_NAME ) )
453  {
454  sMasterPageName = rValue;
455  bHasMasterPageName = true;
456  }
457  else if ( IsXMLToken( rLocalName, XML_DATA_STYLE_NAME ) )
458  {
459  // if we have a valid data style name
460  if (!rValue.isEmpty())
461  {
462  sDataStyleName = rValue;
463  bDataStyleIsResolved = false; // needs to be resolved
464  }
465  }
466  else
467  {
468  SvXMLStyleContext::SetAttribute( nPrefixKey, rLocalName, rValue );
469  }
470  }
471  else
472  {
473  SvXMLStyleContext::SetAttribute( nPrefixKey, rLocalName, rValue );
474  }
475 }
476 
478  sal_uInt16 nPrefix, const OUString& rLName,
479  const uno::Reference< xml::sax::XAttributeList > & xAttrList )
480 {
481  OSL_ENSURE( !pItemSet,
482  "SwXMLItemSetStyleContext_Impl::CreateItemSetContext: item set exists" );
483 
484  SvXMLImportContext *pContext = nullptr;
485 
487 
488  SfxItemPool& rItemPool = pDoc->GetAttrPool();
489  switch( GetFamily() )
490  {
492  pItemSet.reset( new SfxItemSet( rItemPool, aTableSetRange ) );
493  break;
495  pItemSet.reset( new SfxItemSet( rItemPool, svl::Items<RES_FRM_SIZE, RES_FRM_SIZE>{} ) );
496  break;
498  pItemSet.reset( new SfxItemSet( rItemPool, aTableLineSetRange ) );
499  break;
501  pItemSet.reset( new SfxItemSet( rItemPool, aTableBoxSetRange ) );
502  break;
503  default:
504  OSL_ENSURE( false,
505  "SwXMLItemSetStyleContext_Impl::CreateItemSetContext: unknown family" );
506  break;
507  }
508  if( pItemSet )
510  nPrefix, rLName, xAttrList, GetFamily(),
511  *pItemSet );
512  if( !pContext )
513  {
514  pItemSet.reset();
515  }
516 
517  return pContext;
518 }
519 
520 
522  sal_uInt16 nPrfx, const OUString& rLName,
523  const uno::Reference< xml::sax::XAttributeList > & xAttrList,
524  SvXMLStylesContext& rStylesC,
525  sal_uInt16 nFamily ) :
526  SvXMLStyleContext( rImport, nPrfx, rLName, xAttrList, nFamily ),
527  pTextStyle( nullptr ),
528  rStyles( rStylesC ),
529  bHasMasterPageName( false ),
530  bPageDescConnected( false ),
531  bDataStyleIsResolved( true )
532 {
533 }
534 
536 {
537  if( pTextStyle )
538  pTextStyle->CreateAndInsert( bOverwrite );
539 }
540 
542  sal_uInt16 nPrefix,
543  const OUString& rLocalName,
544  const uno::Reference< xml::sax::XAttributeList > & xAttrList )
545 {
546  SvXMLImportContextRef xContext;
547 
548  if( XML_NAMESPACE_STYLE == nPrefix )
549  {
550  if( IsXMLToken( rLocalName, XML_TABLE_PROPERTIES ) ||
551  IsXMLToken( rLocalName, XML_TABLE_COLUMN_PROPERTIES ) ||
552  IsXMLToken( rLocalName, XML_TABLE_ROW_PROPERTIES ) ||
553  IsXMLToken( rLocalName, XML_TABLE_CELL_PROPERTIES ) )
554  {
555  xContext = CreateItemSetContext( nPrefix, rLocalName, xAttrList );
556  }
557  else if( IsXMLToken( rLocalName, XML_TEXT_PROPERTIES ) ||
558  IsXMLToken( rLocalName, XML_PARAGRAPH_PROPERTIES ))
559  {
560  if( !pTextStyle )
561  {
563  const OUString aStr = GetImport().GetNamespaceMap().GetQNameByKey(
564  nPrefix, GetXMLToken(XML_NAME) );
565  pTmp->AddAttribute( aStr, GetName() );
566  uno::Reference <xml::sax::XAttributeList> xTmpAttrList = pTmp;
568  rLocalName, xTmpAttrList, XML_STYLE_FAMILY_TEXT_PARAGRAPH, rStyles );
569  pTextStyle->StartElement( xTmpAttrList );
571  }
572  xContext = pTextStyle->CreateChildContext( nPrefix, rLocalName, xAttrList );
573  }
574  }
575 
576  if (!xContext)
577  xContext = SvXMLStyleContext::CreateChildContext( nPrefix, rLocalName,
578  xAttrList );
579 
580  return xContext;
581 }
582 
584 {
586  return;
587  bPageDescConnected = true;
588 
590 
591  // #i40788# - first determine the display name of the page style,
592  // then map this name to the corresponding user interface name.
594  sMasterPageName );
596  sName,
598  SwPageDesc *pPageDesc = pDoc->FindPageDesc(sName);
599  if( !pPageDesc )
600  {
601  // If the page style is a pool style, then we maybe have to create it
602  // first if it hasn't been used by now.
603  const sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sName, SwGetPoolIdFromName::PageDesc );
604  if( USHRT_MAX != nPoolId )
605  pPageDesc = pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool( nPoolId, false );
606  }
607 
608  if( !pPageDesc )
609  return;
610 
611  if( !pItemSet )
612  {
613  SfxItemPool& rItemPool = pDoc->GetAttrPool();
614  pItemSet.reset( new SfxItemSet( rItemPool, aTableSetRange ) );
615  }
616 
617  const SfxPoolItem *pItem;
618  std::unique_ptr<SwFormatPageDesc> pFormatPageDesc;
619  if( SfxItemState::SET == pItemSet->GetItemState( RES_PAGEDESC, false,
620  &pItem ) )
621  {
622  if( static_cast<const SwFormatPageDesc *>(pItem)->GetPageDesc() != pPageDesc )
623  pFormatPageDesc.reset(new SwFormatPageDesc( *static_cast<const SwFormatPageDesc *>(pItem) ));
624  }
625  else
626  pFormatPageDesc.reset(new SwFormatPageDesc());
627 
628  if( pFormatPageDesc )
629  {
630  pFormatPageDesc->RegisterToPageDesc( *pPageDesc );
631  pItemSet->Put( *pFormatPageDesc );
632  }
633 }
634 
636 {
637  // resolve, if not already done
638  if (! bDataStyleIsResolved)
639  {
640  // get the format key
641  sal_Int32 nFormat =
642  GetImport().GetTextImport()->GetDataStyleKey(sDataStyleName);
643 
644  // if the key is valid, insert Item into ItemSet
645  if( -1 != nFormat )
646  {
647  if( !pItemSet )
648  {
650 
651  SfxItemPool& rItemPool = pDoc->GetAttrPool();
652  pItemSet.reset( new SfxItemSet( rItemPool, aTableBoxSetRange ) );
653  }
654  SwTableBoxNumFormat aNumFormatItem(nFormat);
655  pItemSet->Put(aNumFormatItem);
656  }
657 
658  // now resolved
659  bDataStyleIsResolved = true;
660  return true;
661  }
662  else
663  {
664  // was already resolved; nothing to do
665  return false;
666  }
667 }
668 
670 {
671  SwXMLImport& GetSwImport() { return static_cast<SwXMLImport&>(GetImport()); }
672  const SwXMLImport& GetSwImport() const
673  { return static_cast<const SwXMLImport&>(GetImport()); }
674 
675 protected:
676 
677  virtual SvXMLStyleContext *CreateStyleChildContext( sal_uInt16 nPrefix,
678  const OUString& rLocalName,
679  const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override;
680 
681  virtual SvXMLStyleContext *CreateStyleStyleChildContext( sal_uInt16 nFamily,
682  sal_uInt16 nPrefix, const OUString& rLocalName,
683  const uno::Reference< xml::sax::XAttributeList > & xAttrList ) override;
685  sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString& rLocalName,
686  const uno::Reference< xml::sax::XAttributeList > & xAttrList ) override;
687  // HACK
689  sal_uInt16 nFamily ) const override;
690 
691  virtual uno::Reference < container::XNameContainer >
692  GetStylesContainer( sal_uInt16 nFamily ) const override;
693  virtual OUString GetServiceName( sal_uInt16 nFamily ) const override;
694  // HACK
695 
696 public:
697 
698 
700  SwXMLImport& rImport,
701  const OUString& rLName ,
702  const uno::Reference< xml::sax::XAttributeList > & xAttrList,
703  bool bAuto );
704 
705  virtual bool InsertStyleFamily( sal_uInt16 nFamily ) const override;
706 
707  virtual void EndElement() override;
708 };
709 
711  const OUString& rLocalName,
712  const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList )
713 {
714  SvXMLStyleContext* pContext = nullptr;
715 
716  if(nPrefix == XML_NAMESPACE_TABLE && IsXMLToken(rLocalName, XML_TABLE_TEMPLATE))
717  {
718  rtl::Reference<XMLTableImport> xTableImport = GetImport().GetShapeImport()->GetShapeTableImport();
719  pContext = xTableImport->CreateTableTemplateContext(nPrefix, rLocalName, xAttrList);
720  }
721  if (!pContext)
722  pContext = SvXMLStylesContext::CreateStyleChildContext(nPrefix, rLocalName, xAttrList);
723 
724  return pContext;
725 }
726 
728  sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString& rLocalName,
729  const uno::Reference< xml::sax::XAttributeList > & xAttrList )
730 {
731  SvXMLStyleContext *pStyle = nullptr;
732 
733  switch( nFamily )
734  {
736  pStyle = new SwXMLTextStyleContext_Impl( GetSwImport(), nPrefix,
737  rLocalName, xAttrList, nFamily, *this );
738  break;
743  // Distinguish real and automatic styles.
744  if (IsAutomaticStyle())
745  pStyle = new SwXMLItemSetStyleContext_Impl(GetSwImport(), nPrefix, rLocalName, xAttrList, *this, nFamily);
746  else if (nFamily == XML_STYLE_FAMILY_TABLE_CELL) // Real cell styles are used for table-template import.
747  pStyle = new XMLPropStyleContext(GetSwImport(), nPrefix, rLocalName, xAttrList, *this, nFamily);
748  else
749  SAL_WARN("sw.xml", "Context does not exists for non automatic table, column or row style.");
750  break;
752  // As long as there are no element items, we can use the text
753  // style class.
754  pStyle = new XMLTextShapeStyleContext( GetImport(), nPrefix,
755  rLocalName, xAttrList, *this, nFamily );
756  break;
757  default:
759  nPrefix,
760  rLocalName,
761  xAttrList );
762  break;
763  }
764 
765  return pStyle;
766 }
767 
769  sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString& rLocalName,
770  const uno::Reference< xml::sax::XAttributeList > & xAttrList )
771 {
772  SvXMLStyleContext *pStyle = nullptr;
773 
774  switch( nFamily )
775  {
779  pStyle = new XMLTextStyleContext( GetImport(), nPrefix, rLocalName,
780  xAttrList, *this, nFamily,
781  true );
782  break;
784  // There are no writer specific defaults for graphic styles!
785  pStyle = new XMLGraphicsDefaultStyle( GetImport(), nPrefix,
786  rLocalName, xAttrList, *this );
787  break;
788  default:
790  nPrefix,
791  rLocalName,
792  xAttrList );
793  break;
794  }
795 
796  return pStyle;
797 }
798 
800  SwXMLImport& rImport, const OUString& rLName,
801  const uno::Reference< xml::sax::XAttributeList > & xAttrList,
802  bool bAuto ) :
803  SvXMLStylesContext( rImport, XML_NAMESPACE_OFFICE, rLName, xAttrList, bAuto )
804 {
805 }
806 
807 bool SwXMLStylesContext_Impl::InsertStyleFamily( sal_uInt16 nFamily ) const
808 {
809  const SwXMLImport& rSwImport = GetSwImport();
810  const SfxStyleFamily nStyleFamilyMask = rSwImport.GetStyleFamilyMask();
811 
812  bool bIns = true;
813  switch( nFamily )
814  {
816  bIns = bool(nStyleFamilyMask & SfxStyleFamily::Para);
817  break;
819  bIns = bool(nStyleFamilyMask & SfxStyleFamily::Char);
820  break;
822  bIns = bool(nStyleFamilyMask & SfxStyleFamily::Frame);
823  break;
825  bIns = bool(nStyleFamilyMask & SfxStyleFamily::Pseudo);
826  break;
832  bIns = !(rSwImport.IsInsertMode() || rSwImport.IsStylesOnlyMode() ||
833  rSwImport.IsBlockMode());
834  break;
835  default:
836  bIns = SvXMLStylesContext::InsertStyleFamily( nFamily );
837  break;
838  }
839 
840  return bIns;
841 }
842 
844  sal_uInt16 nFamily ) const
845 {
847  if( nFamily == XML_STYLE_FAMILY_TABLE_TABLE )
849  const_cast<SwXMLStylesContext_Impl*>( this )->GetImport() );
850  else if( nFamily == XML_STYLE_FAMILY_TABLE_ROW )
852  const_cast<SwXMLStylesContext_Impl*>( this )->GetImport() );
853  else if( nFamily == XML_STYLE_FAMILY_TABLE_CELL )
855  const_cast<SwXMLStylesContext_Impl*>( this )->GetImport() );
856  else
857  xMapper = SvXMLStylesContext::GetImportPropertyMapper( nFamily );
858  return xMapper;
859 }
860 
861 uno::Reference < container::XNameContainer > SwXMLStylesContext_Impl::GetStylesContainer(
862  sal_uInt16 nFamily ) const
863 {
864  uno::Reference < container::XNameContainer > xStyles;
865  if( XML_STYLE_FAMILY_SD_GRAPHICS_ID == nFamily )
866  xStyles = const_cast<SvXMLImport *>(&GetImport())->GetTextImport()->GetFrameStyles();
867  else if( XML_STYLE_FAMILY_TABLE_CELL == nFamily )
868  xStyles = const_cast<SvXMLImport *>(&GetImport())->GetTextImport()->GetCellStyles();
869 
870  if (!xStyles.is())
871  xStyles = SvXMLStylesContext::GetStylesContainer( nFamily );
872 
873  return xStyles;
874 }
875 
876 OUString SwXMLStylesContext_Impl::GetServiceName( sal_uInt16 nFamily ) const
877 {
878  if( XML_STYLE_FAMILY_SD_GRAPHICS_ID == nFamily )
879  return OUString( "com.sun.star.style.FrameStyle" );
880  else if( XML_STYLE_FAMILY_TABLE_CELL == nFamily )
881  return OUString( "com.sun.star.style.CellStyle" );
882 
883  return SvXMLStylesContext::GetServiceName( nFamily );
884 }
885 
887 {
889 }
890 
892 {
893 protected:
894  virtual bool InsertStyleFamily( sal_uInt16 nFamily ) const override;
895 
896  SwXMLImport& GetSwImport() { return static_cast<SwXMLImport&>(GetImport()); }
897  const SwXMLImport& GetSwImport() const
898  { return static_cast<const SwXMLImport&>(GetImport()); }
899 
900 public:
901 
902 
904  SwXMLImport& rImport,
905  const OUString& rLName ,
906  const uno::Reference< xml::sax::XAttributeList > & xAttrList );
907 
908  virtual void EndElement() override;
909 };
910 
911 
913  SwXMLImport& rImport,
914  const OUString& rLName ,
915  const uno::Reference< xml::sax::XAttributeList > & xAttrList ) :
916  XMLTextMasterStylesContext( rImport, XML_NAMESPACE_OFFICE, rLName, xAttrList )
917 {
918 }
919 
920 bool SwXMLMasterStylesContext_Impl::InsertStyleFamily( sal_uInt16 nFamily ) const
921 {
922  bool bIns;
923 
924  const SwXMLImport& rSwImport = GetSwImport();
925  const SfxStyleFamily nStyleFamilyMask = rSwImport.GetStyleFamilyMask();
926  if( XML_STYLE_FAMILY_MASTER_PAGE == nFamily )
927  bIns = bool(nStyleFamilyMask & SfxStyleFamily::Page);
928  else
930 
931  return bIns;
932 }
933 
935 {
936  FinishStyles( !GetSwImport().IsInsertMode() );
938 }
939 
941  const OUString& rLocalName,
942  const uno::Reference< xml::sax::XAttributeList > & xAttrList,
943  bool bAuto )
944 {
945  SvXMLStylesContext *pContext =
946  new SwXMLStylesContext_Impl( *this, rLocalName,
947  xAttrList, bAuto );
948  if( bAuto )
949  SetAutoStyles( pContext );
950  else
951  SetStyles( pContext );
952 
953  return pContext;
954 }
955 
957  const OUString& rLocalName,
958  const uno::Reference< xml::sax::XAttributeList > & xAttrList )
959 {
960  SvXMLStylesContext *pContext =
961  new SwXMLMasterStylesContext_Impl( *this, rLocalName, xAttrList );
962  SetMasterStyles( pContext );
963 
964  return pContext;
965 }
966 
967 void SwXMLImport::InsertStyles( bool bAuto )
968 {
969  if( bAuto && GetAutoStyles() )
971  if( !bAuto && GetStyles() )
972  GetStyles()->CopyStylesToDoc( !IsInsertMode(), false );
973 }
974 
976 {
977  if( GetStyles() )
979 }
980 
982 {
983  if( !pDoc )
984  pDoc = SwImport::GetDocFromXMLImport( *this );
985 
986  const SwTextFormatColls& rColls = *pDoc->GetTextFormatColls();
987  const size_t nCount = rColls.size();
988  for( size_t i=0; i < nCount; ++i )
989  {
990  SwTextFormatColl *pColl = rColls[i];
991  if( pColl && RES_CONDTXTFMTCOLL == pColl->Which() )
992  {
993  const SwFormatCollConditions& rConditions =
994  static_cast<const SwConditionTextFormatColl *>(pColl)->GetCondColls();
995  bool bSendModify = false;
996  for( size_t j=0; j < rConditions.size() && !bSendModify; ++j )
997  {
998  const SwCollCondition& rCond = *rConditions[j];
999  switch( rCond.GetCondition() )
1000  {
1005  bSendModify = true;
1006  break;
1007  default: break;
1008  }
1009  }
1010  if( bSendModify )
1011  {
1012  SwCondCollCondChg aMsg( pColl );
1013  pColl->ModifyNotification( &aMsg, &aMsg );
1014  }
1015  }
1016  }
1017 }
1018 
1020  sal_uInt16 nFamily,
1021  const OUString& rName,
1022  const SfxItemSet **ppItemSet ) const
1023 {
1024  SwXMLItemSetStyleContext_Impl *pStyle = nullptr;
1025  if( GetAutoStyles() )
1026  {
1027  pStyle = const_cast<SwXMLItemSetStyleContext_Impl*>(dynamic_cast< const SwXMLItemSetStyleContext_Impl* >(
1028  GetAutoStyles()->
1029  FindStyleChildContext( nFamily, rName,
1030  true ) ) );
1031  if( pStyle )
1032  {
1033  if( ppItemSet )
1034  {
1035  if( XML_STYLE_FAMILY_TABLE_TABLE == pStyle->GetFamily() &&
1036  pStyle->HasMasterPageName() &&
1037  !pStyle->IsPageDescConnected() )
1038  pStyle->ConnectPageDesc();
1039  (*ppItemSet) = pStyle->GetItemSet();
1040 
1041  // resolve data style name late
1042  if( XML_STYLE_FAMILY_TABLE_CELL == pStyle->GetFamily() &&
1043  pStyle->ResolveDataStyleName() )
1044  {
1045  (*ppItemSet) = pStyle->GetItemSet();
1046  }
1047 
1048  }
1049  }
1050  }
1051 
1052  return pStyle != nullptr;
1053 }
1054 
1055 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxItemSet * GetItemSet()
Definition: xmlfmt.cxx:436
#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:912
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:727
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:438
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:672
void FinishStyles()
Definition: xmlfmt.cxx:975
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:396
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:521
XML_APPLY_STYLE_NAME
virtual void CreateAndInsert(bool bOverwrite) override
Definition: xmlfmt.cxx:535
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:364
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:541
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:355
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:876
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:934
XML_TABLE_TEMPLATE
#define XML_STYLE_FAMILY_TABLE_TABLE
virtual bool InsertStyleFamily(sal_uInt16 nFamily) const override
Definition: xmlfmt.cxx:807
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:395
bool IsAutomaticStyle() const
SvXMLImportContext * CreateMasterStylesContext(const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
Definition: xmlfmt.cxx:956
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
Any SAL_CALL getCaughtException()
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:446
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:920
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:861
sal_uInt16 const aTableSetRange[]
Definition: init.cxx:198
#define XML_STYLE_FAMILY_TEXT_OUTLINE
SvXMLImportContext * CreateItemSetContext(sal_uInt16 nPrefix, const OUString &rLName, const uno::Reference< xml::sax::XAttributeList > &xAttrList)
Definition: xmlfmt.cxx:477
sal_uInt16 GetFamily() const
sal_uInt32 GetSubCondition() const
Definition: xmlfmt.cxx:89
OUString GetCommandContextByIndex(sal_Int16 nIndex)
Definition: ccoll.cxx:88
virtual void EndElement() override
Definition: xmlfmt.cxx:886
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:843
XML_TABLE_HEADER
virtual void CreateAndInsert(bool bOverwrite) override
bool FindAutomaticStyle(sal_uInt16 nFamily, const OUString &rName, const SfxItemSet **ppItemSet) const
Definition: xmlfmt.cxx:1019
OUString sName
void SetMasterStyles(SvXMLStylesContext *pMasterStyles)
SwXMLImport & GetSwImport()
Definition: xmlfmt.cxx:416
int i
void UpdateTextCollConditions(SwDoc *pDoc)
Definition: xmlfmt.cxx:981
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:226
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:768
void InsertStyles(bool bAuto)
Definition: xmlfmt.cxx:967
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:799
std::vector< std::unique_ptr< SwCollCondition >> SwFormatCollConditions
Definition: fmtcol.hxx:200
sal_uInt16 const aTableLineSetRange[]
Definition: init.cxx:214
SwXMLConditionParser_Impl(const OUString &rInp)
Definition: xmlfmt.cxx:139
Master_CollCondition nCondition
Definition: xmlfmt.cxx:202
OString exceptionToString(const css::uno::Any &caught)
SvXMLStylesContext & rStyles
Definition: xmlfmt.cxx:397
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:710
#define XML_STYLE_FAMILY_TEXT_LIST
const SwTextFormatColls * GetTextFormatColls() const
Definition: doc.hxx:773
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:940
#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:1715
static SvXMLImportPropertyMapper * CreateTableRowDefaultExtPropMapper(SvXMLImport &)
bool IsPageDescConnected() const
Definition: xmlfmt.cxx:440
#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:897
sal_Int32 nPos
SwXMLImport & GetSwImport()
Definition: xmlfmt.cxx:671
SwXMLImport & GetSwImport()
Definition: xmlfmt.cxx:896
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:1307
rtl::Reference< XMLShapeImportHelper > const & GetShapeImport()
#define XML_STYLE_FAMILY_TEXT_LINENUMBERINGCONFIG
XML_CONDITION
XML_LIST_LEVEL
bool IsInsertMode() const
Definition: xmlimp.hxx:154