Line data Source code
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 <sfx2/docfilt.hxx>
23 : #include <sot/storage.hxx>
24 : #include <tools/urlobj.hxx>
25 : #include <svl/fstathelper.hxx>
26 : #include <svl/macitem.hxx>
27 : #include <unotools/charclass.hxx>
28 : #include <frmfmt.hxx>
29 : #include <doc.hxx>
30 : #include <docary.hxx>
31 : #include <pam.hxx>
32 : #include <shellio.hxx>
33 : #include <swblocks.hxx>
34 : #include <ndtxt.hxx>
35 : #include <mdiexp.hxx>
36 : #include <SwXMLTextBlocks.hxx>
37 : #include <docsh.hxx>
38 : #include <swunohelper.hxx>
39 :
40 : #include <statstr.hrc>
41 : #include <swerror.h>
42 :
43 : // Hash-Code errechnen (muss nicht eindeutig sein)
44 :
45 178 : sal_uInt16 SwImpBlocks::Hash( const OUString& r )
46 : {
47 178 : sal_uInt16 n = 0;
48 : // std::min requires an explicit cast to sal_Int32 on 32bit platforms
49 178 : const sal_Int32 nLen = std::min(r.getLength(), static_cast<sal_Int32>(8));
50 1602 : for (sal_Int32 i=0; i<nLen; ++i)
51 : {
52 1424 : n = ( n << 1 ) + r[i];
53 : }
54 178 : return n;
55 : }
56 :
57 0 : SwBlockName::SwBlockName( const OUString& rShort, const OUString& rLong )
58 : : aShort( rShort ), aLong( rLong ), aPackageName (rShort),
59 0 : bIsOnlyTxtFlagInit( sal_False ), bIsOnlyTxt( sal_False ), bInPutMuchBlocks(false)
60 : {
61 0 : nHashS = SwImpBlocks::Hash( rShort );
62 0 : nHashL = SwImpBlocks::Hash( rLong );
63 0 : }
64 :
65 41 : SwBlockName::SwBlockName( const OUString& rShort, const OUString& rLong, const OUString& rPackageName)
66 : : aShort( rShort ), aLong( rLong ), aPackageName (rPackageName),
67 41 : bIsOnlyTxtFlagInit( sal_False ), bIsOnlyTxt( sal_False ), bInPutMuchBlocks(false)
68 : {
69 41 : nHashS = SwImpBlocks::Hash( rShort );
70 41 : nHashL = SwImpBlocks::Hash( rLong );
71 41 : }
72 :
73 : // Ist die angegebene Datei ein Storage oder gibt es sie nicht?
74 :
75 59 : short SwImpBlocks::GetFileType( const OUString& rFile )
76 : {
77 59 : if( !FStatHelper::IsDocument( rFile ) )
78 2 : return SWBLK_NO_FILE;
79 57 : if( SwXMLTextBlocks::IsFileUCBStorage( rFile ) )
80 57 : return SWBLK_XML;
81 0 : if( SvStorage::IsStorageFile( rFile ) )
82 0 : return SWBLK_SW3;
83 : //otherwise return NONE
84 0 : return SWBLK_NONE;
85 : }
86 :
87 59 : SwImpBlocks::SwImpBlocks( const OUString& rFile, sal_Bool )
88 : : aFile( rFile ),
89 : aDateModified( Date::EMPTY ),
90 : aTimeModified( Time::EMPTY ),
91 : pDoc( 0 ), nCur( (sal_uInt16)-1 ),
92 : bReadOnly( sal_True ), bInPutMuchBlocks( sal_False ),
93 59 : bInfoChanged(false)
94 : {
95 : FStatHelper::GetModifiedDateTimeOfFile( rFile,
96 59 : &aDateModified, &aTimeModified );
97 59 : INetURLObject aObj(rFile);
98 59 : aObj.setExtension( OUString() );
99 59 : aName = aObj.GetBase();
100 59 : }
101 :
102 116 : SwImpBlocks::~SwImpBlocks()
103 : {
104 58 : aNames.DeleteAndDestroyAll();
105 58 : }
106 :
107 : // Loeschen des Inhaltes des Dokuments
108 0 : void SwImpBlocks::ClearDoc()
109 : {
110 0 : pDoc->ClearDoc();
111 0 : }
112 :
113 : // Erzeugen eines PaMs, der das ganze Dokument umfasst
114 1 : SwPaM* SwImpBlocks::MakePaM()
115 : {
116 1 : SwPaM* pPam = new SwPaM( pDoc->GetNodes().GetEndOfContent() );
117 1 : pPam->Move( fnMoveBackward, fnGoDoc );
118 1 : pPam->SetMark();
119 1 : pPam->Move( fnMoveForward, fnGoDoc );
120 1 : pPam->Exchange();
121 1 : return pPam;
122 : }
123 :
124 44 : sal_uInt16 SwImpBlocks::GetCount() const
125 : {
126 44 : return aNames.size();
127 : }
128 :
129 : // Case Insensitive
130 95 : sal_uInt16 SwImpBlocks::GetIndex( const OUString& rShort ) const
131 : {
132 95 : const OUString s( GetAppCharClass().uppercase( rShort ) );
133 95 : const sal_uInt16 nHash = Hash( s );
134 108 : for( sal_uInt16 i = 0; i < aNames.size(); i++ )
135 : {
136 42 : const SwBlockName* pName = aNames[ i ];
137 84 : if( pName->nHashS == nHash
138 42 : && pName->aShort == s )
139 29 : return i;
140 : }
141 66 : return (sal_uInt16) -1;
142 : }
143 :
144 1 : sal_uInt16 SwImpBlocks::GetLongIndex( const OUString& rLong ) const
145 : {
146 1 : sal_uInt16 nHash = Hash( rLong );
147 2 : for( sal_uInt16 i = 0; i < aNames.size(); i++ )
148 : {
149 1 : const SwBlockName* pName = aNames[ i ];
150 2 : if( pName->nHashL == nHash
151 1 : && pName->aLong == rLong )
152 0 : return i;
153 : }
154 1 : return (sal_uInt16) -1;
155 : }
156 :
157 19 : OUString SwImpBlocks::GetShortName( sal_uInt16 n ) const
158 : {
159 19 : if( n < aNames.size() )
160 19 : return aNames[n]->aShort;
161 0 : return OUString();
162 : }
163 :
164 15 : OUString SwImpBlocks::GetLongName( sal_uInt16 n ) const
165 : {
166 15 : if( n < aNames.size() )
167 15 : return aNames[n]->aLong;
168 0 : return OUString();
169 : }
170 :
171 14 : OUString SwImpBlocks::GetPackageName( sal_uInt16 n ) const
172 : {
173 14 : if( n < aNames.size() )
174 14 : return aNames[n]->aPackageName;
175 0 : return OUString();
176 : }
177 :
178 0 : void SwImpBlocks::AddName( const OUString& rShort, const OUString& rLong,
179 : sal_Bool bOnlyTxt )
180 : {
181 0 : sal_uInt16 nIdx = GetIndex( rShort );
182 0 : if( nIdx != (sal_uInt16) -1 )
183 : {
184 0 : delete aNames[nIdx];
185 0 : aNames.erase( aNames.begin() + nIdx );
186 : }
187 0 : SwBlockName* pNew = new SwBlockName( rShort, rLong );
188 0 : pNew->bIsOnlyTxtFlagInit = sal_True;
189 0 : pNew->bIsOnlyTxt = bOnlyTxt;
190 0 : aNames.insert( pNew );
191 0 : }
192 :
193 17 : sal_Bool SwImpBlocks::IsFileChanged() const
194 : {
195 17 : Date aTempDateModified( aDateModified );
196 17 : Time aTempTimeModified( aTimeModified );
197 : return FStatHelper::GetModifiedDateTimeOfFile( aFile,
198 34 : &aTempDateModified, &aTempTimeModified ) &&
199 34 : ( aDateModified != aTempDateModified ||
200 34 : aTimeModified != aTempTimeModified );
201 : }
202 :
203 15 : void SwImpBlocks::Touch()
204 : {
205 : FStatHelper::GetModifiedDateTimeOfFile( aFile,
206 15 : &aDateModified, &aTimeModified );
207 15 : }
208 :
209 0 : sal_Bool SwImpBlocks::IsOnlyTextBlock( const OUString& ) const
210 : {
211 0 : return sal_False;
212 : }
213 :
214 0 : sal_uLong SwImpBlocks::GetMacroTable( sal_uInt16, SvxMacroTableDtor&, sal_Bool )
215 : {
216 0 : return 0;
217 : }
218 :
219 0 : sal_uLong SwImpBlocks::SetMacroTable( sal_uInt16 ,
220 : const SvxMacroTableDtor& , sal_Bool )
221 : {
222 0 : return 0;
223 : }
224 :
225 0 : sal_Bool SwImpBlocks::PutMuchEntries( sal_Bool )
226 : {
227 0 : return sal_False;
228 : }
229 :
230 59 : SwTextBlocks::SwTextBlocks( const OUString& rFile )
231 59 : : pImp( 0 ), nErr( 0 )
232 : {
233 59 : INetURLObject aObj(rFile);
234 118 : const OUString sFileName = aObj.GetMainURL( INetURLObject::NO_DECODE );
235 59 : switch( SwImpBlocks::GetFileType( rFile ) )
236 : {
237 57 : case SWBLK_XML: pImp = new SwXMLTextBlocks( sFileName ); break;
238 2 : case SWBLK_NO_FILE: pImp = new SwXMLTextBlocks( sFileName ); break;
239 : }
240 59 : if( !pImp )
241 59 : nErr = ERR_SWG_FILE_FORMAT_ERROR;
242 59 : }
243 :
244 58 : SwTextBlocks::~SwTextBlocks()
245 : {
246 58 : delete pImp;
247 58 : }
248 :
249 59 : OUString SwTextBlocks::GetName()
250 : {
251 59 : return pImp ? pImp->aName : OUString();
252 : }
253 :
254 4 : void SwTextBlocks::SetName( const OUString& r )
255 : {
256 4 : if( pImp )
257 4 : pImp->SetName( r );
258 4 : }
259 :
260 0 : sal_Bool SwTextBlocks::IsOld() const
261 : {
262 0 : if (pImp)
263 : {
264 0 : short nType = pImp->GetFileType();
265 0 : if (SWBLK_SW3 == nType || SWBLK_SW2 == nType )
266 0 : return sal_True;
267 : }
268 0 : return sal_False;
269 : }
270 :
271 27 : sal_uInt16 SwTextBlocks::GetCount() const
272 : {
273 27 : return pImp ? pImp->GetCount() : 0;
274 : }
275 :
276 31 : sal_uInt16 SwTextBlocks::GetIndex( const OUString& r ) const
277 : {
278 31 : return pImp ? pImp->GetIndex( r ) : (sal_uInt16) -1;
279 : }
280 :
281 1 : sal_uInt16 SwTextBlocks::GetLongIndex( const OUString& r ) const
282 : {
283 1 : return pImp ? (sal_uInt16)(pImp->GetLongIndex( r )) : (sal_uInt16) -1;
284 : }
285 :
286 9 : OUString SwTextBlocks::GetShortName( sal_uInt16 n ) const
287 : {
288 9 : if( pImp )
289 9 : return pImp->GetShortName( n );
290 0 : return OUString();
291 : }
292 :
293 5 : OUString SwTextBlocks::GetLongName( sal_uInt16 n ) const
294 : {
295 5 : if( pImp )
296 5 : return pImp->GetLongName( n );
297 0 : return OUString();
298 : }
299 :
300 5 : sal_Bool SwTextBlocks::Delete( sal_uInt16 n )
301 : {
302 5 : if( pImp && !pImp->bInPutMuchBlocks )
303 : {
304 5 : if( pImp->IsFileChanged() )
305 0 : nErr = ERR_TXTBLOCK_NEWFILE_ERROR;
306 5 : else if( 0 == (nErr = pImp->OpenFile( sal_False ) ))
307 : {
308 5 : nErr = pImp->Delete( n );
309 5 : if( !nErr )
310 : {
311 5 : delete pImp->aNames[n];
312 5 : pImp->aNames.erase( pImp->aNames.begin() + n );
313 : }
314 5 : if( n == pImp->nCur )
315 0 : pImp->nCur = (sal_uInt16) -1;
316 5 : if( !nErr )
317 5 : nErr = pImp->MakeBlockList();
318 : }
319 5 : pImp->CloseFile();
320 5 : pImp->Touch();
321 :
322 5 : return sal_Bool( nErr == 0 );
323 : }
324 0 : return sal_False;
325 : }
326 :
327 1 : sal_uInt16 SwTextBlocks::Rename( sal_uInt16 n, const OUString* s, const OUString* l )
328 : {
329 1 : sal_uInt16 nIdx = (sal_uInt16)-1;
330 1 : if( pImp && !pImp->bInPutMuchBlocks )
331 : {
332 1 : pImp->nCur = nIdx;
333 1 : OUString aNew;
334 2 : OUString aLong;
335 1 : if( s )
336 1 : aNew = aLong = *s;
337 1 : if( l )
338 1 : aLong = *l;
339 1 : if( aNew.isEmpty() )
340 : {
341 : OSL_ENSURE( !this, "Kein Kurzname in Rename angegeben" );
342 0 : nErr = ERR_SWG_INTERNAL_ERROR; return (sal_uInt16) -1;
343 : }
344 :
345 1 : if( pImp->IsFileChanged() )
346 0 : nErr = ERR_TXTBLOCK_NEWFILE_ERROR;
347 1 : else if( 0 == ( nErr = pImp->OpenFile( sal_False )))
348 : {
349 : // Vorher den neuen Eintrag in die Liste setzen!
350 1 : aNew = GetAppCharClass().uppercase( aNew );
351 1 : nErr = pImp->Rename( n, aNew, aLong );
352 1 : if( !nErr )
353 : {
354 1 : sal_Bool bOnlyTxt = pImp->aNames[ n ]->bIsOnlyTxt;
355 1 : delete pImp->aNames[n];
356 1 : pImp->aNames.erase( pImp->aNames.begin() + n );
357 1 : pImp->AddName( aNew, aLong, bOnlyTxt );
358 1 : nErr = pImp->MakeBlockList();
359 : }
360 : }
361 1 : pImp->CloseFile();
362 1 : pImp->Touch();
363 1 : if( !nErr )
364 2 : nIdx = pImp->GetIndex( aNew );
365 : }
366 1 : return nIdx;
367 : }
368 :
369 0 : sal_uLong SwTextBlocks::CopyBlock( SwTextBlocks& rSource, OUString& rSrcShort,
370 : const OUString& rLong )
371 : {
372 0 : bool bIsOld = false;
373 0 : if (rSource.pImp)
374 : {
375 0 : short nType = rSource.pImp->GetFileType();
376 0 : if (SWBLK_SW2 == nType || SWBLK_SW3 == nType )
377 0 : bIsOld = true;
378 : }
379 0 : if( bIsOld ) //rSource.IsOld() )
380 0 : nErr = ERR_SWG_OLD_GLOSSARY;
381 0 : else if( pImp->bInPutMuchBlocks )
382 0 : nErr = ERR_SWG_INTERNAL_ERROR;
383 : else
384 0 : nErr = pImp->CopyBlock(*rSource.pImp, rSrcShort, rLong);
385 0 : return nErr;
386 : }
387 :
388 4 : sal_Bool SwTextBlocks::BeginGetDoc( sal_uInt16 n )
389 : {
390 4 : if( pImp && !pImp->bInPutMuchBlocks )
391 : {
392 : // diese Optimierierung darf es nicht mehr geben. OLE-Objecte muessen auf
393 : // ihre SubStorages zugreifem koennen!
394 : // if( n == pImp->nCur )
395 : // return sal_True;
396 :
397 4 : if( pImp->IsFileChanged() )
398 0 : nErr = ERR_TXTBLOCK_NEWFILE_ERROR;
399 4 : else if( 0 == ( nErr = pImp->OpenFile( sal_True )))
400 : {
401 4 : pImp->ClearDoc();
402 4 : nErr = pImp->GetDoc( n );
403 4 : if( nErr )
404 0 : pImp->nCur = (sal_uInt16)-1;
405 : else
406 4 : pImp->nCur = n;
407 : }
408 4 : return sal_Bool( nErr == 0 );
409 : }
410 0 : return sal_False;
411 : }
412 :
413 4 : void SwTextBlocks::EndGetDoc()
414 : {
415 4 : if( pImp && !pImp->bInPutMuchBlocks )
416 4 : pImp->CloseFile();
417 4 : }
418 :
419 1 : sal_Bool SwTextBlocks::BeginPutDoc( const OUString& s, const OUString& l )
420 : {
421 1 : if( pImp )
422 : {
423 1 : sal_Bool bOk = pImp->bInPutMuchBlocks;
424 1 : if( !bOk )
425 : {
426 1 : if( pImp->IsFileChanged() )
427 0 : nErr = ERR_TXTBLOCK_NEWFILE_ERROR;
428 : else
429 1 : nErr = pImp->OpenFile( sal_False );
430 1 : bOk = 0 == nErr;
431 : }
432 1 : if( bOk )
433 : {
434 1 : const OUString aNew = GetAppCharClass().uppercase(s);
435 1 : nErr = pImp->BeginPutDoc( aNew, l );
436 : }
437 1 : if( nErr )
438 0 : pImp->CloseFile();
439 : }
440 1 : return 0 == nErr;
441 : }
442 :
443 1 : sal_uInt16 SwTextBlocks::PutDoc()
444 : {
445 1 : sal_uInt16 nIdx = (sal_uInt16)-1;
446 1 : if( pImp )
447 : {
448 1 : nErr = pImp->PutDoc();
449 1 : if( !nErr )
450 : {
451 1 : pImp->nCur = GetIndex( pImp->aShort );
452 1 : if( pImp->nCur != (sal_uInt16) -1 )
453 0 : pImp->aNames[ pImp->nCur ]->aLong = pImp->aLong;
454 : else
455 : {
456 1 : pImp->AddName( pImp->aShort, pImp->aLong );
457 1 : pImp->nCur = pImp->GetIndex( pImp->aShort );
458 : }
459 1 : if( !pImp->bInPutMuchBlocks )
460 1 : nErr = pImp->MakeBlockList();
461 : }
462 1 : if( !pImp->bInPutMuchBlocks )
463 : {
464 1 : pImp->CloseFile();
465 1 : pImp->Touch();
466 : }
467 1 : nIdx = pImp->nCur;
468 : }
469 1 : return nIdx;
470 : }
471 :
472 6 : sal_uInt16 SwTextBlocks::PutText( const OUString& rShort, const OUString& rName,
473 : const OUString& rTxt )
474 : {
475 6 : sal_uInt16 nIdx = (sal_uInt16) -1;
476 6 : if( pImp )
477 : {
478 6 : sal_Bool bOk = pImp->bInPutMuchBlocks;
479 6 : if( !bOk )
480 : {
481 6 : if( pImp->IsFileChanged() )
482 0 : nErr = ERR_TXTBLOCK_NEWFILE_ERROR;
483 : else
484 6 : nErr = pImp->OpenFile( sal_False );
485 6 : bOk = 0 == nErr;
486 : }
487 6 : if( bOk )
488 : {
489 6 : OUString aNew = GetAppCharClass().uppercase( rShort );
490 6 : nErr = pImp->PutText( aNew, rName, rTxt );
491 6 : pImp->nCur = (sal_uInt16) -1;
492 6 : if( !nErr )
493 : {
494 6 : nIdx = GetIndex( pImp->aShort );
495 6 : if( nIdx != (sal_uInt16) -1 )
496 1 : pImp->aNames[ nIdx ]->aLong = rName;
497 : else
498 : {
499 5 : pImp->AddName( pImp->aShort, rName, sal_True );
500 5 : nIdx = pImp->GetIndex( pImp->aShort );
501 : }
502 6 : if( !pImp->bInPutMuchBlocks )
503 6 : nErr = pImp->MakeBlockList();
504 6 : }
505 : }
506 6 : if( !pImp->bInPutMuchBlocks )
507 : {
508 6 : pImp->CloseFile();
509 6 : pImp->Touch();
510 : }
511 : }
512 6 : return nIdx;
513 : }
514 :
515 11 : SwDoc* SwTextBlocks::GetDoc()
516 : {
517 11 : if( pImp )
518 11 : return pImp->pDoc;
519 0 : return 0;
520 : }
521 :
522 1 : void SwTextBlocks::ClearDoc()
523 : {
524 1 : if( pImp )
525 : {
526 1 : pImp->ClearDoc();
527 1 : pImp->nCur = (sal_uInt16) -1;
528 : }
529 1 : }
530 :
531 0 : OUString SwTextBlocks::GetFileName() const
532 : {
533 0 : return pImp->GetFileName();
534 : }
535 :
536 0 : sal_Bool SwTextBlocks::IsReadOnly() const
537 : {
538 0 : return pImp->bReadOnly;
539 : }
540 :
541 4 : sal_Bool SwTextBlocks::IsOnlyTextBlock( sal_uInt16 nIdx ) const
542 : {
543 4 : sal_Bool bRet = sal_False;
544 4 : if( pImp && !pImp->bInPutMuchBlocks )
545 : {
546 4 : SwBlockName* pBlkNm = const_cast<SwBlockName*>( pImp->aNames[ nIdx ] );
547 8 : if( !pBlkNm->bIsOnlyTxtFlagInit &&
548 4 : !pImp->IsFileChanged() && !pImp->OpenFile( sal_True ) )
549 : {
550 0 : pBlkNm->bIsOnlyTxt = pImp->IsOnlyTextBlock( pBlkNm->aShort );
551 0 : pBlkNm->bIsOnlyTxtFlagInit = sal_True;
552 0 : pImp->CloseFile();
553 : }
554 4 : bRet = pBlkNm->bIsOnlyTxt;
555 : }
556 4 : return bRet;
557 : }
558 :
559 2 : sal_Bool SwTextBlocks::IsOnlyTextBlock( const OUString& rShort ) const
560 : {
561 2 : sal_uInt16 nIdx = pImp->GetIndex( rShort );
562 2 : if( USHRT_MAX != nIdx )
563 : {
564 1 : if( pImp->aNames[ nIdx ]->bIsOnlyTxtFlagInit )
565 1 : return pImp->aNames[ nIdx ]->bIsOnlyTxt;
566 0 : return IsOnlyTextBlock( nIdx );
567 : }
568 :
569 : OSL_ENSURE( !this, "ungueltiger Name" );
570 1 : return sal_False;
571 : }
572 :
573 1 : sal_Bool SwTextBlocks::GetMacroTable( sal_uInt16 nIdx, SvxMacroTableDtor& rMacroTbl )
574 : {
575 1 : sal_Bool bRet = sal_True;
576 1 : if ( pImp && !pImp->bInPutMuchBlocks )
577 1 : bRet = ( 0 == pImp->GetMacroTable( nIdx, rMacroTbl ) );
578 1 : return bRet;
579 : }
580 :
581 0 : sal_Bool SwTextBlocks::SetMacroTable( sal_uInt16 nIdx,
582 : const SvxMacroTableDtor& rMacroTbl )
583 : {
584 0 : sal_Bool bRet = sal_True;
585 0 : if ( pImp && !pImp->bInPutMuchBlocks )
586 0 : bRet = ( 0 == pImp->SetMacroTable( nIdx, rMacroTbl ) );
587 0 : return bRet;
588 : }
589 :
590 0 : sal_Bool SwTextBlocks::StartPutMuchBlockEntries()
591 : {
592 0 : sal_Bool bRet = sal_False;
593 0 : if( !IsOld() && pImp )
594 0 : bRet = pImp->PutMuchEntries( sal_True );
595 0 : return bRet;
596 : }
597 :
598 0 : void SwTextBlocks::EndPutMuchBlockEntries()
599 : {
600 0 : if( pImp )
601 0 : pImp->PutMuchEntries( sal_False );
602 0 : }
603 :
604 0 : OUString SwTextBlocks::GetBaseURL() const
605 : {
606 0 : if(pImp)
607 0 : return pImp->GetBaseURL();
608 0 : return OUString();
609 : }
610 :
611 7 : void SwTextBlocks::SetBaseURL( const OUString& rURL )
612 : {
613 7 : if(pImp)
614 7 : pImp->SetBaseURL(rURL);
615 7 : }
616 :
617 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|