LibreOffice Module sw (master) 1
glosdoc.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#include <string_view>
22
23#include <com/sun/star/container/XNamed.hpp>
25
27
28#include <vcl/errinf.hxx>
29#include <osl/diagnose.h>
30#include <rtl/character.hxx>
31#include <svl/urihelper.hxx>
32#include <svl/fstathelper.hxx>
34#include <unotools/tempfile.hxx>
35#include <o3tl/string_view.hxx>
36#include <swtypes.hxx>
37#include <glosdoc.hxx>
38#include <shellio.hxx>
39#include <swunohelper.hxx>
40
41#include <unoatxt.hxx>
42#include <swerror.h>
43
44#include <memory>
45
46using namespace ::com::sun::star;
47using namespace ::com::sun::star::uno;
48
49namespace
50{
51
52OUString lcl_FullPathName(std::u16string_view sPath, std::u16string_view sName)
53{
54 return OUString::Concat(sPath) + "/" + sName + SwGlossaries::GetExtension();
55}
56
57OUString lcl_CheckFileName( const OUString& rNewFilePath,
58 std::u16string_view aNewGroupName )
59{
60 const sal_Int32 nLen = aNewGroupName.size();
61 OUStringBuffer aBuf(nLen);
62 //group name should contain only A-Z and a-z and spaces
63 for( sal_Int32 i=0; i < nLen; ++i )
64 {
65 const sal_Unicode cChar = aNewGroupName[i];
66 if (rtl::isAsciiAlphanumeric(cChar) ||
67 cChar == '_' || cChar == 0x20)
68 {
69 aBuf.append(cChar);
70 }
71 }
72
73 const OUString sRet = aBuf.makeStringAndClear().trim();
74 if ( !sRet.isEmpty() )
75 {
76 if (!FStatHelper::IsDocument( lcl_FullPathName(rNewFilePath, sRet) ))
77 return sRet;
78 }
79
80 //generate generic name
81 utl::TempFileNamed aTemp(u"group", true, SwGlossaries::GetExtension(), &rNewFilePath);
82 aTemp.EnableKillingFile();
83
84 INetURLObject aTempURL( aTemp.GetURL() );
85 return aTempURL.GetBase();
86}
87
88}
89
90// supplies the default group's name
92{
93 return "standard";
94
95}
96
97// supplies the number of text block groups
99{
100 return GetNameList().size();
101}
102
103// supplies the group's name
104bool SwGlossaries::FindGroupName(OUString& rGroup)
105{
106 // if the group name doesn't contain a path, a suitable group entry
107 // can the searched for here;
108 const size_t nCount = GetGroupCnt();
109 for(size_t i = 0; i < nCount; ++i)
110 {
111 const OUString sTemp(GetGroupName(i));
112 if (rGroup == o3tl::getToken(sTemp, 0, GLOS_DELIM))
113 {
114 rGroup = sTemp;
115 return true;
116 }
117 }
118 // you can search two times because for more directories the case sensitive
119 // name could occur multiple times
120 const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
121 for(size_t i = 0; i < nCount; ++i)
122 {
123 const OUString sTemp( GetGroupName( i ));
124 sal_uInt16 nPath = o3tl::toUInt32(o3tl::getToken(sTemp, 1, GLOS_DELIM));
125
127 && rSCmp.isEqual( rGroup, sTemp.getToken( 0, GLOS_DELIM) ) )
128 {
129 rGroup = sTemp;
130 return true;
131 }
132 }
133 return false;
134}
135
136OUString const & SwGlossaries::GetGroupName(size_t nGroupId)
137{
138 OSL_ENSURE(nGroupId < m_GlosArr.size(),
139 "SwGlossaries::GetGroupName: index out of bounds");
140 return m_GlosArr[nGroupId];
141}
142
143OUString SwGlossaries::GetGroupTitle( const OUString& rGroupName )
144{
145 OUString sRet;
146 OUString sGroup(rGroupName);
147 if (sGroup.indexOf(GLOS_DELIM)<0)
148 FindGroupName(sGroup);
149 std::unique_ptr<SwTextBlocks> pGroup = GetGroupDoc(sGroup);
150 if(pGroup)
151 {
152 sRet = pGroup->GetName();
153 }
154 return sRet;
155}
156
157// supplies the group rName's text block document
158std::unique_ptr<SwTextBlocks> SwGlossaries::GetGroupDoc(const OUString &rName,
159 bool bCreate)
160{
161 // insert to the list of text blocks if applicable
162 if(bCreate && !m_GlosArr.empty())
163 {
164 if (std::none_of(m_GlosArr.begin(), m_GlosArr.end(),
165 [&rName](const OUString& rEntry) { return rEntry == rName; }))
166 { // block not in the list
167 m_GlosArr.push_back(rName);
168 }
169 }
170 return GetGlosDoc( rName, bCreate );
171}
172
173// Creates a new document with the group name. temporarily also created as file
174// so that groups remain there later (without access).
175bool SwGlossaries::NewGroupDoc(OUString& rGroupName, const OUString& rTitle)
176{
177 const std::u16string_view sNewPath(o3tl::getToken(rGroupName, 1, GLOS_DELIM));
178 sal_uInt16 nNewPath = o3tl::narrowing<sal_uInt16>(o3tl::toInt32(sNewPath));
179 if (static_cast<size_t>(nNewPath) >= m_PathArr.size())
180 return false;
181 const OUString sNewFilePath(m_PathArr[nNewPath]);
182 const OUString sNewGroup = lcl_CheckFileName(sNewFilePath, o3tl::getToken(rGroupName, 0, GLOS_DELIM))
183 + OUStringChar(GLOS_DELIM) + sNewPath;
184 std::unique_ptr<SwTextBlocks> pBlock = GetGlosDoc( sNewGroup );
185 if(pBlock)
186 {
187 GetNameList().push_back(sNewGroup);
188 pBlock->SetName(rTitle);
189 rGroupName = sNewGroup;
190 return true;
191 }
192 return false;
193}
194
196 const OUString& rOldGroup, OUString& rNewGroup, const OUString& rNewTitle )
197{
198 sal_uInt16 nOldPath = o3tl::narrowing<sal_uInt16>(o3tl::toInt32(o3tl::getToken(rOldGroup, 1, GLOS_DELIM)));
199 if (static_cast<size_t>(nOldPath) >= m_PathArr.size())
200 return false;
201
202 const OUString sOldFileURL =
203 lcl_FullPathName(m_PathArr[nOldPath], o3tl::getToken(rOldGroup, 0, GLOS_DELIM));
204
205 if (!FStatHelper::IsDocument( sOldFileURL ))
206 {
207 OSL_FAIL("group doesn't exist!");
208 return false;
209 }
210
211 sal_uInt16 nNewPath = o3tl::narrowing<sal_uInt16>(o3tl::toInt32(o3tl::getToken(rNewGroup, 1, GLOS_DELIM)));
212 if (static_cast<size_t>(nNewPath) >= m_PathArr.size())
213 return false;
214
215 const OUString sNewFileName = lcl_CheckFileName(m_PathArr[nNewPath],
216 o3tl::getToken(rNewGroup, 0, GLOS_DELIM));
217 const OUString sNewFileURL = lcl_FullPathName(m_PathArr[nNewPath], sNewFileName);
218
219 if (FStatHelper::IsDocument( sNewFileURL ))
220 {
221 OSL_FAIL("group already exists!");
222 return false;
223 }
224
225 if (!SWUnoHelper::UCB_MoveFile(sOldFileURL, sNewFileURL ))
226 return false;
227
228 RemoveFileFromList( rOldGroup );
229
230 rNewGroup = sNewFileName + OUStringChar(GLOS_DELIM) + OUString::number(nNewPath);
231 if (m_GlosArr.empty())
232 {
233 GetNameList();
234 }
235 else
236 {
237 m_GlosArr.push_back(rNewGroup);
238 }
239
240 SwTextBlocks aNewBlock( sNewFileURL );
241 aNewBlock.SetName(rNewTitle);
242
243 return true;
244}
245
246// Deletes a text block group
247bool SwGlossaries::DelGroupDoc(std::u16string_view rName)
248{
249 sal_uInt16 nPath = o3tl::narrowing<sal_uInt16>(o3tl::toInt32(o3tl::getToken(rName, 1, GLOS_DELIM)));
250 if (static_cast<size_t>(nPath) >= m_PathArr.size())
251 return false;
252 const std::u16string_view sBaseName(o3tl::getToken(rName, 0, GLOS_DELIM));
253 const OUString sFileURL = lcl_FullPathName(m_PathArr[nPath], sBaseName);
254 const OUString aName = sBaseName + OUStringChar(GLOS_DELIM) + OUString::number(nPath);
255 // Even if the file doesn't exist it has to be deleted from
256 // the list of text block regions
257 // no && because of CFfront
258 bool bRemoved = SWUnoHelper::UCB_DeleteFile( sFileURL );
259 OSL_ENSURE(bRemoved, "file has not been removed");
261 return bRemoved;
262}
263
265{
267}
268
269// read a block document
270std::unique_ptr<SwTextBlocks> SwGlossaries::GetGlosDoc( const OUString &rName, bool bCreate ) const
271{
272 sal_uInt16 nPath = o3tl::narrowing<sal_uInt16>(o3tl::toInt32(o3tl::getToken(rName, 1, GLOS_DELIM)));
273 std::unique_ptr<SwTextBlocks> pTmp;
274 if (static_cast<size_t>(nPath) < m_PathArr.size())
275 {
276 const OUString sFileURL =
277 lcl_FullPathName(m_PathArr[nPath], o3tl::getToken(rName, 0, GLOS_DELIM));
278
279 bool bExist = false;
280 if(!bCreate)
281 bExist = FStatHelper::IsDocument( sFileURL );
282
283 if (bCreate || bExist)
284 {
285 pTmp.reset(new SwTextBlocks( sFileURL ));
286 bool bOk = true;
287 if( pTmp->GetError() )
288 {
289 ErrorHandler::HandleError( pTmp->GetError() );
290 bOk = ! pTmp->GetError().IsError();
291 }
292
293 if( bOk && pTmp->GetName().isEmpty() )
294 pTmp->SetName( rName );
295 }
296 }
297
298 return pTmp;
299}
300
301// access to the list of names; read in if applicable
302std::vector<OUString> & SwGlossaries::GetNameList()
303{
304 if (m_GlosArr.empty())
305 {
306 const OUString sExt( SwGlossaries::GetExtension() );
307 for (size_t i = 0; i < m_PathArr.size(); ++i)
308 {
309 std::vector<OUString> aFiles;
310
312 for (const OUString& aTitle : aFiles)
313 {
314 const OUString sName( aTitle.subView( 0, aTitle.getLength() - sExt.getLength() )
315 + OUStringChar(GLOS_DELIM) + OUString::number( static_cast<sal_Int16>(i) ));
316 m_GlosArr.push_back(sName);
317 }
318 }
319 if (m_GlosArr.empty())
320 {
321 // the standard block is inside of the path's first part
322 m_GlosArr.emplace_back(SwGlossaries::GetDefName() + OUStringChar(GLOS_DELIM) + "0" );
323 }
324 }
325 return m_GlosArr;
326}
327
329{
330 UpdateGlosPath(true);
331}
332
333// set new path and recreate internal array
334static OUString lcl_makePath(const std::vector<OUString>& rPaths)
335{
336 std::vector<OUString>::const_iterator aIt(rPaths.begin());
337 const std::vector<OUString>::const_iterator aEnd(rPaths.end());
338 OUStringBuffer aPath(*aIt);
339 for (++aIt; aIt != aEnd; ++aIt)
340 {
341 aPath.append(SVT_SEARCHPATH_DELIMITER);
342 const INetURLObject aTemp(*aIt);
343 aPath.append(aTemp.GetFull());
344 }
345 return aPath.makeStringAndClear();
346}
347
349{
350 SvtPathOptions aPathOpt;
351 const OUString& aNewPath( aPathOpt.GetAutoTextPath() );
352 bool bPathChanged = m_aPath != aNewPath;
353 if (!(bFull || bPathChanged))
354 return;
355
356 m_aPath = aNewPath;
357
358 m_PathArr.clear();
359
360 std::vector<OUString> aDirArr;
361 std::vector<OUString> aInvalidPaths;
362 if (!m_aPath.isEmpty())
363 {
364 sal_Int32 nIndex = 0;
365 do
366 {
367 const OUString sPth = URIHelper::SmartRel2Abs(
371 if (!aDirArr.empty() &&
372 std::find(aDirArr.begin(), aDirArr.end(), sPth) != aDirArr.end())
373 {
374 continue;
375 }
376 aDirArr.push_back(sPth);
377 if( !FStatHelper::IsFolder( sPth ) )
378 aInvalidPaths.push_back(sPth);
379 else
380 m_PathArr.push_back(sPth);
381 }
382 while (nIndex>=0);
383 }
384
385 if (m_aPath.isEmpty() || !aInvalidPaths.empty())
386 {
387 std::sort(aInvalidPaths.begin(), aInvalidPaths.end());
388 aInvalidPaths.erase(std::unique(aInvalidPaths.begin(), aInvalidPaths.end()), aInvalidPaths.end());
389 if (bPathChanged || (m_aInvalidPaths != aInvalidPaths))
390 {
391 m_aInvalidPaths = aInvalidPaths;
392 // wrong path, that means AutoText directory doesn't exist
393
396 DialogMask::ButtonsOk | DialogMask::MessageError ) );
397 m_bError = true;
398 }
399 else
400 m_bError = false;
401 }
402 else
403 m_bError = false;
404
405 if (!m_GlosArr.empty())
406 {
407 m_GlosArr.clear();
408 GetNameList();
409 }
410}
411
413{
415 lcl_makePath(m_aInvalidPaths), DialogMask::ButtonsOk );
416 ErrorHandler::HandleError( nPathError );
417}
418
420{
421 return ".bau";
422}
423
424void SwGlossaries::RemoveFileFromList( const OUString& rGroup )
425{
426 if (m_GlosArr.empty())
427 return;
428
429 auto it = std::find(m_GlosArr.begin(), m_GlosArr.end(), rGroup);
430 if (it == m_GlosArr.end())
431 return;
432
433 {
434 // tell the UNO AutoTextGroup object that it's not valid anymore
435 for ( UnoAutoTextGroups::iterator aLoop = m_aGlossaryGroups.begin();
436 aLoop != m_aGlossaryGroups.end();
437 )
438 {
439 rtl::Reference< SwXAutoTextGroup > xNamed( aLoop->get() );
440 if ( !xNamed.is() )
441 {
442 aLoop = m_aGlossaryGroups.erase(aLoop);
443 }
444 else if ( xNamed->getName() == rGroup )
445 {
446 xNamed->Invalidate();
447 // note that this static_cast works because we know that the array only
448 // contains SwXAutoTextGroup implementation
449 m_aGlossaryGroups.erase( aLoop );
450 break;
451 } else
452 ++aLoop;
453 }
454 }
455
456 {
457 // tell all our UNO AutoTextEntry objects that they're not valid anymore
458 for ( UnoAutoTextEntries::iterator aLoop = m_aGlossaryEntries.begin();
459 aLoop != m_aGlossaryEntries.end();
460 )
461 {
462 rtl::Reference<SwXAutoTextEntry> pEntry = aLoop->get();
463 if ( pEntry && ( pEntry->GetGroupName() == rGroup ) )
464 {
465 pEntry->Invalidate();
466 aLoop = m_aGlossaryEntries.erase( aLoop );
467 }
468 else
469 ++aLoop;
470 }
471 }
472
473 m_GlosArr.erase(it);
474}
475
476OUString SwGlossaries::GetCompleteGroupName( std::u16string_view rGroupName )
477{
478 const size_t nCount = GetGroupCnt();
479 // when the group name was created internally the path is here as well
480 sal_Int32 nIndex = 0;
481 const std::u16string_view sGroupName(o3tl::getToken(rGroupName, 0, GLOS_DELIM, nIndex));
482 const bool bPathLen = !o3tl::getToken(rGroupName, 0, GLOS_DELIM, nIndex).empty();
483 for ( size_t i = 0; i < nCount; i++ )
484 {
485 const OUString sGrpName = GetGroupName(i);
486 if (bPathLen)
487 {
488 if (rGroupName == sGrpName)
489 return sGrpName;
490 }
491 else
492 {
493 if (sGroupName == o3tl::getToken(sGrpName, 0, GLOS_DELIM))
494 return sGrpName;
495 }
496 }
497 return OUString();
498}
499
501{
502 // invalidate all the AutoTextGroup-objects
503 for (const auto& rGroup : m_aGlossaryGroups)
504 {
505 rtl::Reference< SwXAutoTextGroup > xGroup( rGroup.get() );
506 if ( xGroup.is() )
507 xGroup->Invalidate();
508 }
510
511 // invalidate all the AutoTextEntry-objects
512 for (const auto& rEntry : m_aGlossaryEntries)
513 {
514 rtl::Reference<SwXAutoTextEntry> pEntry = rEntry.get();
515 if ( pEntry )
516 pEntry->Invalidate();
517 }
519}
520
521Reference< text::XAutoTextGroup > SwGlossaries::GetAutoTextGroup( std::u16string_view _rGroupName )
522{
523 bool _bCreate = true;
524 // first, find the name with path-extension
525 const OUString sCompleteGroupName = GetCompleteGroupName( _rGroupName );
526
528
529 // look up the group in the cache
530 UnoAutoTextGroups::iterator aSearch = m_aGlossaryGroups.begin();
531 for ( ; aSearch != m_aGlossaryGroups.end(); )
532 {
533 rtl::Reference<SwXAutoTextGroup> pSwGroup = aSearch->get();
534 if ( !pSwGroup )
535 {
536 // the object is dead in the meantime -> remove from cache
537 aSearch = m_aGlossaryGroups.erase( aSearch );
538 continue;
539 }
540
541 if ( _rGroupName == pSwGroup->getName() )
542 { // the group is already cached
543 if ( !sCompleteGroupName.isEmpty() )
544 { // the group still exists -> return it
545 xGroup = pSwGroup;
546 break;
547 }
548 else
549 {
550 // this group does not exist (anymore) -> release the cached UNO object for it
551 aSearch = m_aGlossaryGroups.erase( aSearch );
552 // so it won't be created below
553 _bCreate = false;
554 break;
555 }
556 }
557
558 ++aSearch;
559 }
560
561 if ( !xGroup.is() && _bCreate )
562 {
563 xGroup = new SwXAutoTextGroup( sCompleteGroupName, this );
564 // cache it
565 m_aGlossaryGroups.emplace_back( xGroup );
566 }
567
568 return xGroup;
569}
570
571Reference< text::XAutoTextEntry > SwGlossaries::GetAutoTextEntry(
572 const OUString& rCompleteGroupName,
573 const OUString& rGroupName,
574 const OUString& rEntryName )
575{
576 //standard must be created
577 bool bCreate = ( rCompleteGroupName == GetDefName() );
578 std::unique_ptr< SwTextBlocks > pGlosGroup( GetGroupDoc( rCompleteGroupName, bCreate ) );
579
580 if (!pGlosGroup || pGlosGroup->GetError())
581 throw lang::WrappedTargetException();
582
583 sal_uInt16 nIdx = pGlosGroup->GetIndex( rEntryName );
584 if ( USHRT_MAX == nIdx )
585 throw container::NoSuchElementException();
586
588
589 UnoAutoTextEntries::iterator aSearch( m_aGlossaryEntries.begin() );
590 for ( ; aSearch != m_aGlossaryEntries.end(); )
591 {
592 rtl::Reference< SwXAutoTextEntry > pEntry( aSearch->get() );
593
594 if ( !pEntry )
595 {
596 // the object is dead in the meantime -> remove from cache
597 aSearch = m_aGlossaryEntries.erase( aSearch );
598 continue;
599 }
600
601 if ( pEntry
602 && pEntry->GetGroupName() == rGroupName
603 && pEntry->GetEntryName() == rEntryName
604 )
605 {
606 xReturn = pEntry;
607 break;
608 }
609
610 ++aSearch;
611 }
612
613 if ( !xReturn.is() )
614 {
615 xReturn = new SwXAutoTextEntry( this, rGroupName, rEntryName );
616 // cache it
617 m_aGlossaryEntries.emplace_back( xReturn );
618 }
619
620 return xReturn;
621}
622
623/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static DialogMask HandleError(ErrCode nId, weld::Window *pParent=nullptr, DialogMask nMask=DialogMask::MAX)
OUString GetFull() const
const OUString & GetAutoTextPath() const
bool NewGroupDoc(OUString &rGroupName, const OUString &rTitle)
Definition: glosdoc.cxx:175
static OUString GetDefName()
Definition: glosdoc.cxx:91
OUString m_aPath
Definition: glosdoc.hxx:52
OUString GetCompleteGroupName(std::u16string_view GroupName)
Definition: glosdoc.cxx:476
size_t GetGroupCnt()
Definition: glosdoc.cxx:98
SAL_DLLPRIVATE std::unique_ptr< SwTextBlocks > GetGlosDoc(const OUString &rName, bool bCreate=true) const
Definition: glosdoc.cxx:270
std::unique_ptr< SwTextBlocks > GetGroupDoc(const OUString &rName, bool bCreate=false)
Definition: glosdoc.cxx:158
OUString GetGroupTitle(const OUString &rGroupName)
Definition: glosdoc.cxx:143
css::uno::Reference< css::text::XAutoTextEntry > GetAutoTextEntry(const OUString &_rCompleteGroupName, const OUString &_rGroupName, const OUString &_rEntryName)
returns the cached AutoTextEntry (if any) for the given group/with the given name The entry is create...
Definition: glosdoc.cxx:571
bool m_bError
Definition: glosdoc.hxx:56
std::vector< OUString > m_PathArr
Definition: glosdoc.hxx:54
std::vector< OUString > m_aInvalidPaths
Definition: glosdoc.hxx:53
UnoAutoTextGroups m_aGlossaryGroups
Definition: glosdoc.hxx:49
SAL_DLLPRIVATE void RemoveFileFromList(const OUString &rGroup)
Definition: glosdoc.cxx:424
SAL_DLLPRIVATE std::vector< OUString > & GetNameList()
Definition: glosdoc.cxx:302
UnoAutoTextEntries m_aGlossaryEntries
Definition: glosdoc.hxx:50
OUString const & GetGroupName(size_t)
Definition: glosdoc.cxx:136
static OUString GetExtension()
Definition: glosdoc.cxx:419
std::vector< OUString > m_GlosArr
Definition: glosdoc.hxx:55
void ShowError()
Definition: glosdoc.cxx:412
css::uno::Reference< css::text::XAutoTextGroup > GetAutoTextGroup(std::u16string_view _rGroupName)
returns the cached AutoTextGroup (if any) for the given group name The group is created if it does no...
Definition: glosdoc.cxx:521
SAL_DLLPRIVATE void InvalidateUNOOjects()
Definition: glosdoc.cxx:500
void UpdateGlosPath(bool bFull)
Definition: glosdoc.cxx:348
bool DelGroupDoc(std::u16string_view)
Definition: glosdoc.cxx:247
bool FindGroupName(OUString &rGroup)
Definition: glosdoc.cxx:104
bool RenameGroupDoc(const OUString &sOldGroup, OUString &sNewGroup, const OUString &rNewTitle)
Definition: glosdoc.cxx:195
void SetName(const OUString &)
Definition: swblocks.cxx:250
int nCount
static OUString lcl_makePath(const std::vector< OUString > &rPaths)
Definition: glosdoc.cxx:334
std::vector< unotools::WeakReference< SwXAutoTextEntry > > UnoAutoTextEntries
Definition: glosdoc.hxx:43
#define GLOS_DELIM
Definition: glosdoc.hxx:45
std::vector< unotools::WeakReference< SwXAutoTextGroup > > UnoAutoTextGroups
Definition: glosdoc.hxx:40
const ::utl::TransliterationWrapper & GetAppCmpStrIgnore()
Definition: init.cxx:787
sal_Int32 nIndex
OUString aName
aBuf
const char * sName
SVL_DLLPUBLIC bool IsFolder(const OUString &rURL)
SVL_DLLPUBLIC bool IsDocument(const OUString &rURL)
bool UCB_GetFileListOfFolder(const OUString &rURL, std::vector< OUString > &rList, const OUString *pExtension, std::vector< ::DateTime > *pDateTimeList)
bool UCB_DeleteFile(const OUString &rURL)
Definition: swunohelper.cxx:59
bool UCB_IsCaseSensitiveFileName(std::u16string_view rURL)
bool UCB_MoveFile(const OUString &rURL, std::u16string_view rNewURL)
Definition: swunohelper.cxx:78
SVL_DLLPUBLIC Link< OUString *, bool > const & GetMaybeFileHdl()
SVL_DLLPUBLIC OUString SmartRel2Abs(INetURLObject const &rTheBaseURIRef, OUString const &rTheRelURIRef, Link< OUString *, bool > const &rMaybeFileHdl=Link< OUString *, bool >(), bool bCheckFileExists=true, bool bIgnoreFragment=false, INetURLObject::EncodeMechanism eEncodeMechanism=INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism eDecodeMechanism=INetURLObject::DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
int i
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
sal_uInt32 toUInt32(std::u16string_view str, sal_Int16 radix=10)
#define SVT_SEARCHPATH_DELIMITER
#define ERR_AUTOPATH_ERROR
Definition: swerror.h:34
sal_uInt16 sal_Unicode