LibreOffice Module sw (master)  1
swblocks.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 <algorithm>
21 
22 #include <osl/diagnose.h>
23 #include <tools/urlobj.hxx>
24 #include <svl/fstathelper.hxx>
25 #include <svl/macitem.hxx>
26 #include <unotools/charclass.hxx>
27 #include <doc.hxx>
28 #include <pam.hxx>
29 #include <shellio.hxx>
30 #include <swblocks.hxx>
31 #include <SwXMLTextBlocks.hxx>
32 
33 #include <swerror.h>
34 
38 sal_uInt16 SwImpBlocks::Hash( const OUString& r )
39 {
40  sal_uInt16 n = 0;
41  // std::min requires an explicit cast to sal_Int32 on 32bit platforms
42  const sal_Int32 nLen = std::min(r.getLength(), static_cast<sal_Int32>(8));
43  for (sal_Int32 i=0; i<nLen; ++i)
44  {
45  n = ( n << 1 ) + r[i];
46  }
47  return n;
48 }
49 
50 SwBlockName::SwBlockName( const OUString& rShort, const OUString& rLong )
51  : aShort( rShort ), aLong( rLong ), aPackageName (rShort),
52  bIsOnlyTextFlagInit( false ), bIsOnlyText( false )
53 {
54  nHashS = SwImpBlocks::Hash( rShort );
55  nHashL = SwImpBlocks::Hash( rLong );
56 }
57 
58 SwBlockName::SwBlockName( const OUString& rShort, const OUString& rLong, const OUString& rPackageName)
59  : aShort( rShort ), aLong( rLong ), aPackageName (rPackageName),
60  bIsOnlyTextFlagInit( false ), bIsOnlyText( false )
61 {
62  nHashS = SwImpBlocks::Hash( rShort );
63  nHashL = SwImpBlocks::Hash( rLong );
64 }
65 
70 {
71  if( !FStatHelper::IsDocument( rFile ) )
72  return FileType::NoFile;
74  return FileType::XML;
75  //otherwise return NONE
76  return FileType::None;
77 }
78 
79 SwImpBlocks::SwImpBlocks( const OUString& rFile )
80  : m_aFile( rFile ),
81  m_aDateModified( Date::EMPTY ),
82  m_aTimeModified( tools::Time::EMPTY ),
84  m_bReadOnly( true ), m_bInPutMuchBlocks( false ),
85  m_bInfoChanged(false)
86 {
89  INetURLObject aObj(rFile);
90  aObj.setExtension( OUString() );
91  m_aName = aObj.GetBase();
92 }
93 
95 {
96 }
97 
102 {
103  m_xDoc->ClearDoc();
104 }
105 
109 std::unique_ptr<SwPaM> SwImpBlocks::MakePaM()
110 {
111  std::unique_ptr<SwPaM> pPam(new SwPaM( m_xDoc->GetNodes().GetEndOfContent() ));
112  pPam->Move( fnMoveBackward, GoInDoc );
113  pPam->SetMark();
114  pPam->Move( fnMoveForward, GoInDoc );
115  pPam->Exchange();
116  return pPam;
117 }
118 
119 sal_uInt16 SwImpBlocks::GetCount() const
120 {
121  return m_aNames.size();
122 }
123 
127 sal_uInt16 SwImpBlocks::GetIndex( const OUString& rShort ) const
128 {
129  const OUString s( GetAppCharClass().uppercase( rShort ) );
130  const sal_uInt16 nHash = Hash( s );
131  for( size_t i = 0; i < m_aNames.size(); i++ )
132  {
133  const SwBlockName* pName = m_aNames[ i ].get();
134  if( pName->nHashS == nHash
135  && pName->aShort == s )
136  return i;
137  }
138  return USHRT_MAX;
139 }
140 
141 sal_uInt16 SwImpBlocks::GetLongIndex( const OUString& rLong ) const
142 {
143  sal_uInt16 nHash = Hash( rLong );
144  for( size_t i = 0; i < m_aNames.size(); i++ )
145  {
146  const SwBlockName* pName = m_aNames[ i ].get();
147  if( pName->nHashL == nHash
148  && pName->aLong == rLong )
149  return i;
150  }
151  return USHRT_MAX;
152 }
153 
154 OUString SwImpBlocks::GetShortName( sal_uInt16 n ) const
155 {
156  if( n < m_aNames.size() )
157  return m_aNames[n]->aShort;
158  return OUString();
159 }
160 
161 OUString SwImpBlocks::GetLongName( sal_uInt16 n ) const
162 {
163  if( n < m_aNames.size() )
164  return m_aNames[n]->aLong;
165  return OUString();
166 }
167 
168 OUString SwImpBlocks::GetPackageName( sal_uInt16 n ) const
169 {
170  if( n < m_aNames.size() )
171  return m_aNames[n]->aPackageName;
172  return OUString();
173 }
174 
175 void SwImpBlocks::AddName( const OUString& rShort, const OUString& rLong,
176  bool bOnlyText )
177 {
178  sal_uInt16 nIdx = GetIndex( rShort );
179  if( nIdx != USHRT_MAX )
180  {
181  m_aNames.erase( m_aNames.begin() + nIdx );
182  }
183  std::unique_ptr<SwBlockName> pNew(new SwBlockName( rShort, rLong ));
184  pNew->bIsOnlyTextFlagInit = true;
185  pNew->bIsOnlyText = bOnlyText;
186  m_aNames.insert( std::move(pNew) );
187 }
188 
190 {
191  Date aTempDateModified( m_aDateModified );
192  tools::Time aTempTimeModified( m_aTimeModified );
193  return FStatHelper::GetModifiedDateTimeOfFile( m_aFile, &aTempDateModified, &aTempTimeModified ) &&
194  ( m_aDateModified != aTempDateModified ||
195  m_aTimeModified != aTempTimeModified );
196 }
197 
199 {
201 }
202 
203 bool SwImpBlocks::IsOnlyTextBlock( const OUString& ) const
204 {
205  return false;
206 }
207 
209 {
210  return ERRCODE_NONE;
211 }
212 
214 {
215  return ERRCODE_NONE;
216 }
217 
219 {
220  return false;
221 }
222 
223 SwTextBlocks::SwTextBlocks( const OUString& rFile )
224  : m_nErr( 0 )
225 {
226  INetURLObject aObj(rFile);
227  const OUString sFileName = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
228  switch( SwImpBlocks::GetFileType( rFile ) )
229  {
230  case SwImpBlocks::FileType::XML: m_pImp.reset( new SwXMLTextBlocks( sFileName ) ); break;
231  case SwImpBlocks::FileType::NoFile: m_pImp.reset( new SwXMLTextBlocks( sFileName ) ); break;
232  default: break;
233  }
234  if( !m_pImp )
236 }
237 
239 {
240 }
241 
242 OUString SwTextBlocks::GetName() const
243 {
244  return m_pImp ? m_pImp->m_aName : OUString();
245 }
246 
247 void SwTextBlocks::SetName( const OUString& r )
248 {
249  if( m_pImp )
250  m_pImp->SetName( r );
251 }
252 
253 sal_uInt16 SwTextBlocks::GetCount() const
254 {
255  return m_pImp ? m_pImp->GetCount() : 0;
256 }
257 
258 sal_uInt16 SwTextBlocks::GetIndex( const OUString& r ) const
259 {
260  return m_pImp ? m_pImp->GetIndex( r ) : USHRT_MAX;
261 }
262 
263 sal_uInt16 SwTextBlocks::GetLongIndex( const OUString& r ) const
264 {
265  return m_pImp ? m_pImp->GetLongIndex( r ) : USHRT_MAX;
266 }
267 
268 OUString SwTextBlocks::GetShortName( sal_uInt16 n ) const
269 {
270  if( m_pImp )
271  return m_pImp->GetShortName( n );
272  return OUString();
273 }
274 
275 OUString SwTextBlocks::GetLongName( sal_uInt16 n ) const
276 {
277  if( m_pImp )
278  return m_pImp->GetLongName( n );
279  return OUString();
280 }
281 
282 bool SwTextBlocks::Delete( sal_uInt16 n )
283 {
284  if( m_pImp && !m_pImp->m_bInPutMuchBlocks )
285  {
286  if( m_pImp->IsFileChanged() )
288  else if( ERRCODE_NONE == (m_nErr = m_pImp->OpenFile( false ) ))
289  {
290  m_nErr = m_pImp->Delete( n );
291  if( !m_nErr )
292  {
293  m_pImp->m_aNames.erase( m_pImp->m_aNames.begin() + n );
294  }
295  if( n == m_pImp->m_nCurrentIndex )
296  m_pImp->m_nCurrentIndex = USHRT_MAX;
297  if( !m_nErr )
298  m_nErr = m_pImp->MakeBlockList();
299  }
300  m_pImp->CloseFile();
301  m_pImp->Touch();
302 
303  return ( m_nErr == ERRCODE_NONE );
304  }
305  return false;
306 }
307 
308 void SwTextBlocks::Rename( sal_uInt16 n, const OUString* s, const OUString* l )
309 {
310  if( m_pImp && !m_pImp->m_bInPutMuchBlocks )
311  {
312  m_pImp->m_nCurrentIndex = USHRT_MAX;
313  OUString aNew;
314  OUString aLong;
315  if( s )
316  aNew = aLong = *s;
317  if( l )
318  aLong = *l;
319  if( aNew.isEmpty() )
320  {
321  OSL_ENSURE( false, "No short name provided in the rename" );
323  return;
324  }
325 
326  if( m_pImp->IsFileChanged() )
328  else if( ERRCODE_NONE == ( m_nErr = m_pImp->OpenFile( false )))
329  {
330  // Set the new entry in the list before we do that!
331  aNew = GetAppCharClass().uppercase( aNew );
332  m_nErr = m_pImp->Rename( n, aNew );
333  if( !m_nErr )
334  {
335  bool bOnlyText = m_pImp->m_aNames[ n ]->bIsOnlyText;
336  m_pImp->m_aNames.erase( m_pImp->m_aNames.begin() + n );
337  m_pImp->AddName( aNew, aLong, bOnlyText );
338  m_nErr = m_pImp->MakeBlockList();
339  }
340  }
341  m_pImp->CloseFile();
342  m_pImp->Touch();
343  }
344 }
345 
346 bool SwTextBlocks::BeginGetDoc( sal_uInt16 n )
347 {
348  if( m_pImp && !m_pImp->m_bInPutMuchBlocks )
349  {
350  if( m_pImp->IsFileChanged() )
352  else if( ERRCODE_NONE == ( m_nErr = m_pImp->OpenFile()))
353  {
354  m_pImp->ClearDoc();
355  m_nErr = m_pImp->GetDoc( n );
356  if( m_nErr )
357  m_pImp->m_nCurrentIndex = USHRT_MAX;
358  else
359  m_pImp->m_nCurrentIndex = n;
360  }
361  return ( m_nErr == ERRCODE_NONE );
362  }
363  return false;
364 }
365 
367 {
368  if( m_pImp && !m_pImp->m_bInPutMuchBlocks )
369  m_pImp->CloseFile();
370 }
371 
372 bool SwTextBlocks::BeginPutDoc( const OUString& s, const OUString& l )
373 {
374  if( m_pImp )
375  {
376  bool bOk = m_pImp->m_bInPutMuchBlocks;
377  if( !bOk )
378  {
379  if( m_pImp->IsFileChanged() )
381  else
382  m_nErr = m_pImp->OpenFile( false );
383  bOk = ERRCODE_NONE == m_nErr;
384  }
385  if( bOk )
386  {
387  const OUString aNew = GetAppCharClass().uppercase(s);
388  m_nErr = m_pImp->BeginPutDoc( aNew, l );
389  }
390  if( m_nErr )
391  m_pImp->CloseFile();
392  }
393  return ERRCODE_NONE == m_nErr;
394 }
395 
397 {
398  sal_uInt16 nIdx = USHRT_MAX;
399  if( m_pImp )
400  {
401  m_nErr = m_pImp->PutDoc();
402  if( !m_nErr )
403  {
404  m_pImp->m_nCurrentIndex = GetIndex( m_pImp->m_aShort );
405  if( m_pImp->m_nCurrentIndex != USHRT_MAX )
406  m_pImp->m_aNames[ m_pImp->m_nCurrentIndex ]->aLong = m_pImp->m_aLong;
407  else
408  {
409  m_pImp->AddName( m_pImp->m_aShort, m_pImp->m_aLong );
410  m_pImp->m_nCurrentIndex = m_pImp->GetIndex( m_pImp->m_aShort );
411  }
412  if( !m_pImp->m_bInPutMuchBlocks )
413  m_nErr = m_pImp->MakeBlockList();
414  }
415  if( !m_pImp->m_bInPutMuchBlocks )
416  {
417  m_pImp->CloseFile();
418  m_pImp->Touch();
419  }
420  nIdx = m_pImp->m_nCurrentIndex;
421  }
422  return nIdx;
423 }
424 
425 sal_uInt16 SwTextBlocks::PutText( const OUString& rShort, const OUString& rName,
426  const OUString& rText )
427 {
428  sal_uInt16 nIdx = USHRT_MAX;
429  if( m_pImp )
430  {
431  bool bOk = m_pImp->m_bInPutMuchBlocks;
432  if( !bOk )
433  {
434  if( m_pImp->IsFileChanged() )
436  else
437  m_nErr = m_pImp->OpenFile( false );
438  bOk = ERRCODE_NONE == m_nErr;
439  }
440  if( bOk )
441  {
442  OUString aNew = GetAppCharClass().uppercase( rShort );
443  m_nErr = m_pImp->PutText( aNew, rName, rText );
444  m_pImp->m_nCurrentIndex = USHRT_MAX;
445  if( !m_nErr )
446  {
447  nIdx = GetIndex( m_pImp->m_aShort );
448  if( nIdx != USHRT_MAX )
449  m_pImp->m_aNames[ nIdx ]->aLong = rName;
450  else
451  {
452  m_pImp->AddName( m_pImp->m_aShort, rName, true );
453  nIdx = m_pImp->GetIndex( m_pImp->m_aShort );
454  }
455  if( !m_pImp->m_bInPutMuchBlocks )
456  m_nErr = m_pImp->MakeBlockList();
457  }
458  }
459  if( !m_pImp->m_bInPutMuchBlocks )
460  {
461  m_pImp->CloseFile();
462  m_pImp->Touch();
463  }
464  }
465  return nIdx;
466 }
467 
469 {
470  if( m_pImp )
471  return m_pImp->m_xDoc.get();
472  return nullptr;
473 }
474 
476 {
477  if( m_pImp )
478  {
479  m_pImp->ClearDoc();
480  m_pImp->m_nCurrentIndex = USHRT_MAX;
481  }
482 }
483 
484 OUString const & SwTextBlocks::GetFileName() const
485 {
486  return m_pImp->GetFileName();
487 }
488 
490 {
491  return m_pImp->m_bReadOnly;
492 }
493 
494 bool SwTextBlocks::IsOnlyTextBlock( sal_uInt16 nIdx ) const
495 {
496  bool bRet = false;
497  if( m_pImp && !m_pImp->m_bInPutMuchBlocks )
498  {
499  SwBlockName* pBlkNm = m_pImp->m_aNames[ nIdx ].get();
500  if( !pBlkNm->bIsOnlyTextFlagInit &&
501  !m_pImp->IsFileChanged() && !m_pImp->OpenFile() )
502  {
503  pBlkNm->bIsOnlyText = m_pImp->IsOnlyTextBlock( pBlkNm->aShort );
504  pBlkNm->bIsOnlyTextFlagInit = true;
505  m_pImp->CloseFile();
506  }
507  bRet = pBlkNm->bIsOnlyText;
508  }
509  return bRet;
510 }
511 
512 bool SwTextBlocks::IsOnlyTextBlock( const OUString& rShort ) const
513 {
514  sal_uInt16 nIdx = m_pImp->GetIndex( rShort );
515  if( USHRT_MAX != nIdx )
516  {
517  if( m_pImp->m_aNames[ nIdx ]->bIsOnlyTextFlagInit )
518  return m_pImp->m_aNames[ nIdx ]->bIsOnlyText;
519  return IsOnlyTextBlock( nIdx );
520  }
521 
522  OSL_ENSURE( false, "Invalid name" );
523  return false;
524 }
525 
526 bool SwTextBlocks::GetMacroTable( sal_uInt16 nIdx, SvxMacroTableDtor& rMacroTable )
527 {
528  bool bRet = true;
529  if ( m_pImp && !m_pImp->m_bInPutMuchBlocks )
530  bRet = ( ERRCODE_NONE == m_pImp->GetMacroTable( nIdx, rMacroTable ) );
531  return bRet;
532 }
533 
534 bool SwTextBlocks::SetMacroTable( sal_uInt16 nIdx, const SvxMacroTableDtor& rMacroTable )
535 {
536  bool bRet = true;
537  if ( m_pImp && !m_pImp->m_bInPutMuchBlocks )
538  bRet = ( ERRCODE_NONE == m_pImp->SetMacroTable( nIdx, rMacroTable ) );
539  return bRet;
540 }
541 
543 {
544  bool bRet = false;
545  if( m_pImp )
546  bRet = m_pImp->PutMuchEntries( true );
547  return bRet;
548 }
549 
551 {
552  if( m_pImp )
553  m_pImp->PutMuchEntries( false );
554 }
555 
556 OUString SwTextBlocks::GetBaseURL() const
557 {
558  if(m_pImp)
559  return m_pImp->GetBaseURL();
560  return OUString();
561 }
562 
563 void SwTextBlocks::SetBaseURL( const OUString& rURL )
564 {
565  if(m_pImp)
566  m_pImp->SetBaseURL(rURL);
567 }
568 
569 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void ClearDoc()
Delete the document's content.
Definition: swblocks.cxx:101
ErrCode m_nErr
Definition: shellio.hxx:315
void EndGetDoc()
Definition: swblocks.cxx:366
SVL_DLLPUBLIC bool IsDocument(const OUString &rURL)
bool IsOnlyTextBlock(sal_uInt16) const
Definition: swblocks.cxx:494
void SetName(const OUString &)
Definition: swblocks.cxx:247
virtual void AddName(const OUString &, const OUString &, bool bOnlyText=false)
Definition: swblocks.cxx:175
sal_uInt16 PutDoc()
Definition: swblocks.cxx:396
rtl::Reference< SwDoc > m_xDoc
Definition: swblocks.hxx:66
bool bIsOnlyTextFlagInit
Package name.
Definition: swblocks.hxx:42
sal_uInt16 GetIndex(const OUString &) const
Get count of Text Blocks.
Definition: swblocks.cxx:127
virtual ~SwImpBlocks()
Definition: swblocks.cxx:94
sal_Int64 n
Definition: doc.hxx:186
OUString GetLongName(sal_uInt16) const
Definition: swblocks.cxx:275
OUString aShort
Definition: swblocks.hxx:39
void Rename(sal_uInt16, const OUString *, const OUString *)
Definition: swblocks.cxx:308
virtual ErrCode SetMacroTable(sal_uInt16 nIdx, const SvxMacroTableDtor &rMacroTable)
Definition: swblocks.cxx:213
tools::Time m_aTimeModified
Definition: swblocks.hxx:65
OUString GetBase() const
bool setExtension(OUString const &rTheExtension, sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
SwBlockName(const OUString &rShort, const OUString &rLong)
Unformatted text.
Definition: swblocks.cxx:50
sal_uInt16 GetCount() const
Hashcode for Block names.
Definition: swblocks.cxx:119
SwImpBlocks(const OUString &)
Definition: swblocks.cxx:79
OUString m_aFile
Definition: swblocks.hxx:58
bool BeginGetDoc(sal_uInt16)
Definition: swblocks.cxx:346
size_type size() const
bool IsFileChanged() const
Definition: swblocks.cxx:189
virtual bool IsOnlyTextBlock(const OUString &rShort) const
Definition: swblocks.cxx:203
virtual ErrCode GetMacroTable(sal_uInt16 nIdx, SvxMacroTableDtor &rMacroTable)
Definition: swblocks.cxx:208
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
#define ERR_TXTBLOCK_NEWFILE_ERROR
Definition: swerror.h:34
sal_uInt16 char * pName
void SetBaseURL(const OUString &rURL)
Definition: swblocks.cxx:563
int i
sal_uInt16 PutText(const OUString &, const OUString &, const OUString &)
Definition: swblocks.cxx:425
sal_uInt16 GetLongIndex(const OUString &) const
Definition: swblocks.cxx:263
OUString uppercase(const OUString &rStr, sal_Int32 nPos, sal_Int32 nCount) const
sal_uInt16 GetLongIndex(const OUString &) const
Index for shortnames.
Definition: swblocks.cxx:141
void EndPutMuchBlockEntries()
Definition: swblocks.cxx:550
bool GoInDoc(SwPaM &rPam, SwMoveFnCollection const &fnMove)
Definition: pam.cxx:942
static FileType GetFileType(const OUString &)
Is the provided file a storage or doesn't it exist?
Definition: swblocks.cxx:69
SwTextBlocks(const OUString &)
Definition: swblocks.cxx:223
bool IsReadOnly() const
Definition: swblocks.cxx:489
OUString GetShortName(sal_uInt16) const
Index for longnames.
Definition: swblocks.cxx:154
OUString GetLongName(sal_uInt16) const
Return shortname for index.
Definition: swblocks.cxx:161
OUString m_aName
Definition: swblocks.hxx:59
SwDoc * GetDoc()
Definition: swblocks.cxx:468
sal_uInt16 GetCount() const
Definition: swblocks.cxx:253
const_iterator begin() const
std::unique_ptr< SwPaM > MakePaM()
Creating a PaM, that spans the whole document.
Definition: swblocks.cxx:109
bool BeginPutDoc(const OUString &, const OUString &)
Definition: swblocks.cxx:372
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
bool Delete(sal_uInt16)
Definition: swblocks.cxx:282
OUString GetBaseURL() const
Definition: swblocks.cxx:556
bool GetMacroTable(sal_uInt16 nIdx, SvxMacroTableDtor &rMacroTable)
Definition: swblocks.cxx:526
size_t m_nCurrentIndex
#define ERRCODE_NONE
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:253
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
Definition: paminit.cxx:59
OUString aLong
Shortname.
Definition: swblocks.hxx:40
sal_uInt16 GetIndex(const OUString &) const
Definition: swblocks.cxx:258
#define ERR_SWG_INTERNAL_ERROR
Definition: swerror.h:33
bool bIsOnlyText
Is the Flag valid?
Definition: swblocks.hxx:43
sal_uInt16 nHashS
Definition: swblocks.hxx:37
std::unique_ptr< SwImpBlocks > m_pImp
Definition: shellio.hxx:314
SVL_DLLPUBLIC bool GetModifiedDateTimeOfFile(const OUString &rURL, Date *pDate, tools::Time *pTime)
OUString GetName() const
Definition: swblocks.cxx:242
void ClearDoc()
Definition: swblocks.cxx:475
bool m_bReadOnly
SwMoveFnCollection const & fnMoveBackward
Definition: paminit.cxx:58
Date m_aDateModified
Definition: swblocks.hxx:64
sal_uInt16 nHashL
Definition: swblocks.hxx:37
OUString GetPackageName(sal_uInt16) const
Return longname for index.
Definition: swblocks.cxx:168
OUString GetShortName(sal_uInt16) const
Definition: swblocks.cxx:268
bool SetMacroTable(sal_uInt16 nIdx, const SvxMacroTableDtor &rMacroTable)
Definition: swblocks.cxx:534
std::pair< const_iterator, bool > insert(Value &&x)
virtual bool PutMuchEntries(bool bOn)
Definition: swblocks.cxx:218
CharClass & GetAppCharClass()
Definition: init.cxx:709
SwBlockNames m_aNames
Definition: swblocks.hxx:63
bool StartPutMuchBlockEntries()
Definition: swblocks.cxx:542
static bool IsFileUCBStorage(const OUString &rFileName)
#define ERR_SWG_FILE_FORMAT_ERROR
Definition: swerror.h:24
OUString const & GetFileName() const
Definition: swblocks.cxx:484
static sal_uInt16 Hash(const OUString &)
Calculate hash code (is not guaranteed to be unique)
Definition: swblocks.cxx:38
size_type erase(const Value &x)
void Touch()
Definition: swblocks.cxx:198