1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
21 // AccTextBase.cpp: implementation of the CAccTextBase class.
26 #include "AccTextBase.h"
28 #include <vcl/svapp.hxx>
30 #include <com/sun/star/accessibility/AccessibleTextType.hpp>
31 #include <com/sun/star/accessibility/XAccessible.hpp>
32 #include <com/sun/star/accessibility/XAccessibleContext.hpp>
33 #include <com/sun/star/accessibility/XAccessibleComponent.hpp>
34 #include <com/sun/star/accessibility/XAccessibleTextSelection.hpp>
35 #include "MAccessible.h"
37 using namespace com::sun::star::accessibility
;
38 using namespace com::sun::star::uno
;
41 // Construction/Destruction
44 static OUString
ReplaceFourChar(OUString oldOUString
);
46 CAccTextBase::CAccTextBase()
49 CAccTextBase::~CAccTextBase()
54 * Get special selection.
55 * @param startOffset Start selection offset.
56 * @param endOffset End selection offset.
57 * @param success Variant to accept the result of if the method call is successful.
60 STDMETHODIMP
CAccTextBase::get_addSelection(long startOffset
, long endOffset
)
67 if(pUNOInterface
== NULL
)
70 Reference
<XAccessibleContext
> pRContext
= pUNOInterface
->getAccessibleContext();
72 Reference
< XAccessibleTextSelection
> pRExtension(pRContext
,UNO_QUERY
);
74 if( pRExtension
.is() )
76 pRExtension
->addSelection(0, startOffset
, endOffset
);
81 GetXInterface()->setSelection(startOffset
, endOffset
);
89 * Get special attributes.
90 * @param offset Offset.
91 * @param startOffset Variant to accept start offset.
92 * @param endOffset Variant to accept end offset.
93 * @param textAttributes Variant to accept attributes.
96 STDMETHODIMP
CAccTextBase::get_attributes(long offset
, long * startOffset
, long * endOffset
, BSTR
* textAttributes
)
100 ENTER_PROTECTED_BLOCK
102 if (startOffset
== NULL
|| endOffset
== NULL
|| textAttributes
== NULL
)
104 // #CHECK XInterface#
110 if( offset
< 0 || offset
> GetXInterface()->getCharacterCount() )
113 std::wstring strAttrs
;
115 strAttrs
+= L
"Version:1;";
117 Sequence
< ::com::sun::star::beans::PropertyValue
> pValues
= GetXInterface()->getCharacterAttributes(offset
, Sequence
< rtl::OUString
>());
118 int nCount
= pValues
.getLength();
120 short numberingLevel
= 0;
121 OUString numberingPrefix
;
123 bool bHaveNumberingPrefixAttr
= false;
124 bool bHaveNumberingLevel
= false;
125 bool bHaveNumberingRules
= false;
126 for(int i
=0; i
<nCount
; i
++)
129 ::com::sun::star::beans::PropertyValue
&pValue
= pValues
[i
];
130 if(pValue
.Name
== "NumberingLevel")
132 if (pValue
.Value
!= Any())
133 pValue
.Value
>>= numberingLevel
;
136 bHaveNumberingLevel
= true;
139 if(pValue
.Name
== "NumberingPrefix")
141 pValue
.Value
>>=numberingPrefix
;
142 bHaveNumberingPrefixAttr
= true;
145 if(pValue
.Name
== "NumberingRules")
147 bHaveNumberingRules
= true;
148 anyNumRule
= pValue
.Value
;
151 if (bHaveNumberingLevel
&& bHaveNumberingRules
&& bHaveNumberingPrefixAttr
)
153 OLECHAR numProps
[512] = {0};
155 numberingPrefix
= ReplaceFourChar(numberingPrefix
);
156 CMAccessible::get_OLECHAR4Numbering(anyNumRule
,numberingLevel
,numberingPrefix
,numProps
);
157 strAttrs
+= numProps
;
158 bHaveNumberingLevel
= 0;
159 bHaveNumberingRules
= 0;
161 if( (bHaveNumberingPrefixAttr
&& i
> 1 ) ||
162 (!bHaveNumberingPrefixAttr
&& i
> 0 ) ) //element 0 is NumberingPrefix, not write alone
166 strAttrs
+= pValue
.Name
.getStr();
169 OLECHAR pTemp
[2048] = {0};
171 if (pValue
.Name
== "CharBackColor" ||
172 pValue
.Name
== "CharColor" ||
173 pValue
.Name
== "CharUnderlineColor" )
175 unsigned long nColor
;
176 pValue
.Value
>>= nColor
;
178 swprintf( pBuf
, L
"%08X", nColor
);
180 wcscat( pTemp
, pBuf
);
185 CMAccessible::get_OLECHARFromAny(pValue
.Value
,pTemp
);
193 SysFreeString(*textAttributes
);
194 *textAttributes
= SysAllocString(strAttrs
.c_str());
196 if( offset
< GetXInterface()->getCharacterCount() )
198 TextSegment textSeg
= GetXInterface()->getTextAtIndex(offset
, AccessibleTextType::ATTRIBUTE_RUN
);
199 *startOffset
= textSeg
.SegmentStart
;
200 *endOffset
= textSeg
.SegmentEnd
;
204 *startOffset
= offset
;
210 LEAVE_PROTECTED_BLOCK
214 * Get caret position.
215 * @param offset Variant to accept caret offset.
218 STDMETHODIMP
CAccTextBase::get_caretOffset(long * offset
)
222 ENTER_PROTECTED_BLOCK
226 // #CHECK XInterface#
233 *offset
= GetXInterface()->getCaretPosition();
236 LEAVE_PROTECTED_BLOCK
240 * Get character count.
241 * @param nCharacters Variant to accept character count.
244 STDMETHODIMP
CAccTextBase::get_characterCount(long * nCharacters
)
248 ENTER_PROTECTED_BLOCK
250 if (nCharacters
== NULL
)
252 // #CHECK XInterface#
259 *nCharacters
= GetXInterface()->getCharacterCount();
262 LEAVE_PROTECTED_BLOCK
266 * Get character extents.
267 * @param offset Offset.
268 * @param x Variant to accept x position.
269 * @param y Variant to accept y position.
270 * @param width Variant to accept width.
271 * @param Height Variant to accept height.
274 STDMETHODIMP
CAccTextBase::get_characterExtents(long offset
, IA2CoordinateType coordType
, long * x
, long * y
, long * width
, long * height
)
278 ENTER_PROTECTED_BLOCK
280 if (x
== NULL
|| height
== NULL
|| y
== NULL
|| width
== NULL
)
282 // #CHECK XInterface#
286 if(offset
< 0 || offset
> GetXInterface()->getCharacterCount() )
289 com::sun::star::awt::Rectangle rectangle
;
290 rectangle
= GetXInterface()->getCharacterBounds(offset
);
293 com::sun::star::awt::Point aPoint
;
295 Reference
<XAccessibleContext
> pRContext
= pUNOInterface
->getAccessibleContext();
296 if( !pRContext
.is() )
300 Reference
<XAccessibleComponent
> pRComp(pRContext
,UNO_QUERY
);
303 if(coordType
== IA2_COORDTYPE_SCREEN_RELATIVE
)
305 ::com::sun::star::awt::Point pt
= pRComp
->getLocationOnScreen();
309 else if(coordType
== IA2_COORDTYPE_PARENT_RELATIVE
)
311 ::com::sun::star::awt::Point pt
= pRComp
->getLocation();
316 rectangle
.X
= rectangle
.X
+ aPoint
.X
;
317 rectangle
.Y
= rectangle
.Y
+ aPoint
.Y
;
322 // GetXInterface()->getCharacterBounds() have different implement in different acc component
323 // But we need return the width/height == 1 for every component when offset == text length.
324 // So we ignore the return result of GetXInterface()->getCharacterBounds() when offset == text length.
325 if( offset
== GetXInterface()->getCharacterCount() )
332 *width
= rectangle
.Width
;
333 *height
= rectangle
.Height
;
338 LEAVE_PROTECTED_BLOCK
342 * Get selections count.
343 * @param nSelections Variant to accept selections count.
346 STDMETHODIMP
CAccTextBase::get_nSelections(long * nSelections
)
350 ENTER_PROTECTED_BLOCK
352 if (nSelections
== NULL
)
354 // #CHECK XInterface#
355 if(pUNOInterface
== NULL
)
361 Reference
<XAccessibleContext
> pRContext
= pUNOInterface
->getAccessibleContext();
363 Reference
< XAccessibleTextSelection
> pRExtension(pRContext
,UNO_QUERY
);
365 if( pRExtension
.is() )
367 *nSelections
= pRExtension
->getSelectedPortionCount();
371 long iLength
= GetXInterface()->getSelectedText().getLength();
381 LEAVE_PROTECTED_BLOCK
385 * Get offset of some special point.
386 * @param x X position of one point.
387 * @param x Y position of one point.
388 * @param coordType Type.
389 * @param offset Variant to accept offset.
392 STDMETHODIMP
CAccTextBase::get_offsetAtPoint(long x
, long y
, IA2CoordinateType
, long * offset
)
396 ENTER_PROTECTED_BLOCK
400 // #CHECK XInterface#
404 com::sun::star::awt::Point point
;
407 *offset
= GetXInterface()->getIndexAtPoint(point
);
410 LEAVE_PROTECTED_BLOCK
414 * Get selection range.
415 * @param selection selection count.
416 * @param startOffset Variant to accept the start offset of special selection.
417 * @param endOffset Variant to accept the end offset of special selection.
421 STDMETHODIMP
CAccTextBase::get_selection(long selectionIndex
, long * startOffset
, long * endOffset
)
425 ENTER_PROTECTED_BLOCK
427 if (startOffset
== NULL
|| endOffset
== NULL
)
429 // #CHECK XInterface#
430 if(pUNOInterface
== NULL
)
434 get_nSelections(&nSelection
);
436 if(selectionIndex
>= nSelection
|| selectionIndex
< 0 )
439 Reference
<XAccessibleContext
> pRContext
= pUNOInterface
->getAccessibleContext();
441 Reference
< XAccessibleTextSelection
> pRExtension(pRContext
,UNO_QUERY
);
443 if( pRExtension
.is() )
445 *startOffset
= pRExtension
->getSeletedPositionStart(selectionIndex
);
446 *endOffset
= pRExtension
->getSeletedPositionEnd(selectionIndex
);
449 else if(GetXInterface()->getSelectionEnd() > -1)
451 *startOffset
= GetXInterface()->getSelectionStart();
452 *endOffset
= GetXInterface()->getSelectionEnd();
460 LEAVE_PROTECTED_BLOCK
465 * @param startOffset Start position of special range.
466 * @param endOffset End position of special range.
467 * @param text Variant to accept the text of special range.
470 STDMETHODIMP
CAccTextBase::get_text(long startOffset
, long endOffset
, BSTR
* text
)
474 ENTER_PROTECTED_BLOCK
478 // #CHECK XInterface#
482 if (endOffset
< -1 || endOffset
< startOffset
)
487 ::rtl::OUString ouStr
;
488 if (endOffset
== -1 )
491 if(SUCCEEDED(get_characterCount(&nLen
)))
493 ouStr
= GetXInterface()->getTextRange( 0, nLen
);
498 ouStr
= GetXInterface()->getTextRange( startOffset
, endOffset
);
501 SysFreeString(*text
);
502 *text
= SysAllocString((OLECHAR
*)ouStr
.getStr());
505 LEAVE_PROTECTED_BLOCK
509 * Get special text before some position.
510 * @param offset Special position.
511 * @param boundaryType Boundary type.
512 * @param startOffset Variant to accept the start offset.
513 * @param endOffset Variant to accept the end offset.
514 * @param text Variant to accept the special text.
517 STDMETHODIMP
CAccTextBase::get_textBeforeOffset(long offset
, IA2TextBoundaryType boundaryType
, long * startOffset
, long * endOffset
, BSTR
* text
)
521 ENTER_PROTECTED_BLOCK
524 if (startOffset
== NULL
|| endOffset
== NULL
|| text
== NULL
)
526 // #CHECK XInterface#
530 // In New UNO IAccessibleText.idl these constant values are defined as follows:
532 // const long TEXT_BOUNDARY_CHAR = -1;
533 // const long TEXT_BOUNDARY_TO_CURSOR_POS = -2;
534 // const long TEXT_BOUNDARY_START_OF_WORD = -3;
535 // const long TEXT_BOUNDARY_END_OF_WORD = -4;
536 // const long TEXT_BOUNDARY_START_OF_SENTENCE = -5;
537 // const long TEXT_BOUNDARY_END_OF_SENTENCE = -6;
538 // const long TEXT_BOUNDARY_START_OF_LINE = -7;
539 // const long TEXT_BOUNDARY_END_OF_LINE = -8;
541 // In UNO, the corresponding values are as follows:
543 // const short CHARACTER = 1;
544 // const short WORD = 2;
545 // const short SENTENCE = 3;
546 // const short PARAGRAPH = 4;
547 // const short LINE = 5;
548 // const short GLYPH = 6;
549 // const short ATTRIBUTE_RUN = 7;
552 long lUnoBoundaryType
;
556 case IA2_TEXT_BOUNDARY_CHAR
:
557 lUnoBoundaryType
= 1; // CHARACTER;
559 case IA2_TEXT_BOUNDARY_WORD
:
560 lUnoBoundaryType
= 2; // WORD;
562 case IA2_TEXT_BOUNDARY_SENTENCE
:
563 lUnoBoundaryType
= 3; // SENTENCE;
565 case IA2_TEXT_BOUNDARY_LINE
:
566 lUnoBoundaryType
= 5; // LINE;
568 case IA2_TEXT_BOUNDARY_PARAGRAPH
:
569 lUnoBoundaryType
= 4;
571 case IA2_TEXT_BOUNDARY_ALL
:
574 get_nCharacters( &nChar
);
577 return get_text(0, nChar
, text
);
584 TextSegment segment
= GetXInterface()->getTextBeforeIndex( offset
, sal_Int16(lUnoBoundaryType
));
585 ::rtl::OUString ouStr
= segment
.SegmentText
;
586 SysFreeString(*text
);
587 *text
= SysAllocString((OLECHAR
*)ouStr
.getStr());
588 *startOffset
= segment
.SegmentStart
;
589 *endOffset
= segment
.SegmentEnd
;
593 LEAVE_PROTECTED_BLOCK
597 * Get special text after some position.
598 * @param offset Special position.
599 * @param boundaryType Boundary type.
600 * @param startOffset Variant to accept the start offset.
601 * @param endOffset Variant to accept the end offset.
602 * @param text Variant to accept the special text.
605 STDMETHODIMP
CAccTextBase::get_textAfterOffset(long offset
, IA2TextBoundaryType boundaryType
, long * startOffset
, long * endOffset
, BSTR
* text
)
609 ENTER_PROTECTED_BLOCK
611 if (startOffset
== NULL
|| endOffset
== NULL
|| text
== NULL
)
613 // #CHECK XInterface#
617 // In New UNO IAccessibleText.idl these constant values are defined as follows:
619 // const long TEXT_BOUNDARY_CHAR = -1;
620 // const long TEXT_BOUNDARY_TO_CURSOR_POS = -2;
621 // const long TEXT_BOUNDARY_START_OF_WORD = -3;
622 // const long TEXT_BOUNDARY_END_OF_WORD = -4;
623 // const long TEXT_BOUNDARY_START_OF_SENTENCE = -5;
624 // const long TEXT_BOUNDARY_END_OF_SENTENCE = -6;
625 // const long TEXT_BOUNDARY_START_OF_LINE = -7;
626 // const long TEXT_BOUNDARY_END_OF_LINE = -8;
628 // In UNO, the corresponding values are as follows:
630 // const short CHARACTER = 1;
631 // const short WORD = 2;
632 // const short SENTENCE = 3;
633 // const short PARAGRAPH = 4;
634 // const short LINE = 5;
635 // const short GLYPH = 6;
636 // const short ATTRIBUTE_RUN = 7;
639 long lUnoBoundaryType
;
642 case IA2_TEXT_BOUNDARY_CHAR
:
643 lUnoBoundaryType
= 1; // CHARACTER;
645 case IA2_TEXT_BOUNDARY_WORD
:
646 lUnoBoundaryType
= 2; // WORD;
648 case IA2_TEXT_BOUNDARY_SENTENCE
:
649 lUnoBoundaryType
= 3; // SENTENCE;
651 case IA2_TEXT_BOUNDARY_LINE
:
652 lUnoBoundaryType
= 5; // LINE;
654 case IA2_TEXT_BOUNDARY_PARAGRAPH
:
655 lUnoBoundaryType
= 4;
657 case IA2_TEXT_BOUNDARY_ALL
:
660 get_nCharacters( &nChar
);
663 return get_text(0, nChar
, text
);
670 TextSegment segment
= GetXInterface()->getTextBehindIndex( offset
, sal_Int16(lUnoBoundaryType
));
671 ::rtl::OUString ouStr
= segment
.SegmentText
;
672 SysFreeString(*text
);
673 *text
= SysAllocString((OLECHAR
*)ouStr
.getStr());
674 *startOffset
= segment
.SegmentStart
;
675 *endOffset
= segment
.SegmentEnd
;
679 LEAVE_PROTECTED_BLOCK
683 * Get special text at some position.
684 * @param offset Special position.
685 * @param boundaryType Boundary type.
686 * @param startOffset Variant to accept the start offset.
687 * @param endOffset Variant to accept the end offset.
688 * @param text Variant to accept the special text.
691 STDMETHODIMP
CAccTextBase::get_textAtOffset(long offset
, IA2TextBoundaryType boundaryType
, long * startOffset
, long * endOffset
, BSTR
* text
)
695 ENTER_PROTECTED_BLOCK
697 if (startOffset
== NULL
|| text
== NULL
||endOffset
== NULL
)
699 // #CHECK XInterface#
703 // In New UNO IAccessibleText.idl these constant values are defined as follows:
705 // const long TEXT_BOUNDARY_CHAR = -1;
706 // const long TEXT_BOUNDARY_TO_CURSOR_POS = -2;
707 // const long TEXT_BOUNDARY_START_OF_WORD = -3;
708 // const long TEXT_BOUNDARY_END_OF_WORD = -4;
709 // const long TEXT_BOUNDARY_START_OF_SENTENCE = -5;
710 // const long TEXT_BOUNDARY_END_OF_SENTENCE = -6;
711 // const long TEXT_BOUNDARY_START_OF_LINE = -7;
712 // const long TEXT_BOUNDARY_END_OF_LINE = -8;
714 // In UNO, the corresponding values are as follows:
716 // const short CHARACTER = 1;
717 // const short WORD = 2;
718 // const short SENTENCE = 3;
719 // const short PARAGRAPH = 4;
720 // const short LINE = 5;
721 // const short GLYPH = 6;
722 // const short ATTRIBUTE_RUN = 7;
725 long lUnoBoundaryType
;
729 case IA2_TEXT_BOUNDARY_CHAR
:
730 lUnoBoundaryType
= 1; // CHARACTER;
732 case IA2_TEXT_BOUNDARY_WORD
:
733 lUnoBoundaryType
= 2; // WORD;
735 case IA2_TEXT_BOUNDARY_SENTENCE
:
736 lUnoBoundaryType
= 3; // SENTENCE;
738 case IA2_TEXT_BOUNDARY_LINE
:
739 lUnoBoundaryType
= 5; // LINE;
741 case IA2_TEXT_BOUNDARY_PARAGRAPH
:
742 lUnoBoundaryType
= 4;
744 case IA2_TEXT_BOUNDARY_ALL
:
747 get_nCharacters( &nChar
);
750 return get_text(0, nChar
, text
);
757 TextSegment segment
= GetXInterface()->getTextAtIndex( offset
, sal_Int16(lUnoBoundaryType
));
758 ::rtl::OUString ouStr
= segment
.SegmentText
;
759 SysFreeString(*text
);
760 *text
= SysAllocString((OLECHAR
*)ouStr
.getStr());
761 *startOffset
= segment
.SegmentStart
;
762 *endOffset
= segment
.SegmentEnd
;
766 LEAVE_PROTECTED_BLOCK
771 * @param selectionIndex Special selection index
772 * @param success Variant to accept the memthod called result.
775 STDMETHODIMP
CAccTextBase::removeSelection(long selectionIndex
)
779 ENTER_PROTECTED_BLOCK
781 // #CHECK XInterface#
782 if(pUNOInterface
== NULL
)
787 Reference
<XAccessibleContext
> pRContext
= pUNOInterface
->getAccessibleContext();
789 Reference
< XAccessibleTextSelection
> pRExtension(pRContext
,UNO_QUERY
);
791 if( pRExtension
.is() )
793 pRExtension
->removeSelection(selectionIndex
);
798 GetXInterface()->setSelection(0, 0);
802 LEAVE_PROTECTED_BLOCK
806 * Set caret position.
807 * @param offset Special position.
808 * @param success Variant to accept the memthod called result.
811 STDMETHODIMP
CAccTextBase::setCaretOffset(long offset
)
815 ENTER_PROTECTED_BLOCK
817 // #CHECK XInterface#
821 GetXInterface()->setCaretPosition( offset
);
825 LEAVE_PROTECTED_BLOCK
829 * Set special selection.
830 * @param selectionIndex Special selection index.
831 * @param startOffset start position.
832 * @param endOffset end position.
833 * @param success Variant to accept the memthod called result.
836 STDMETHODIMP
CAccTextBase::setSelection(long, long startOffset
, long endOffset
)
840 ENTER_PROTECTED_BLOCK
842 // #CHECK XInterface#
848 GetXInterface()->setSelection( startOffset
, endOffset
);
852 LEAVE_PROTECTED_BLOCK
856 * Get characters count.
857 * @param nCharacters Variant to accept the characters count.
860 STDMETHODIMP
CAccTextBase::get_nCharacters(long * nCharacters
)
864 ENTER_PROTECTED_BLOCK
866 if (nCharacters
== NULL
)
868 // #CHECK XInterface#
875 *nCharacters
= GetXInterface()->getCharacterCount();
879 LEAVE_PROTECTED_BLOCK
882 // added by qiuhd, 2006/07/03, for direver 07/11
883 STDMETHODIMP
CAccTextBase::get_newText( IA2TextSegment
*)
888 STDMETHODIMP
CAccTextBase::get_oldText( IA2TextSegment
*)
894 * Scroll to special sub-string .
895 * @param startIndex Start index of sub string.
896 * @param endIndex End index of sub string.
899 STDMETHODIMP
CAccTextBase::scrollSubstringToPoint(long, long, IA2CoordinateType
, long, long )
904 STDMETHODIMP
CAccTextBase::scrollSubstringTo(long, long, IA2ScrollType
)
911 * @param pXInterface UNO interface.
914 STDMETHODIMP
CAccTextBase::put_XInterface(hyper pXInterface
)
916 // internal IUNOXWrapper - no mutex meeded
918 ENTER_PROTECTED_BLOCK
920 CUNOXWrapper::put_XInterface(pXInterface
);
922 if(pUNOInterface
== NULL
)
924 Reference
<XAccessibleContext
> pRContext
= pUNOInterface
->getAccessibleContext();
925 if( !pRContext
.is() )
929 Reference
<XAccessibleText
> pRXI(pRContext
,UNO_QUERY
);
936 LEAVE_PROTECTED_BLOCK
939 static OUString
ReplaceOneChar(OUString oldOUString
, OUString replacedChar
, OUString replaceStr
)
942 iReplace
= oldOUString
.lastIndexOf(replacedChar
);
947 oldOUString
= oldOUString
.replaceAt(iReplace
,1, replaceStr
);
948 iReplace
=oldOUString
.lastIndexOf(replacedChar
,iReplace
);
954 static OUString
ReplaceFourChar(OUString oldOUString
)
956 oldOUString
= ReplaceOneChar(oldOUString
, OUString("\\"), OUString("\\\\"));
957 oldOUString
= ReplaceOneChar(oldOUString
, OUString(";"), OUString("\\;"));
958 oldOUString
= ReplaceOneChar(oldOUString
, OUString("="), OUString("\\="));
959 oldOUString
= ReplaceOneChar(oldOUString
, OUString(","), OUString("\\,"));
960 oldOUString
= ReplaceOneChar(oldOUString
, OUString(":"), OUString("\\:"));
964 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */