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