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