LibreOffice Module sw (master) 1
unoatxt.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 <sal/config.h>
21
22#include <com/sun/star/io/IOException.hpp>
23#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
24#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
25#include <com/sun/star/container/ElementExistException.hpp>
26#include <o3tl/safeint.hxx>
27#include <osl/diagnose.h>
28#include <rtl/character.hxx>
29#include <utility>
30#include <vcl/svapp.hxx>
31#include <svtools/unoevent.hxx>
32#include <sfx2/event.hxx>
33#include <glosdoc.hxx>
34#include <shellio.hxx>
35#include <initui.hxx>
36#include <gloslst.hxx>
37#include <unoatxt.hxx>
38#include <unomap.hxx>
39#include <unotextbodyhf.hxx>
40#include <unotextrange.hxx>
41#include <TextCursorHelper.hxx>
42#include <doc.hxx>
46#include <IDocumentState.hxx>
47#include <docsh.hxx>
48#include <swdll.hxx>
49#include <svl/hint.hxx>
50#include <tools/urlobj.hxx>
51#include <svl/macitem.hxx>
52#include <editeng/acorrcfg.hxx>
56
57#include <memory>
58
59using namespace ::com::sun::star;
60
62{
64
65}
66
68{
69
70}
71
73{
75 "SwXAutoTextContainer::getCount: too many items");
76 return static_cast<sal_Int32>(m_pGlossaries->GetGroupCnt());
77}
78
80{
81 SolarMutexGuard aGuard;
82 const size_t nCount = m_pGlossaries->GetGroupCnt();
83 if ( nIndex < 0 || o3tl::make_unsigned(nIndex) >= nCount )
84 throw lang::IndexOutOfBoundsException();
85 return getByName(m_pGlossaries->GetGroupName( static_cast<size_t>(nIndex) ));
86}
87
89{
91
92}
93
95{
96 // At least standard should always exists!
97 return true;
98}
99
101{
102 SolarMutexGuard aGuard;
103
104 uno::Reference< text::XAutoTextGroup > xGroup;
105 if ( m_pGlossaries && hasByName( GroupName ) ) // group name already known?
106 // true = create group if not already available
108
109 if ( !xGroup.is() )
110 throw container::NoSuchElementException();
111
112 return css::uno::Any( xGroup );
113}
114
115uno::Sequence< OUString > SwXAutoTextContainer::getElementNames()
116{
117 SolarMutexGuard aGuard;
118 const size_t nCount = m_pGlossaries->GetGroupCnt();
120 "SwXAutoTextContainer::getElementNames: too many groups");
121
122 uno::Sequence< OUString > aGroupNames(static_cast<sal_Int32>(nCount));
123 OUString *pArr = aGroupNames.getArray();
124
125 for ( size_t i = 0; i < nCount; ++i )
126 {
127 // The names will be passed without a path extension.
128 pArr[i] = m_pGlossaries->GetGroupName(i).getToken(0, GLOS_DELIM);
129 }
130 return aGroupNames;
131}
132// Finds group names with or without path index.
134{
135 SolarMutexGuard aGuard;
136 OUString sGroupName( m_pGlossaries->GetCompleteGroupName( Name ) );
137 if(!sGroupName.isEmpty())
138 return true;
139 return false;
140}
141
142uno::Reference< text::XAutoTextGroup > SwXAutoTextContainer::insertNewByName(
143 const OUString& aGroupName)
144{
145 SolarMutexGuard aGuard;
146 if(hasByName(aGroupName))
147 throw container::ElementExistException();
148 //check for non-ASCII characters
149 if(aGroupName.isEmpty())
150 {
151 lang::IllegalArgumentException aIllegal;
152 aIllegal.Message = "group name must not be empty";
153 throw aIllegal;
154 }
155 for(sal_Int32 nPos = 0; nPos < aGroupName.getLength(); nPos++)
156 {
157 sal_Unicode cChar = aGroupName[nPos];
158 if (rtl::isAsciiAlphanumeric(cChar) ||
159 (cChar == '_') ||
160 (cChar == 0x20) ||
161 (cChar == GLOS_DELIM) )
162 {
163 continue;
164 }
165 lang::IllegalArgumentException aIllegal;
166 aIllegal.Message = "group name must contain a-z, A-z, '_', ' ' only";
167 throw aIllegal;
168 }
169 OUString sGroup(aGroupName);
170 if (sGroup.indexOf(GLOS_DELIM)<0)
171 {
172 sGroup += OUStringChar(GLOS_DELIM) + "0";
173 }
174 m_pGlossaries->NewGroupDoc(sGroup, sGroup.getToken(0, GLOS_DELIM));
175
176 uno::Reference< text::XAutoTextGroup > xGroup = m_pGlossaries->GetAutoTextGroup( sGroup );
177 OSL_ENSURE( xGroup.is(), "SwXAutoTextContainer::insertNewByName: no UNO object created? How this?" );
178 // We just inserted the group into the glossaries, so why doesn't it exist?
179
180 return xGroup;
181}
182
183void SwXAutoTextContainer::removeByName(const OUString& aGroupName)
184{
185 SolarMutexGuard aGuard;
186 // At first find the name with path extension
187 OUString sGroupName = m_pGlossaries->GetCompleteGroupName( aGroupName );
188 if(sGroupName.isEmpty())
189 throw container::NoSuchElementException();
190 m_pGlossaries->DelGroupDoc(sGroupName);
191}
192
194{
195 return "SwXAutoTextContainer";
196}
197
199{
200 return cppu::supportsService(this, rServiceName);
201}
202
204{
205 return { "com.sun.star.text.AutoTextContainer" };
206}
207
209 SwGlossaries* pGlos) :
210 m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_AUTO_TEXT_GROUP)),
211 m_pGlossaries(pGlos),
212 m_sName(rName),
213 m_sGroupName(rName)
214{
215 OSL_ENSURE( -1 != rName.indexOf( GLOS_DELIM ),
216 "SwXAutoTextGroup::SwXAutoTextGroup: to be constructed with a complete name only!" );
217}
218
220{
221}
222
223uno::Sequence< OUString > SwXAutoTextGroup::getTitles()
224{
225 SolarMutexGuard aGuard;
226 std::unique_ptr<SwTextBlocks> pGlosGroup(m_pGlossaries ? m_pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
227 if (!pGlosGroup || pGlosGroup->GetError())
228 throw uno::RuntimeException();
229 const sal_uInt16 nCount = pGlosGroup->GetCount();
230
231 uno::Sequence< OUString > aEntryTitles(nCount);
232 OUString *pArr = aEntryTitles.getArray();
233
234 for ( sal_uInt16 i = 0; i < nCount; i++ )
235 pArr[i] = pGlosGroup->GetLongName(i);
236 return aEntryTitles;
237}
238
239void SwXAutoTextGroup::renameByName(const OUString& aElementName,
240 const OUString& aNewElementName, const OUString& aNewElementTitle)
241{
242 SolarMutexGuard aGuard;
243 // throw exception only if the programmatic name is to be changed into an existing name
244 if(aNewElementName != aElementName && hasByName(aNewElementName))
245 throw container::ElementExistException();
246 std::unique_ptr<SwTextBlocks> pGlosGroup(m_pGlossaries ? m_pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
247 if(!pGlosGroup || pGlosGroup->GetError())
248 throw uno::RuntimeException();
249
250 const sal_uInt16 nIdx = pGlosGroup->GetIndex( aElementName);
251 if(USHRT_MAX == nIdx)
252 throw lang::IllegalArgumentException();
253 OUString aNewShort(aNewElementName);
254 OUString aNewName(aNewElementTitle);
255 sal_uInt16 nOldLongIdx = pGlosGroup->GetLongIndex( aNewShort );
256 sal_uInt16 nOldIdx = pGlosGroup->GetIndex( aNewName );
257
258 if ((nOldLongIdx == USHRT_MAX || nOldLongIdx == nIdx)
259 && (nOldIdx == USHRT_MAX || nOldIdx == nIdx))
260 {
261 pGlosGroup->Rename( nIdx, &aNewShort, &aNewName );
262 if(pGlosGroup->GetError() != ERRCODE_NONE)
263 throw io::IOException();
264 }
265
266}
267
268static bool lcl_CopySelToDoc(SwDoc& rInsDoc, OTextCursorHelper* pxCursor, SwXTextRange* pxRange)
269{
270 SwNodes& rNds = rInsDoc.GetNodes();
271
272 SwNodeIndex aIdx( rNds.GetEndOfContent(), -1 );
273 SwContentNode * pNd = aIdx.GetNode().GetContentNode();
274 SwPosition aPos(aIdx, pNd, pNd ? pNd->Len() : 0);
275
276 bool bRet = false;
278 {
279 SwDoc *const pDoc(pxCursor ? pxCursor->GetDoc() : &pxRange->GetDoc());
280 SwPaM aPam(pDoc->GetNodes());
281 SwPaM * pPam(nullptr);
282 if(pxCursor)
283 {
284 pPam = pxCursor->GetPaM();
285 }
286 else
287 {
288 if (pxRange->GetPositions(aPam))
289 {
290 pPam = & aPam;
291 }
292 }
293 if (!pPam) { return false; }
295 || bRet;
296 }
297
300 rInsDoc.getIDocumentFieldsAccess().UpdateExpFields(nullptr, true);
301
302 return bRet;
303}
304
305uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const OUString& aName,
306 const OUString& aTitle, const uno::Reference< text::XTextRange > & xTextRange)
307{
308 SolarMutexGuard aGuard;
309 if(hasByName(aName))
310 throw container::ElementExistException();
311 if(!xTextRange.is())
312 throw uno::RuntimeException();
313
314 std::unique_ptr<SwTextBlocks> pGlosGroup;
315 if (m_pGlossaries)
317 const OUString& sShortName(aName);
318 const OUString& sLongName(aTitle);
319 if (pGlosGroup && !pGlosGroup->GetError())
320 {
321 SwXTextRange* pxRange = dynamic_cast<SwXTextRange*>(xTextRange.get());
322 OTextCursorHelper* pxCursor = dynamic_cast<OTextCursorHelper*>(xTextRange.get());
323
324 OUString sOnlyText;
325 OUString* pOnlyText = nullptr;
326 bool bNoAttr = !pxCursor && !pxRange;
327 if(bNoAttr)
328 {
329 sOnlyText = xTextRange->getString();
330 pOnlyText = &sOnlyText;
331 }
332
333 const SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get();
334
335 SwDoc* pGDoc = pGlosGroup->GetDoc();
336
337 // Until there is an option for that, delete base util::URL
338 if(rCfg.IsSaveRelFile())
339 {
340 INetURLObject aTemp(pGlosGroup->GetFileName());
341 pGlosGroup->SetBaseURL( aTemp.GetMainURL(INetURLObject::DecodeMechanism::NONE));
342 }
343 else
344 pGlosGroup->SetBaseURL( OUString() );
345
346 sal_uInt16 nRet = USHRT_MAX;
347 if( pOnlyText )
348 nRet = pGlosGroup->PutText( sShortName, sLongName, *pOnlyText );
349 else
350 {
351 pGlosGroup->ClearDoc();
352 if( pGlosGroup->BeginPutDoc( sShortName, sLongName ) )
353 {
355 lcl_CopySelToDoc(*pGDoc, pxCursor, pxRange);
357 nRet = pGlosGroup->PutDoc();
358 }
359 }
360
361 if (nRet == USHRT_MAX)
362 {
363 throw uno::RuntimeException();
364 }
365 }
366 pGlosGroup.reset();
367
368 uno::Reference< text::XAutoTextEntry > xEntry;
369
370 try
371 {
372 xEntry = m_pGlossaries ?
374 uno::Reference< text::XAutoTextEntry >();
375 OSL_ENSURE( xEntry.is(), "SwXAutoTextGroup::insertNewByName: no UNO object created? How this?" );
376 // we just inserted the entry into the group, so why doesn't it exist?
377 }
378 catch (const container::ElementExistException&)
379 {
380 throw;
381 }
382 catch (const uno::RuntimeException&)
383 {
384 throw;
385 }
386 catch (const uno::Exception&)
387 {
388 css::uno::Any anyEx = cppu::getCaughtException();
389 throw css::lang::WrappedTargetRuntimeException(
390 "Error Getting AutoText!",
391 static_cast < OWeakObject * > ( this ),
392 anyEx );
393 }
394
395 return xEntry;
396}
397
398void SwXAutoTextGroup::removeByName(const OUString& aEntryName)
399{
400 SolarMutexGuard aGuard;
401 std::unique_ptr<SwTextBlocks> pGlosGroup(m_pGlossaries ? m_pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
402 if(!pGlosGroup || pGlosGroup->GetError())
403 throw container::NoSuchElementException();
404
405 sal_uInt16 nIdx = pGlosGroup->GetIndex(aEntryName);
406 if ( nIdx == USHRT_MAX )
407 throw container::NoSuchElementException();
408
409 pGlosGroup->Delete(nIdx);
410}
411
413{
414 SolarMutexGuard aGuard;
415 return m_sName;
416}
417
418void SwXAutoTextGroup::setName(const OUString& rName)
419{
420 SolarMutexGuard aGuard;
421 if( !m_pGlossaries )
422 throw uno::RuntimeException();
423
424 sal_Int32 nNewDelimPos = rName.lastIndexOf( GLOS_DELIM );
425 sal_Int32 nOldDelimPos = m_sName.lastIndexOf( GLOS_DELIM );
426
427 OUString aNewSuffix;
428 if (nNewDelimPos > -1)
429 aNewSuffix = rName.copy( nNewDelimPos + 1 );
430 OUString aOldSuffix;
431 if (nOldDelimPos > -1)
432 aOldSuffix = m_sName.copy( nOldDelimPos + 1 );
433
434 sal_Int32 nNewNumeric = aNewSuffix.toInt32();
435 sal_Int32 nOldNumeric = aOldSuffix.toInt32();
436
437 OUString aNewPrefix( (nNewDelimPos > 1) ? rName.copy( 0, nNewDelimPos ) : rName );
438 OUString aOldPrefix( (nOldDelimPos > 1) ? m_sName.copy( 0, nOldDelimPos ) : m_sName );
439
440 if ( m_sName == rName ||
441 ( nNewNumeric == nOldNumeric && aNewPrefix == aOldPrefix ) )
442 return;
443 OUString sNewGroup(rName);
444 if (sNewGroup.indexOf(GLOS_DELIM)<0)
445 {
446 sNewGroup += OUStringChar(GLOS_DELIM) + "0";
447 }
448
449 //the name must be saved, the group may be invalidated while in RenameGroupDoc()
450 SwGlossaries* pTempGlossaries = m_pGlossaries;
451
452 OUString sPreserveTitle( m_pGlossaries->GetGroupTitle( m_sName ) );
453 if ( !m_pGlossaries->RenameGroupDoc( m_sName, sNewGroup, sPreserveTitle ) )
454 throw uno::RuntimeException();
455 m_sName = rName;
456 m_sGroupName = sNewGroup;
457 m_pGlossaries = pTempGlossaries;
458}
459
461{
462 SolarMutexGuard aGuard;
463 std::unique_ptr<SwTextBlocks> pGlosGroup(m_pGlossaries ? m_pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
464 if (!pGlosGroup || pGlosGroup->GetError())
465 throw uno::RuntimeException();
466 return static_cast<sal_Int32>(pGlosGroup->GetCount());
467}
468
470{
471 SolarMutexGuard aGuard;
472 if (!m_pGlossaries)
473 throw uno::RuntimeException();
474 std::unique_ptr<SwTextBlocks> pGlosGroup(m_pGlossaries->GetGroupDoc(m_sGroupName));
475 if (!pGlosGroup || pGlosGroup->GetError())
476 throw uno::RuntimeException();
477 const sal_uInt16 nCount = pGlosGroup->GetCount();
479 throw lang::IndexOutOfBoundsException();
480 return getByName(pGlosGroup->GetShortName(o3tl::narrowing<sal_uInt16>(nIndex)));
481}
482
484{
486
487}
488
490{
491 SolarMutexGuard aGuard;
492 std::unique_ptr<SwTextBlocks> pGlosGroup(m_pGlossaries ? m_pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
493 if (!pGlosGroup || pGlosGroup->GetError())
494 throw uno::RuntimeException();
495 return pGlosGroup->GetCount() > 0;
496
497}
498
500{
501 SolarMutexGuard aGuard;
502 uno::Reference< text::XAutoTextEntry > xEntry = m_pGlossaries->GetAutoTextEntry( m_sGroupName, m_sName, _rName );
503 OSL_ENSURE( xEntry.is(), "SwXAutoTextGroup::getByName: GetAutoTextEntry is fractious!" );
504 // we told it to create the object, so why didn't it?
505 return css::uno::Any( xEntry );
506}
507
508uno::Sequence< OUString > SwXAutoTextGroup::getElementNames()
509{
510 SolarMutexGuard aGuard;
511 std::unique_ptr<SwTextBlocks> pGlosGroup(m_pGlossaries ? m_pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
512 if (!pGlosGroup || pGlosGroup->GetError())
513 throw uno::RuntimeException();
514
515 const sal_uInt16 nCount = pGlosGroup->GetCount();
516 uno::Sequence< OUString > aEntryNames(nCount);
517 OUString *pArr = aEntryNames.getArray();
518
519 for ( sal_uInt16 i = 0; i < nCount; i++ )
520 pArr[i] = pGlosGroup->GetShortName(i);
521 return aEntryNames;
522}
523
525{
526 SolarMutexGuard aGuard;
527 bool bRet = false;
528 std::unique_ptr<SwTextBlocks> pGlosGroup(m_pGlossaries ? m_pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
529 if (!pGlosGroup || pGlosGroup->GetError())
530 throw uno::RuntimeException();
531
532 const sal_uInt16 nCount = pGlosGroup->GetCount();
533 for( sal_uInt16 i = 0; i < nCount; ++i )
534 {
535 OUString sCompare(pGlosGroup->GetShortName(i));
536 if(sCompare.equalsIgnoreAsciiCase(rName))
537 {
538 bRet = true;
539 break;
540 }
541 }
542 return bRet;
543}
544
545uno::Reference< beans::XPropertySetInfo > SwXAutoTextGroup::getPropertySetInfo()
546{
547 static uno::Reference< beans::XPropertySetInfo > xRet = m_pPropSet->getPropertySetInfo();
548 return xRet;
549}
550
552 const OUString& rPropertyName, const uno::Any& aValue)
553{
554 SolarMutexGuard aGuard;
555 const SfxItemPropertyMapEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName );
556
557 if(!pEntry)
558 throw beans::UnknownPropertyException(rPropertyName);
559
560 std::unique_ptr<SwTextBlocks> pGlosGroup(m_pGlossaries ? m_pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
561 if(!pGlosGroup || pGlosGroup->GetError())
562 throw uno::RuntimeException();
563 switch(pEntry->nWID)
564 {
565 case WID_GROUP_TITLE:
566 {
567 OUString sNewTitle;
568 aValue >>= sNewTitle;
569 if(sNewTitle.isEmpty())
570 throw lang::IllegalArgumentException();
571 bool bChanged = sNewTitle != pGlosGroup->GetName();
572 pGlosGroup->SetName(sNewTitle);
573 if(bChanged && HasGlossaryList())
575 }
576 break;
577 }
578}
579
580uno::Any SwXAutoTextGroup::getPropertyValue(const OUString& rPropertyName)
581{
582 SolarMutexGuard aGuard;
583 const SfxItemPropertyMapEntry* pEntry = m_pPropSet->getPropertyMap().getByName( rPropertyName);
584
585 if(!pEntry)
586 throw beans::UnknownPropertyException(rPropertyName);
587 std::unique_ptr<SwTextBlocks> pGlosGroup(m_pGlossaries ? m_pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
588 if(!pGlosGroup || pGlosGroup->GetError())
589 throw uno::RuntimeException();
590
591 uno::Any aAny;
592 switch(pEntry->nWID)
593 {
594 case WID_GROUP_PATH:
595 aAny <<= pGlosGroup->GetFileName();
596 break;
597 case WID_GROUP_TITLE:
598 aAny <<= pGlosGroup->GetName();
599 break;
600 }
601 return aAny;
602}
603
605 const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/)
606{
607}
608
610 const OUString& /*PropertyName*/, const uno::Reference< beans::XPropertyChangeListener > & /*aListener*/)
611{
612}
613
615 const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/)
616{
617}
618
620 const OUString& /*PropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/)
621{
622}
623
625{
626 m_pGlossaries = nullptr;
627 m_sName.clear();
628 m_sGroupName.clear();
629}
630
632{
633 return "SwXAutoTextGroup";
634}
635
636sal_Bool SwXAutoTextGroup::supportsService(const OUString& rServiceName)
637{
638 return cppu::supportsService(this, rServiceName);
639}
640
642{
643 uno::Sequence<OUString> aRet { "com.sun.star.text.AutoTextGroup" };
644 return aRet;
645}
646
648 OUString aEntryName) :
649 m_pGlossaries(pGlss),
650 m_sGroupName(std::move(aGroupName)),
651 m_sEntryName(std::move(aEntryName))
652{
653}
654
656{
657 SolarMutexGuard aGuard;
658
659 // ensure that any pending modifications are written
660 implFlushDocument( true );
661}
662
664{
665 if ( !m_xDocSh.is() )
666 return;
667
668 if ( m_xDocSh->GetDoc()->getIDocumentState().IsModified () )
669 m_xDocSh->Save();
670
671 if ( _bCloseDoc )
672 {
673 // stop listening at the document
675
676 m_xDocSh->DoClose();
677 m_xDocSh.clear();
678 }
679}
680
682{
683 if ( &_rBC != m_xDocSh.get() )
684 return;
685
686// it's our document
687 if (const SfxEventHint* pEventHint = dynamic_cast<const SfxEventHint*>(&_rHint))
688 {
689 if (SfxEventHintId::PrepareCloseDoc == pEventHint->GetEventId())
690 {
692 mxBodyText.clear();
694 m_xDocSh.clear();
695 }
696 }
697 else
698 {
699 if ( SfxHintId::Deinitializing == _rHint.GetId() )
700 {
701 // our document is dying (possibly because we're shutting down, and the document was notified
702 // earlier than we are?)
703 // stop listening at the docu
705 // and release our reference
706 m_xDocSh.clear();
707 }
708 }
709}
710
712{
713 SolarMutexGuard aGuard;
714
716 OSL_ENSURE( m_xDocSh.is(), "SwXAutoTextEntry::GetBodyText: unexpected: no doc returned by EditGroupDoc!" );
717
718 // start listening at the document
720
721 mxBodyText = new SwXBodyText ( m_xDocSh->GetDoc() );
722}
723
724void SwXAutoTextEntry::disposing(std::unique_lock<std::mutex>&)
725{
727 implFlushDocument(true);
728}
729
730uno::Reference< text::XTextCursor > SwXAutoTextEntry::createTextCursor()
731{
732 SolarMutexGuard aGuard;
734 return mxBodyText->createTextCursor();
735}
736
737uno::Reference< text::XTextCursor > SwXAutoTextEntry::createTextCursorByRange(
738 const uno::Reference< text::XTextRange > & aTextPosition)
739{
740 SolarMutexGuard aGuard;
742 return mxBodyText->createTextCursorByRange ( aTextPosition );
743}
744
745void SwXAutoTextEntry::insertString(const uno::Reference< text::XTextRange > & xRange, const OUString& aString, sal_Bool bAbsorb)
746{
747 SolarMutexGuard aGuard;
749 mxBodyText->insertString ( xRange, aString, bAbsorb );
750}
751
752void SwXAutoTextEntry::insertControlCharacter(const uno::Reference< text::XTextRange > & xRange,
753 sal_Int16 nControlCharacter, sal_Bool bAbsorb)
754{
755 SolarMutexGuard aGuard;
757 mxBodyText->insertControlCharacter ( xRange, nControlCharacter, bAbsorb );
758}
759
761 const uno::Reference< text::XTextRange > & xRange,
762 const uno::Reference< text::XTextContent > & xContent, sal_Bool bAbsorb)
763{
764 SolarMutexGuard aGuard;
766 mxBodyText->insertTextContent ( xRange, xContent, bAbsorb );
767}
768
770 const uno::Reference< text::XTextContent > & xContent)
771{
772 SolarMutexGuard aGuard;
774 mxBodyText->removeTextContent ( xContent );
775}
776
777uno::Reference< text::XText > SwXAutoTextEntry::getText()
778{
779 SolarMutexGuard aGuard;
780 uno::Reference< text::XText > xRet = static_cast<text::XText*>(this);
781 return xRet;
782}
783
784uno::Reference< text::XTextRange > SwXAutoTextEntry::getStart()
785{
786 SolarMutexGuard aGuard;
788 return mxBodyText->getStart();
789}
790
791uno::Reference< text::XTextRange > SwXAutoTextEntry::getEnd()
792{
793 SolarMutexGuard aGuard;
795 return mxBodyText->getEnd();
796}
797
799{
800 SolarMutexGuard aGuard;
802 return mxBodyText->getString();
803}
804
805void SwXAutoTextEntry::setString(const OUString& aString)
806{
807 SolarMutexGuard aGuard;
809 mxBodyText->setString( aString );
810}
811
812void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextRange)
813{
814 SolarMutexGuard aGuard;
815
816 // ensure that any pending modifications are written
817 // reason is that we're holding the _copy_ of the auto text, while the real auto text
818 // is stored somewhere. And below, we're not working with our copy, but only tell the target
819 // TextRange to work with the stored version.
820 // #96380# - 2003-03-03 - fs@openoffice.org
822 // TODO: think about if we should pass "true" here
823 // The difference would be that when the next modification is made to this instance here, then
824 // we would be forced to open the document again, instead of working on our current copy.
825 // This means that we would reflect any changes which were done to the AutoText by foreign instances
826 // in the meantime
827
828 // The reference to xKeepAlive is needed during the whole call, likely because it could be a
829 // different object, not xTextRange itself, and the reference guards it from preliminary death
830 auto xKeepAlive( xTextRange );
831 SwXTextRange* pRange = dynamic_cast<SwXTextRange*>(xTextRange.get());
832 OTextCursorHelper* pCursor = dynamic_cast<OTextCursorHelper*>(xTextRange.get());
833 SwXText *pText = dynamic_cast<SwXText*>(xTextRange.get());
834
835 SwDoc* pDoc = nullptr;
836 if (pRange)
837 pDoc = &pRange->GetDoc();
838 else if ( pCursor )
839 pDoc = pCursor->GetDoc();
840 else if ( pText && pText->GetDoc() )
841 {
842 xKeepAlive = pText->getStart();
843 pCursor = dynamic_cast<OTextCursorHelper*>(xKeepAlive.get());
844 if (pCursor)
845 pDoc = pText->GetDoc();
846 }
847
848 if(!pDoc)
849 throw uno::RuntimeException();
850
851 SwPaM InsertPaM(pDoc->GetNodes());
852 if (pRange)
853 {
854 if (!pRange->GetPositions(InsertPaM))
855 {
856 throw uno::RuntimeException();
857 }
858 }
859 else
860 {
861 InsertPaM = *pCursor->GetPaM();
862 }
863
864 std::unique_ptr<SwTextBlocks> pBlock(m_pGlossaries->GetGroupDoc(m_sGroupName));
865 const bool bResult = pBlock && !pBlock->GetError()
866 && pDoc->InsertGlossary( *pBlock, m_sEntryName, InsertPaM);
867
868 if(!bResult)
869 throw uno::RuntimeException();
870}
871
873{
874 return "SwXAutoTextEntry";
875}
876
877sal_Bool SwXAutoTextEntry::supportsService(const OUString& rServiceName)
878{
879 return cppu::supportsService(this, rServiceName);
880}
881
883{
884 uno::Sequence<OUString> aRet { "com.sun.star.text.AutoTextEntry" };
885 return aRet;
886}
887
888uno::Reference< container::XNameReplace > SwXAutoTextEntry::getEvents()
889{
890 return new SwAutoTextEventDescriptor( *this );
891}
892
894{
895 { SvMacroItemId::SwStartInsGlossary, "OnInsertStart" },
896 { SvMacroItemId::SwEndInsGlossary, "OnInsertDone" },
897 { SvMacroItemId::NONE, nullptr }
898};
899
901 SwXAutoTextEntry& rAutoText ) :
903 m_rAutoTextEntry(rAutoText)
904{
905}
906
908{
909}
910
912{
913 return "SwAutoTextEventDescriptor";
914}
915
917 const SvMacroItemId nEvent,
918 const SvxMacro& rMacro)
919{
920 OSL_ENSURE( nullptr != m_rAutoTextEntry.GetGlossaries(),
921 "Strangely enough, the AutoText vanished!" );
922 OSL_ENSURE( (nEvent == SvMacroItemId::SwEndInsGlossary) ||
923 (nEvent == SvMacroItemId::SwStartInsGlossary) ,
924 "Unknown event ID" );
925
928 std::unique_ptr<SwTextBlocks> pBlocks(
929 pGlossaries->GetGroupDoc( m_rAutoTextEntry.GetGroupName() ));
930 OSL_ENSURE( pBlocks,
931 "can't get autotext group; SwAutoTextEntry has illegal name?");
932
933 if( !pBlocks || pBlocks->GetError())
934 return;
935
936 sal_uInt16 nIndex = pBlocks->GetIndex( m_rAutoTextEntry.GetEntryName() );
937 if( nIndex != USHRT_MAX )
938 {
939 SvxMacroTableDtor aMacroTable;
940 if( pBlocks->GetMacroTable( nIndex, aMacroTable ) )
941 {
942 aMacroTable.Insert( nEvent, rMacro );
943 pBlocks->SetMacroTable( nIndex, aMacroTable );
944 }
945 }
946 // else: ignore
947}
948
950 SvxMacro& rMacro,
951 const SvMacroItemId nEvent )
952{
953 OSL_ENSURE( nullptr != m_rAutoTextEntry.GetGlossaries(), "no AutoText" );
954 OSL_ENSURE( (nEvent == SvMacroItemId::SwEndInsGlossary) ||
955 (nEvent == SvMacroItemId::SwStartInsGlossary) ,
956 "Unknown event ID" );
957
960 std::unique_ptr<SwTextBlocks> pBlocks(
961 pGlossaries->GetGroupDoc( m_rAutoTextEntry.GetGroupName() ));
962 OSL_ENSURE( pBlocks,
963 "can't get autotext group; SwAutoTextEntry has illegal name?");
964
965 // return empty macro, unless macro is found
966 OUString sEmptyStr;
967 SvxMacro aEmptyMacro(sEmptyStr, sEmptyStr);
968 rMacro = aEmptyMacro;
969
970 if ( !pBlocks || pBlocks->GetError())
971 return;
972
973 sal_uInt16 nIndex = pBlocks->GetIndex( m_rAutoTextEntry.GetEntryName() );
974 if( nIndex != USHRT_MAX )
975 {
976 SvxMacroTableDtor aMacroTable;
977 if( pBlocks->GetMacroTable( nIndex, aMacroTable ) )
978 {
979 SvxMacro *pMacro = aMacroTable.Get( nEvent );
980 if( pMacro )
981 rMacro = *pMacro;
982 }
983 }
984}
985
986extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
987SwXAutoTextContainer_get_implementation(css::uno::XComponentContext*,
988 css::uno::Sequence<css::uno::Any> const &)
989{
990 //the module may not be loaded
991 SolarMutexGuard aGuard;
993 return cppu::acquire(new SwXAutoTextContainer());
994}
995
996/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@ CheckPosInFly
check if target position is in fly anchored at source range
@ NONE
no RedlineFlags
virtual bool CopyRange(SwPaM &rPam, SwPosition &rPos, SwCopyFlags flags) const =0
Copy a selected content range to a position.
virtual void LockExpFields()=0
virtual bool IsExpFieldsLocked() const =0
virtual void UpdateExpFields(SwTextField *pField, bool bUpdateRefFields)=0
virtual void UnlockExpFields()=0
virtual void SetRedlineFlags_intern(RedlineFlags eMode)=0
Set a new redline mode.
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
SfxHintId GetId() const
const SfxItemPropertyMapEntry * getByName(std::u16string_view rName) const
const SfxItemPropertyMap & getPropertyMap() const
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
static SvxAutoCorrCfg & Get()
bool IsSaveRelFile() const
SvxMacro & Insert(SvMacroItemId nEvent, const SvxMacro &rMacro)
const SvxMacro * Get(SvMacroItemId nEvent) const
Implement the XNameAccess for the AutoText events.
Definition: unoatxt.hxx:226
SwXAutoTextEntry & m_rAutoTextEntry
Definition: unoatxt.hxx:227
virtual void getByName(SvxMacro &rMacro, const SvMacroItemId nEvent) override
item ID of event
Definition: unoatxt.cxx:949
SwAutoTextEventDescriptor(SwXAutoTextEntry &rAutoText)
Definition: unoatxt.cxx:900
virtual void replaceByName(const SvMacroItemId nEvent, const SvxMacro &rMacro) override
event (will be copied)
Definition: unoatxt.cxx:916
virtual ~SwAutoTextEventDescriptor() override
Definition: unoatxt.cxx:907
virtual OUString SAL_CALL getImplementationName() override
Definition: unoatxt.cxx:911
virtual sal_Int32 Len() const
Definition: node.cxx:1256
Definition: doc.hxx:197
bool InsertGlossary(SwTextBlocks &rBlock, const OUString &rEntry, SwPaM &rPaM, SwCursorShell *pShell=nullptr)
inserts an AutoText block
Definition: docglos.cxx:131
IDocumentContentOperations const & getIDocumentContentOperations() const
Definition: doc.cxx:329
SwNodes & GetNodes()
Definition: doc.hxx:422
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
Definition: doc.cxx:371
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
Definition: doc.cxx:349
bool NewGroupDoc(OUString &rGroupName, const OUString &rTitle)
Definition: glosdoc.cxx:175
OUString GetCompleteGroupName(std::u16string_view GroupName)
Definition: glosdoc.cxx:476
size_t GetGroupCnt()
Definition: glosdoc.cxx:98
std::unique_ptr< SwTextBlocks > GetGroupDoc(const OUString &rName, bool bCreate=false)
Definition: glosdoc.cxx:158
SwDocShellRef EditGroupDoc(const OUString &rGrpName, const OUString &rShortName, bool bShow=true)
Definition: glshell.cxx:196
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
OUString const & GetGroupName(size_t)
Definition: glosdoc.cxx:136
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
bool DelGroupDoc(std::u16string_view)
Definition: glosdoc.cxx:247
bool RenameGroupDoc(const OUString &sOldGroup, OUString &sNewGroup, const OUString &rNewTitle)
Definition: glosdoc.cxx:195
void ClearGroups()
Definition: gloslst.cxx:439
Marks a node in the document model.
Definition: ndindex.hxx:31
SwNode & GetNode() const
Definition: ndindex.hxx:123
SwContentNode * GetContentNode()
Definition: node.hxx:666
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
Definition: ndarr.hxx:165
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:188
virtual css::uno::Reference< css::text::XAutoTextGroup > SAL_CALL insertNewByName(const OUString &aGroupName) override
Definition: unoatxt.cxx:142
virtual sal_Bool SAL_CALL hasElements() override
Definition: unoatxt.cxx:94
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
Definition: unoatxt.cxx:115
virtual OUString SAL_CALL getImplementationName() override
Definition: unoatxt.cxx:193
virtual css::uno::Any SAL_CALL getByName(const OUString &Name) override
Definition: unoatxt.cxx:100
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unoatxt.cxx:88
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override
Definition: unoatxt.cxx:79
SwGlossaries * m_pGlossaries
Definition: unoatxt.hxx:55
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unoatxt.cxx:198
virtual void SAL_CALL removeByName(const OUString &aGroupName) override
Definition: unoatxt.cxx:183
virtual sal_Bool SAL_CALL hasByName(const OUString &Name) override
Definition: unoatxt.cxx:133
virtual sal_Int32 SAL_CALL getCount() override
Definition: unoatxt.cxx:72
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unoatxt.cxx:203
virtual ~SwXAutoTextContainer() override
Definition: unoatxt.cxx:67
virtual OUString SAL_CALL getImplementationName() override
Definition: unoatxt.cxx:872
void implFlushDocument(bool _bCloseDoc=false)
ensure that the current content (which may only be in-memory so far) is flushed to the auto text grou...
Definition: unoatxt.cxx:663
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getStart() override
Definition: unoatxt.cxx:784
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: unoatxt.cxx:681
virtual css::uno::Reference< css::text::XText > SAL_CALL getText() override
Definition: unoatxt.cxx:777
virtual OUString SAL_CALL getString() override
Definition: unoatxt.cxx:798
void EnsureBodyText()
Definition: unoatxt.hxx:162
rtl::Reference< SwXBodyText > mxBodyText
Definition: unoatxt.hxx:160
const OUString & GetGroupName() const
Definition: unoatxt.hxx:220
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getEnd() override
Definition: unoatxt.cxx:791
virtual void SAL_CALL insertControlCharacter(const css::uno::Reference< css::text::XTextRange > &xRange, sal_Int16 nControlCharacter, sal_Bool bAbsorb) override
Definition: unoatxt.cxx:752
virtual void SAL_CALL applyTo(const css::uno::Reference< css::text::XTextRange > &xRange) override
Definition: unoatxt.cxx:812
virtual css::uno::Reference< css::container::XNameReplace > SAL_CALL getEvents() override
Definition: unoatxt.cxx:888
SwDocShellRef m_xDocSh
Definition: unoatxt.hxx:158
OUString m_sGroupName
Definition: unoatxt.hxx:156
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unoatxt.cxx:877
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor() override
Definition: unoatxt.cxx:730
void disposing(std::unique_lock< std::mutex > &) override
Definition: unoatxt.cxx:724
void GetBodyText()
Definition: unoatxt.cxx:711
const OUString & GetEntryName() const
Definition: unoatxt.hxx:221
SwXAutoTextEntry(SwGlossaries *, OUString aGroupName, OUString aEntryName)
Definition: unoatxt.cxx:647
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unoatxt.cxx:882
virtual void SAL_CALL insertTextContent(const css::uno::Reference< css::text::XTextRange > &xRange, const css::uno::Reference< css::text::XTextContent > &xContent, sal_Bool bAbsorb) override
Definition: unoatxt.cxx:760
const SwGlossaries * GetGlossaries() const
Definition: unoatxt.hxx:219
SwGlossaries * m_pGlossaries
Definition: unoatxt.hxx:155
virtual void SAL_CALL setString(const OUString &aString) override
Definition: unoatxt.cxx:805
OUString m_sEntryName
Definition: unoatxt.hxx:157
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursorByRange(const css::uno::Reference< css::text::XTextRange > &aTextPosition) override
Definition: unoatxt.cxx:737
virtual void SAL_CALL removeTextContent(const css::uno::Reference< css::text::XTextContent > &xContent) override
Definition: unoatxt.cxx:769
virtual void SAL_CALL insertString(const css::uno::Reference< css::text::XTextRange > &xRange, const OUString &aString, sal_Bool bAbsorb) override
Definition: unoatxt.cxx:745
virtual ~SwXAutoTextEntry() override
Definition: unoatxt.cxx:655
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: unoatxt.cxx:609
SwXAutoTextGroup(const OUString &rName, SwGlossaries *pGloss)
Definition: unoatxt.cxx:208
virtual void SAL_CALL setName(const OUString &Name_) override
Definition: unoatxt.cxx:418
const SfxItemPropertySet * m_pPropSet
Definition: unoatxt.hxx:95
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unoatxt.cxx:614
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unoatxt.cxx:619
SwGlossaries * m_pGlossaries
Definition: unoatxt.hxx:96
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unoatxt.cxx:483
virtual OUString SAL_CALL getImplementationName() override
Definition: unoatxt.cxx:631
virtual css::uno::Sequence< OUString > SAL_CALL getTitles() override
Definition: unoatxt.cxx:223
OUString m_sName
Definition: unoatxt.hxx:97
virtual sal_Bool SAL_CALL hasByName(const OUString &Name) override
Definition: unoatxt.cxx:524
void Invalidate()
Definition: unoatxt.cxx:624
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unoatxt.cxx:545
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unoatxt.cxx:636
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override
Definition: unoatxt.cxx:469
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unoatxt.cxx:604
virtual sal_Int32 SAL_CALL getCount() override
Definition: unoatxt.cxx:460
OUString m_sGroupName
Definition: unoatxt.hxx:98
virtual sal_Bool SAL_CALL hasElements() override
Definition: unoatxt.cxx:489
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unoatxt.cxx:641
virtual void SAL_CALL removeByName(const OUString &aEntryName) override
Definition: unoatxt.cxx:398
virtual css::uno::Reference< css::text::XAutoTextEntry > SAL_CALL insertNewByName(const OUString &aName, const OUString &aTitle, const css::uno::Reference< css::text::XTextRange > &xTextRange) override
Definition: unoatxt.cxx:305
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unoatxt.cxx:580
virtual ~SwXAutoTextGroup() override
Definition: unoatxt.cxx:219
virtual css::uno::Any SAL_CALL getByName(const OUString &Name) override
Definition: unoatxt.cxx:499
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
Definition: unoatxt.cxx:508
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unoatxt.cxx:551
virtual OUString SAL_CALL getName() override
Definition: unoatxt.cxx:412
virtual void SAL_CALL renameByName(const OUString &aElementName, const OUString &aNewElementName, const OUString &aNewElementTitle) override
Definition: unoatxt.cxx:239
const SwDoc & GetDoc() const
Definition: unoobj2.cxx:762
virtual OUString SAL_CALL getString() override
Definition: unoobj2.cxx:1028
bool GetPositions(SwPaM &rToFill, ::sw::TextRangeMode eMode=::sw::TextRangeMode::RequireTextNode) const
Definition: unoobj2.cxx:1050
const SwDoc * GetDoc() const
Definition: unotext.cxx:134
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getStart() override
Definition: unotext.cxx:858
css::uno::Type const & get()
T * get() const
bool is() const
int nCount
OUString m_sName
#define ERRCODE_NONE
SvMacroItemId
#define GLOS_DELIM
Definition: glosdoc.hxx:45
static std::unique_ptr< SwGlossaries > pGlossaries
Definition: initui.cxx:38
SwGlossaryList * GetGlossaryList()
Definition: initui.cxx:174
bool HasGlossaryList()
Definition: initui.cxx:169
SW_DLLPUBLIC SwGlossaries * GetGlossaries()
Definition: initui.cxx:162
sal_Int32 nIndex
OUString aName
sal_uInt16 nPos
void ensure()
Definition: swdll.cxx:71
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
Any SAL_CALL getCaughtException()
int i
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
char aEntryName[20]
Marks a position in the document model.
Definition: pam.hxx:38
OUString Name
#define SAL_MAX_INT32
unsigned char sal_Bool
sal_uInt16 sal_Unicode
static bool lcl_CopySelToDoc(SwDoc &rInsDoc, OTextCursorHelper *pxCursor, SwXTextRange *pxRange)
Definition: unoatxt.cxx:268
const struct SvEventDescription aAutotextEvents[]
Definition: unoatxt.cxx:893
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SwXAutoTextContainer_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
Definition: unoatxt.cxx:987
SwUnoPropertyMapProvider aSwMapProvider
Definition: unomap1.cxx:88
#define PROPERTY_MAP_AUTO_TEXT_GROUP
Definition: unomap.hxx:59
#define WID_GROUP_TITLE
Definition: unomap.hxx:301
#define WID_GROUP_PATH
Definition: unomap.hxx:300