Use cppu::BaseMutex and remove need for Paragraph/ParagraphImpl split
Change-Id: I790e14feb50fefe3b2efa505118b332d065970fc
This commit is contained in:
parent
bff533248d
commit
c2fb42afb3
@ -43,6 +43,7 @@
|
|||||||
#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
|
#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
|
||||||
#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
|
#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
|
||||||
#include <toolkit/awt/vclxwindow.hxx>
|
#include <toolkit/awt/vclxwindow.hxx>
|
||||||
|
#include <cppuhelper/basemutex.hxx>
|
||||||
#include <cppuhelper/compbase7.hxx>
|
#include <cppuhelper/compbase7.hxx>
|
||||||
#include <comphelper/accessiblecontexthelper.hxx>
|
#include <comphelper/accessiblecontexthelper.hxx>
|
||||||
#include <comphelper/accessibletexthelper.hxx>
|
#include <comphelper/accessibletexthelper.hxx>
|
||||||
@ -61,7 +62,6 @@ class TextView;
|
|||||||
namespace accessibility
|
namespace accessibility
|
||||||
{
|
{
|
||||||
|
|
||||||
class Paragraph;
|
|
||||||
class Document;
|
class Document;
|
||||||
|
|
||||||
class SfxListenerGuard
|
class SfxListenerGuard
|
||||||
@ -140,12 +140,12 @@ typedef ::cppu::WeakAggComponentImplHelper7<
|
|||||||
// 0 to N - 1), whereas the Paragraph's index is the position within the text
|
// 0 to N - 1), whereas the Paragraph's index is the position within the text
|
||||||
// view/accessible parent (from 0 to M - 1). Paragraphs outside the currently
|
// view/accessible parent (from 0 to M - 1). Paragraphs outside the currently
|
||||||
// visible range have an index of -1.
|
// visible range have an index of -1.
|
||||||
class ParagraphImpl:
|
class Paragraph:
|
||||||
public ParagraphBase, private ::comphelper::OCommonAccessibleText
|
private cppu::BaseMutex, public ParagraphBase, private ::comphelper::OCommonAccessibleText
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ParagraphImpl(::rtl::Reference< Document > const & rDocument,
|
Paragraph(::rtl::Reference< Document > const & rDocument,
|
||||||
Paragraphs::size_type nNumber, ::osl::Mutex & rMutex);
|
Paragraphs::size_type nNumber);
|
||||||
|
|
||||||
// Not thread-safe.
|
// Not thread-safe.
|
||||||
inline Paragraphs::size_type getNumber() const { return m_nNumber; }
|
inline Paragraphs::size_type getNumber() const { return m_nNumber; }
|
||||||
@ -406,153 +406,153 @@ public:
|
|||||||
// Must be called only after init has been called.
|
// Must be called only after init has been called.
|
||||||
// To make it possible for this method to be (indirectly) called from
|
// To make it possible for this method to be (indirectly) called from
|
||||||
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
||||||
// still zero), pass a "ParagraphImpl const *" instead of a
|
// still zero), pass a "Paragraph const *" instead of a
|
||||||
// "::rtl::Reference< ParagraphImpl > const &".
|
// "::rtl::Reference< Paragraph > const &".
|
||||||
::sal_Int32 retrieveParagraphIndex(ParagraphImpl const * pParagraph);
|
::sal_Int32 retrieveParagraphIndex(Paragraph const * pParagraph);
|
||||||
|
|
||||||
// Must be called only after init has been called.
|
// Must be called only after init has been called.
|
||||||
// To make it possible for this method to be (indirectly) called from
|
// To make it possible for this method to be (indirectly) called from
|
||||||
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
||||||
// still zero), pass a "ParagraphImpl const *" instead of a
|
// still zero), pass a "Paragraph const *" instead of a
|
||||||
// "::rtl::Reference< ParagraphImpl > const &".
|
// "::rtl::Reference< Paragraph > const &".
|
||||||
::sal_Int64 retrieveParagraphState(ParagraphImpl const * pParagraph);
|
::sal_Int64 retrieveParagraphState(Paragraph const * pParagraph);
|
||||||
|
|
||||||
// Must be called only after init has been called.
|
// Must be called only after init has been called.
|
||||||
// To make it possible for this method to be (indirectly) called from
|
// To make it possible for this method to be (indirectly) called from
|
||||||
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
||||||
// still zero), pass a "ParagraphImpl const &" instead of a
|
// still zero), pass a "Paragraph const &" instead of a
|
||||||
// "::rtl::Reference< ParagraphImpl > const &".
|
// "::rtl::Reference< Paragraph > const &".
|
||||||
css::awt::Rectangle
|
css::awt::Rectangle
|
||||||
retrieveParagraphBounds(ParagraphImpl const * pParagraph, bool bAbsolute);
|
retrieveParagraphBounds(Paragraph const * pParagraph, bool bAbsolute);
|
||||||
|
|
||||||
// Must be called only after init has been called.
|
// Must be called only after init has been called.
|
||||||
// To make it possible for this method to be (indirectly) called from
|
// To make it possible for this method to be (indirectly) called from
|
||||||
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
||||||
// still zero), pass a "ParagraphImpl const &" instead of a
|
// still zero), pass a "Paragraph const &" instead of a
|
||||||
// "::rtl::Reference< ParagraphImpl > const &".
|
// "::rtl::Reference< Paragraph > const &".
|
||||||
OUString retrieveParagraphText(ParagraphImpl const * pParagraph);
|
OUString retrieveParagraphText(Paragraph const * pParagraph);
|
||||||
|
|
||||||
// Must be called only after init has been called.
|
// Must be called only after init has been called.
|
||||||
// To make it possible for this method to be (indirectly) called from
|
// To make it possible for this method to be (indirectly) called from
|
||||||
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
||||||
// still zero), pass a "ParagraphImpl const &" instead of a
|
// still zero), pass a "Paragraph const &" instead of a
|
||||||
// "::rtl::Reference< ParagraphImpl > const &".
|
// "::rtl::Reference< Paragraph > const &".
|
||||||
void retrieveParagraphSelection(ParagraphImpl const * pParagraph,
|
void retrieveParagraphSelection(Paragraph const * pParagraph,
|
||||||
::sal_Int32 * pBegin, ::sal_Int32 * pEnd);
|
::sal_Int32 * pBegin, ::sal_Int32 * pEnd);
|
||||||
|
|
||||||
// Must be called only after init has been called.
|
// Must be called only after init has been called.
|
||||||
// To make it possible for this method to be (indirectly) called from
|
// To make it possible for this method to be (indirectly) called from
|
||||||
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
||||||
// still zero), pass a "ParagraphImpl const *" instead of a
|
// still zero), pass a "Paragraph const *" instead of a
|
||||||
// "::rtl::Reference< ParagraphImpl > const &".
|
// "::rtl::Reference< Paragraph > const &".
|
||||||
::sal_Int32 retrieveParagraphCaretPosition(ParagraphImpl const * pParagraph);
|
::sal_Int32 retrieveParagraphCaretPosition(Paragraph const * pParagraph);
|
||||||
|
|
||||||
// Must be called only after init has been called.
|
// Must be called only after init has been called.
|
||||||
// To make it possible for this method to be (indirectly) called from
|
// To make it possible for this method to be (indirectly) called from
|
||||||
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
||||||
// still zero), pass a "ParagraphImpl const &" instead of a
|
// still zero), pass a "Paragraph const &" instead of a
|
||||||
// "::rtl::Reference< ParagraphImpl > const &".
|
// "::rtl::Reference< Paragraph > const &".
|
||||||
// Throws css::lang::IndexOutOfBoundsException.
|
// Throws css::lang::IndexOutOfBoundsException.
|
||||||
css::awt::Rectangle
|
css::awt::Rectangle
|
||||||
retrieveCharacterBounds(ParagraphImpl const * pParagraph,
|
retrieveCharacterBounds(Paragraph const * pParagraph,
|
||||||
::sal_Int32 nIndex);
|
::sal_Int32 nIndex);
|
||||||
|
|
||||||
// Must be called only after init has been called.
|
// Must be called only after init has been called.
|
||||||
// To make it possible for this method to be (indirectly) called from
|
// To make it possible for this method to be (indirectly) called from
|
||||||
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
||||||
// still zero), pass a "ParagraphImpl const &" instead of a
|
// still zero), pass a "Paragraph const &" instead of a
|
||||||
// "::rtl::Reference< ParagraphImpl > const &".
|
// "::rtl::Reference< Paragraph > const &".
|
||||||
::sal_Int32 retrieveCharacterIndex(ParagraphImpl const * pParagraph,
|
::sal_Int32 retrieveCharacterIndex(Paragraph const * pParagraph,
|
||||||
css::awt::Point const & rPoint);
|
css::awt::Point const & rPoint);
|
||||||
|
|
||||||
// Must be called only after init has been called.
|
// Must be called only after init has been called.
|
||||||
// To make it possible for this method to be (indirectly) called from
|
// To make it possible for this method to be (indirectly) called from
|
||||||
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
||||||
// still zero), pass a "ParagraphImpl const &" instead of a
|
// still zero), pass a "Paragraph const &" instead of a
|
||||||
// "::rtl::Reference< ParagraphImpl > const &".
|
// "::rtl::Reference< Paragraph > const &".
|
||||||
// Throws css::lang::IndexOutOfBoundsException.
|
// Throws css::lang::IndexOutOfBoundsException.
|
||||||
css::uno::Sequence< css::beans::PropertyValue > retrieveCharacterAttributes(
|
css::uno::Sequence< css::beans::PropertyValue > retrieveCharacterAttributes(
|
||||||
ParagraphImpl const * pParagraph, ::sal_Int32 nIndex,
|
Paragraph const * pParagraph, ::sal_Int32 nIndex,
|
||||||
const css::uno::Sequence< OUString >& aRequestedAttributes);
|
const css::uno::Sequence< OUString >& aRequestedAttributes);
|
||||||
|
|
||||||
// Must be called only after init has been called.
|
// Must be called only after init has been called.
|
||||||
// To make it possible for this method to be (indirectly) called from
|
// To make it possible for this method to be (indirectly) called from
|
||||||
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
||||||
// still zero), pass a "ParagraphImpl const &" instead of a
|
// still zero), pass a "Paragraph const &" instead of a
|
||||||
// "::rtl::Reference< ParagraphImpl > const &".
|
// "::rtl::Reference< Paragraph > const &".
|
||||||
css::uno::Sequence< css::beans::PropertyValue > retrieveDefaultAttributes(
|
css::uno::Sequence< css::beans::PropertyValue > retrieveDefaultAttributes(
|
||||||
ParagraphImpl const * pParagraph,
|
Paragraph const * pParagraph,
|
||||||
const css::uno::Sequence< OUString >& RequestedAttributes);
|
const css::uno::Sequence< OUString >& RequestedAttributes);
|
||||||
|
|
||||||
// Must be called only after init has been called.
|
// Must be called only after init has been called.
|
||||||
// To make it possible for this method to be (indirectly) called from
|
// To make it possible for this method to be (indirectly) called from
|
||||||
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
||||||
// still zero), pass a "ParagraphImpl const &" instead of a
|
// still zero), pass a "Paragraph const &" instead of a
|
||||||
// "::rtl::Reference< ParagraphImpl > const &".
|
// "::rtl::Reference< Paragraph > const &".
|
||||||
// Throws css::lang::IndexOutOfBoundsException.
|
// Throws css::lang::IndexOutOfBoundsException.
|
||||||
css::uno::Sequence< css::beans::PropertyValue > retrieveRunAttributes(
|
css::uno::Sequence< css::beans::PropertyValue > retrieveRunAttributes(
|
||||||
ParagraphImpl const * pParagraph, ::sal_Int32 Index,
|
Paragraph const * pParagraph, ::sal_Int32 Index,
|
||||||
const css::uno::Sequence< OUString >& RequestedAttributes);
|
const css::uno::Sequence< OUString >& RequestedAttributes);
|
||||||
|
|
||||||
// Must be called only after init has been called.
|
// Must be called only after init has been called.
|
||||||
// To make it possible for this method to be (indirectly) called from
|
// To make it possible for this method to be (indirectly) called from
|
||||||
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
||||||
// still zero), pass a "ParagraphImpl const &" instead of a
|
// still zero), pass a "Paragraph const &" instead of a
|
||||||
// "::rtl::Reference< ParagraphImpl > const &".
|
// "::rtl::Reference< Paragraph > const &".
|
||||||
void changeParagraphText(ParagraphImpl * pParagraph,
|
void changeParagraphText(Paragraph * pParagraph,
|
||||||
OUString const & rText);
|
OUString const & rText);
|
||||||
|
|
||||||
// Must be called only after init has been called.
|
// Must be called only after init has been called.
|
||||||
// To make it possible for this method to be (indirectly) called from
|
// To make it possible for this method to be (indirectly) called from
|
||||||
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
||||||
// still zero), pass a "ParagraphImpl const &" instead of a
|
// still zero), pass a "Paragraph const &" instead of a
|
||||||
// "::rtl::Reference< ParagraphImpl > const &".
|
// "::rtl::Reference< Paragraph > const &".
|
||||||
// Throws css::lang::IndexOutOfBoundsException.
|
// Throws css::lang::IndexOutOfBoundsException.
|
||||||
void changeParagraphText(ParagraphImpl * pParagraph, ::sal_Int32 nBegin,
|
void changeParagraphText(Paragraph * pParagraph, ::sal_Int32 nBegin,
|
||||||
::sal_Int32 nEnd, bool bCut, bool bPaste,
|
::sal_Int32 nEnd, bool bCut, bool bPaste,
|
||||||
OUString const & rText);
|
OUString const & rText);
|
||||||
|
|
||||||
// Must be called only after init has been called.
|
// Must be called only after init has been called.
|
||||||
// To make it possible for this method to be (indirectly) called from
|
// To make it possible for this method to be (indirectly) called from
|
||||||
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
||||||
// still zero), pass a "ParagraphImpl const &" instead of a
|
// still zero), pass a "Paragraph const &" instead of a
|
||||||
// "::rtl::Reference< ParagraphImpl > const &".
|
// "::rtl::Reference< Paragraph > const &".
|
||||||
// Throws css::lang::IndexOutOfBoundsException.
|
// Throws css::lang::IndexOutOfBoundsException.
|
||||||
void copyParagraphText(ParagraphImpl const * pParagraph,
|
void copyParagraphText(Paragraph const * pParagraph,
|
||||||
::sal_Int32 nBegin, ::sal_Int32 nEnd);
|
::sal_Int32 nBegin, ::sal_Int32 nEnd);
|
||||||
|
|
||||||
// Must be called only after init has been called.
|
// Must be called only after init has been called.
|
||||||
// To make it possible for this method to be (indirectly) called from
|
// To make it possible for this method to be (indirectly) called from
|
||||||
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
||||||
// still zero), pass a "ParagraphImpl const &" instead of a
|
// still zero), pass a "Paragraph const &" instead of a
|
||||||
// "::rtl::Reference< ParagraphImpl > const &".
|
// "::rtl::Reference< Paragraph > const &".
|
||||||
// Throws css::lang::IndexOutOfBoundsException.
|
// Throws css::lang::IndexOutOfBoundsException.
|
||||||
void changeParagraphAttributes(
|
void changeParagraphAttributes(
|
||||||
ParagraphImpl * pParagraph, ::sal_Int32 nBegin, ::sal_Int32 nEnd,
|
Paragraph * pParagraph, ::sal_Int32 nBegin, ::sal_Int32 nEnd,
|
||||||
css::uno::Sequence< css::beans::PropertyValue > const &
|
css::uno::Sequence< css::beans::PropertyValue > const &
|
||||||
rAttributeSet);
|
rAttributeSet);
|
||||||
|
|
||||||
// Must be called only after init has been called.
|
// Must be called only after init has been called.
|
||||||
// To make it possible for this method to be (indirectly) called from
|
// To make it possible for this method to be (indirectly) called from
|
||||||
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
// within Paragraph's constructor (i.e., when the Paragraph's ref count is
|
||||||
// still zero), pass a "ParagraphImpl const &" instead of a
|
// still zero), pass a "Paragraph const &" instead of a
|
||||||
// "::rtl::Reference< ParagraphImpl > const &".
|
// "::rtl::Reference< Paragraph > const &".
|
||||||
// Throws css::lang::IndexOutOfBoundsException.
|
// Throws css::lang::IndexOutOfBoundsException.
|
||||||
void changeParagraphSelection(ParagraphImpl * pParagraph,
|
void changeParagraphSelection(Paragraph * pParagraph,
|
||||||
::sal_Int32 nBegin, ::sal_Int32 nEnd);
|
::sal_Int32 nBegin, ::sal_Int32 nEnd);
|
||||||
|
|
||||||
css::i18n::Boundary
|
css::i18n::Boundary
|
||||||
retrieveParagraphLineBoundary( ParagraphImpl const * pParagraph,
|
retrieveParagraphLineBoundary( Paragraph const * pParagraph,
|
||||||
::sal_Int32 nIndex, ::sal_Int32 *pLineNo = NULL);
|
::sal_Int32 nIndex, ::sal_Int32 *pLineNo = NULL);
|
||||||
|
|
||||||
css::i18n::Boundary
|
css::i18n::Boundary
|
||||||
retrieveParagraphBoundaryOfLine( ParagraphImpl const * pParagraph,
|
retrieveParagraphBoundaryOfLine( Paragraph const * pParagraph,
|
||||||
::sal_Int32 nIndex );
|
::sal_Int32 nIndex );
|
||||||
|
|
||||||
sal_Int32 retrieveParagraphLineWithCursor( ParagraphImpl const * pParagraph );
|
sal_Int32 retrieveParagraphLineWithCursor( Paragraph const * pParagraph );
|
||||||
|
|
||||||
css::uno::Reference< css::accessibility::XAccessibleRelationSet >
|
css::uno::Reference< css::accessibility::XAccessibleRelationSet >
|
||||||
retrieveParagraphRelationSet( ParagraphImpl const * pParagraph );
|
retrieveParagraphRelationSet( Paragraph const * pParagraph );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual ::sal_Int32 SAL_CALL getAccessibleChildCount()
|
virtual ::sal_Int32 SAL_CALL getAccessibleChildCount()
|
||||||
@ -592,7 +592,7 @@ private:
|
|||||||
|
|
||||||
// Must be called with both the external (Solar) and internal mutex
|
// Must be called with both the external (Solar) and internal mutex
|
||||||
// locked, and after init has been called:
|
// locked, and after init has been called:
|
||||||
::rtl::Reference< ParagraphImpl >
|
::rtl::Reference< Paragraph >
|
||||||
getParagraph(Paragraphs::iterator const & rIt);
|
getParagraph(Paragraphs::iterator const & rIt);
|
||||||
|
|
||||||
// Must be called with both the external (Solar) and internal mutex
|
// Must be called with both the external (Solar) and internal mutex
|
||||||
@ -637,12 +637,12 @@ private:
|
|||||||
static ::FontWeight mapFontWeight(css::uno::Any const & rWeight);
|
static ::FontWeight mapFontWeight(css::uno::Any const & rWeight);
|
||||||
|
|
||||||
void retrieveDefaultAttributesImpl(
|
void retrieveDefaultAttributesImpl(
|
||||||
ParagraphImpl const * pParagraph,
|
Paragraph const * pParagraph,
|
||||||
const css::uno::Sequence< OUString >& RequestedAttributes,
|
const css::uno::Sequence< OUString >& RequestedAttributes,
|
||||||
tPropValMap& rDefAttrSeq);
|
tPropValMap& rDefAttrSeq);
|
||||||
|
|
||||||
void retrieveRunAttributesImpl(
|
void retrieveRunAttributesImpl(
|
||||||
ParagraphImpl const * pParagraph, ::sal_Int32 Index,
|
Paragraph const * pParagraph, ::sal_Int32 Index,
|
||||||
const css::uno::Sequence< OUString >& RequestedAttributes,
|
const css::uno::Sequence< OUString >& RequestedAttributes,
|
||||||
tPropValMap& rRunAttrSeq);
|
tPropValMap& rRunAttrSeq);
|
||||||
|
|
||||||
|
@ -33,17 +33,6 @@ namespace accessibility
|
|||||||
::sal_Int32 getSelectionType(::sal_Int32 nNewFirstPara, ::sal_Int32 nNewFirstPos, ::sal_Int32 nNewLastPara, ::sal_Int32 nNewLastPos);
|
::sal_Int32 getSelectionType(::sal_Int32 nNewFirstPara, ::sal_Int32 nNewFirstPos, ::sal_Int32 nNewLastPara, ::sal_Int32 nNewLastPos);
|
||||||
void sendEvent(::sal_Int32 start, ::sal_Int32 end, ::sal_Int16 nEventId);
|
void sendEvent(::sal_Int32 start, ::sal_Int32 end, ::sal_Int16 nEventId);
|
||||||
|
|
||||||
// Both ::osl::Mutex and ParagraphBase implement acquire and release, and thus
|
|
||||||
// ::rtl::Reference< Paragraph > does not work. So ParagraphImpl was factored
|
|
||||||
// out and ::rtl::Reference< ParagraphImpl > is used instead.
|
|
||||||
class Paragraph: private ::osl::Mutex, public ParagraphImpl
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
inline Paragraph(::rtl::Reference< Document > const & rDocument,
|
|
||||||
Paragraphs::size_type nNumber):
|
|
||||||
ParagraphImpl(rDocument, nNumber, *this) {}
|
|
||||||
};
|
|
||||||
|
|
||||||
void SfxListenerGuard::startListening(::SfxBroadcaster & rNotifier)
|
void SfxListenerGuard::startListening(::SfxBroadcaster & rNotifier)
|
||||||
{
|
{
|
||||||
OSL_ENSURE(m_pNotifier == 0, "called more than once");
|
OSL_ENSURE(m_pNotifier == 0, "called more than once");
|
||||||
@ -76,10 +65,9 @@ void WindowListenerGuard::endListening()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ParagraphImpl::ParagraphImpl(::rtl::Reference< Document > const & rDocument,
|
Paragraph::Paragraph(::rtl::Reference< Document > const & rDocument,
|
||||||
Paragraphs::size_type nNumber,
|
Paragraphs::size_type nNumber):
|
||||||
::osl::Mutex & rMutex):
|
ParagraphBase(m_aMutex),
|
||||||
ParagraphBase(rMutex),
|
|
||||||
m_xDocument(rDocument),
|
m_xDocument(rDocument),
|
||||||
m_nNumber(nNumber),
|
m_nNumber(nNumber),
|
||||||
m_nClientId(0)
|
m_nClientId(0)
|
||||||
@ -88,7 +76,7 @@ ParagraphImpl::ParagraphImpl(::rtl::Reference< Document > const & rDocument,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ParagraphImpl::numberChanged(bool bIncremented)
|
Paragraph::numberChanged(bool bIncremented)
|
||||||
{
|
{
|
||||||
if (bIncremented)
|
if (bIncremented)
|
||||||
++m_nNumber;
|
++m_nNumber;
|
||||||
@ -96,7 +84,7 @@ ParagraphImpl::numberChanged(bool bIncremented)
|
|||||||
--m_nNumber;
|
--m_nNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParagraphImpl::textChanged()
|
void Paragraph::textChanged()
|
||||||
{
|
{
|
||||||
OUString aParagraphText = implGetText();
|
OUString aParagraphText = implGetText();
|
||||||
css::uno::Any aOldValue, aNewValue;
|
css::uno::Any aOldValue, aNewValue;
|
||||||
@ -109,7 +97,7 @@ void ParagraphImpl::textChanged()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParagraphImpl::notifyEvent(::sal_Int16 nEventId,
|
void Paragraph::notifyEvent(::sal_Int16 nEventId,
|
||||||
css::uno::Any const & rOldValue,
|
css::uno::Any const & rOldValue,
|
||||||
css::uno::Any const & rNewValue)
|
css::uno::Any const & rNewValue)
|
||||||
{
|
{
|
||||||
@ -121,14 +109,14 @@ void ParagraphImpl::notifyEvent(::sal_Int16 nEventId,
|
|||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL
|
css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL
|
||||||
ParagraphImpl::getAccessibleContext() throw (css::uno::RuntimeException, std::exception)
|
Paragraph::getAccessibleContext() throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Int32 SAL_CALL ParagraphImpl::getAccessibleChildCount()
|
::sal_Int32 SAL_CALL Paragraph::getAccessibleChildCount()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -137,20 +125,20 @@ ParagraphImpl::getAccessibleContext() throw (css::uno::RuntimeException, std::ex
|
|||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
|
css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
|
||||||
ParagraphImpl::getAccessibleChild(::sal_Int32)
|
Paragraph::getAccessibleChild(::sal_Int32)
|
||||||
throw (css::lang::IndexOutOfBoundsException,
|
throw (css::lang::IndexOutOfBoundsException,
|
||||||
css::uno::RuntimeException, std::exception)
|
css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
throw css::lang::IndexOutOfBoundsException(
|
throw css::lang::IndexOutOfBoundsException(
|
||||||
"textwindowaccessibility.cxx:"
|
"textwindowaccessibility.cxx:"
|
||||||
" ParagraphImpl::getAccessibleChild",
|
" Paragraph::getAccessibleChild",
|
||||||
static_cast< css::uno::XWeak * >(this));
|
static_cast< css::uno::XWeak * >(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
|
css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
|
||||||
ParagraphImpl::getAccessibleParent()
|
Paragraph::getAccessibleParent()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -158,7 +146,7 @@ ParagraphImpl::getAccessibleParent()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Int32 SAL_CALL ParagraphImpl::getAccessibleIndexInParent()
|
::sal_Int32 SAL_CALL Paragraph::getAccessibleIndexInParent()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -166,7 +154,7 @@ ParagraphImpl::getAccessibleParent()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Int16 SAL_CALL ParagraphImpl::getAccessibleRole()
|
::sal_Int16 SAL_CALL Paragraph::getAccessibleRole()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -174,7 +162,7 @@ ParagraphImpl::getAccessibleParent()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
OUString SAL_CALL ParagraphImpl::getAccessibleDescription()
|
OUString SAL_CALL Paragraph::getAccessibleDescription()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -182,7 +170,7 @@ OUString SAL_CALL ParagraphImpl::getAccessibleDescription()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
OUString SAL_CALL ParagraphImpl::getAccessibleName()
|
OUString SAL_CALL Paragraph::getAccessibleName()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -191,7 +179,7 @@ OUString SAL_CALL ParagraphImpl::getAccessibleName()
|
|||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::uno::Reference< css::accessibility::XAccessibleRelationSet >
|
css::uno::Reference< css::accessibility::XAccessibleRelationSet >
|
||||||
SAL_CALL ParagraphImpl::getAccessibleRelationSet()
|
SAL_CALL Paragraph::getAccessibleRelationSet()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -200,7 +188,7 @@ SAL_CALL ParagraphImpl::getAccessibleRelationSet()
|
|||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::uno::Reference< css::accessibility::XAccessibleStateSet >
|
css::uno::Reference< css::accessibility::XAccessibleStateSet >
|
||||||
SAL_CALL ParagraphImpl::getAccessibleStateSet()
|
SAL_CALL Paragraph::getAccessibleStateSet()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -212,7 +200,7 @@ SAL_CALL ParagraphImpl::getAccessibleStateSet()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::lang::Locale SAL_CALL ParagraphImpl::getLocale()
|
css::lang::Locale SAL_CALL Paragraph::getLocale()
|
||||||
throw (css::accessibility::IllegalAccessibleComponentStateException,
|
throw (css::accessibility::IllegalAccessibleComponentStateException,
|
||||||
css::uno::RuntimeException, std::exception)
|
css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
@ -221,7 +209,7 @@ css::lang::Locale SAL_CALL ParagraphImpl::getLocale()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Bool SAL_CALL ParagraphImpl::containsPoint(css::awt::Point const & rPoint)
|
::sal_Bool SAL_CALL Paragraph::containsPoint(css::awt::Point const & rPoint)
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -233,7 +221,7 @@ css::lang::Locale SAL_CALL ParagraphImpl::getLocale()
|
|||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
|
css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
|
||||||
ParagraphImpl::getAccessibleAtPoint(css::awt::Point const &)
|
Paragraph::getAccessibleAtPoint(css::awt::Point const &)
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -241,7 +229,7 @@ ParagraphImpl::getAccessibleAtPoint(css::awt::Point const &)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::awt::Rectangle SAL_CALL ParagraphImpl::getBounds()
|
css::awt::Rectangle SAL_CALL Paragraph::getBounds()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -249,7 +237,7 @@ css::awt::Rectangle SAL_CALL ParagraphImpl::getBounds()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::awt::Point SAL_CALL ParagraphImpl::getLocation()
|
css::awt::Point SAL_CALL Paragraph::getLocation()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -259,7 +247,7 @@ css::awt::Point SAL_CALL ParagraphImpl::getLocation()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::awt::Point SAL_CALL ParagraphImpl::getLocationOnScreen()
|
css::awt::Point SAL_CALL Paragraph::getLocationOnScreen()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -269,7 +257,7 @@ css::awt::Point SAL_CALL ParagraphImpl::getLocationOnScreen()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::awt::Size SAL_CALL ParagraphImpl::getSize()
|
css::awt::Size SAL_CALL Paragraph::getSize()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -279,7 +267,7 @@ css::awt::Size SAL_CALL ParagraphImpl::getSize()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
void SAL_CALL ParagraphImpl::grabFocus() throw (css::uno::RuntimeException, std::exception)
|
void SAL_CALL Paragraph::grabFocus() throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
Window* pWindow = m_xDocument->GetWindow();
|
Window* pWindow = m_xDocument->GetWindow();
|
||||||
@ -294,7 +282,7 @@ void SAL_CALL ParagraphImpl::grabFocus() throw (css::uno::RuntimeException, std:
|
|||||||
catch (const css::lang::IndexOutOfBoundsException & rEx)
|
catch (const css::lang::IndexOutOfBoundsException & rEx)
|
||||||
{
|
{
|
||||||
OSL_TRACE(
|
OSL_TRACE(
|
||||||
"textwindowaccessibility.cxx: ParagraphImpl::grabFocus:"
|
"textwindowaccessibility.cxx: Paragraph::grabFocus:"
|
||||||
" caught unexpected %s\n",
|
" caught unexpected %s\n",
|
||||||
OUStringToOString(rEx.Message, RTL_TEXTENCODING_UTF8).
|
OUStringToOString(rEx.Message, RTL_TEXTENCODING_UTF8).
|
||||||
getStr());
|
getStr());
|
||||||
@ -302,7 +290,7 @@ void SAL_CALL ParagraphImpl::grabFocus() throw (css::uno::RuntimeException, std:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::uno::Any SAL_CALL ParagraphImpl::getAccessibleKeyBinding()
|
css::uno::Any SAL_CALL Paragraph::getAccessibleKeyBinding()
|
||||||
throw (css::uno::RuntimeException)
|
throw (css::uno::RuntimeException)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -310,21 +298,21 @@ css::uno::Any SAL_CALL ParagraphImpl::getAccessibleKeyBinding()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::util::Color SAL_CALL ParagraphImpl::getForeground()
|
css::util::Color SAL_CALL Paragraph::getForeground()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
return 0; // TODO
|
return 0; // TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::util::Color SAL_CALL ParagraphImpl::getBackground()
|
css::util::Color SAL_CALL Paragraph::getBackground()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
return 0; // TODO
|
return 0; // TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Int32 SAL_CALL ParagraphImpl::getCaretPosition()
|
::sal_Int32 SAL_CALL Paragraph::getCaretPosition()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -332,7 +320,7 @@ css::util::Color SAL_CALL ParagraphImpl::getBackground()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Bool SAL_CALL ParagraphImpl::setCaretPosition(::sal_Int32 nIndex)
|
::sal_Bool SAL_CALL Paragraph::setCaretPosition(::sal_Int32 nIndex)
|
||||||
throw (css::lang::IndexOutOfBoundsException,
|
throw (css::lang::IndexOutOfBoundsException,
|
||||||
css::uno::RuntimeException, std::exception)
|
css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
@ -342,7 +330,7 @@ css::util::Color SAL_CALL ParagraphImpl::getBackground()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Unicode SAL_CALL ParagraphImpl::getCharacter(::sal_Int32 nIndex)
|
::sal_Unicode SAL_CALL Paragraph::getCharacter(::sal_Int32 nIndex)
|
||||||
throw (css::lang::IndexOutOfBoundsException,
|
throw (css::lang::IndexOutOfBoundsException,
|
||||||
css::uno::RuntimeException, std::exception)
|
css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
@ -352,7 +340,7 @@ css::util::Color SAL_CALL ParagraphImpl::getBackground()
|
|||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::uno::Sequence< css::beans::PropertyValue > SAL_CALL
|
css::uno::Sequence< css::beans::PropertyValue > SAL_CALL
|
||||||
ParagraphImpl::getCharacterAttributes(::sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< OUString >& aRequestedAttributes)
|
Paragraph::getCharacterAttributes(::sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< OUString >& aRequestedAttributes)
|
||||||
throw (css::lang::IndexOutOfBoundsException,
|
throw (css::lang::IndexOutOfBoundsException,
|
||||||
css::uno::RuntimeException, std::exception)
|
css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
@ -362,7 +350,7 @@ ParagraphImpl::getCharacterAttributes(::sal_Int32 nIndex, const ::com::sun::star
|
|||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::awt::Rectangle SAL_CALL
|
css::awt::Rectangle SAL_CALL
|
||||||
ParagraphImpl::getCharacterBounds(::sal_Int32 nIndex)
|
Paragraph::getCharacterBounds(::sal_Int32 nIndex)
|
||||||
throw (css::lang::IndexOutOfBoundsException,
|
throw (css::lang::IndexOutOfBoundsException,
|
||||||
css::uno::RuntimeException, std::exception)
|
css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
@ -375,7 +363,7 @@ ParagraphImpl::getCharacterBounds(::sal_Int32 nIndex)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Int32 SAL_CALL ParagraphImpl::getCharacterCount()
|
::sal_Int32 SAL_CALL Paragraph::getCharacterCount()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -384,7 +372,7 @@ ParagraphImpl::getCharacterBounds(::sal_Int32 nIndex)
|
|||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Int32 SAL_CALL
|
::sal_Int32 SAL_CALL
|
||||||
ParagraphImpl::getIndexAtPoint(css::awt::Point const & rPoint)
|
Paragraph::getIndexAtPoint(css::awt::Point const & rPoint)
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -396,7 +384,7 @@ ParagraphImpl::getIndexAtPoint(css::awt::Point const & rPoint)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
OUString SAL_CALL ParagraphImpl::getSelectedText()
|
OUString SAL_CALL Paragraph::getSelectedText()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -405,7 +393,7 @@ OUString SAL_CALL ParagraphImpl::getSelectedText()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Int32 SAL_CALL ParagraphImpl::getSelectionStart()
|
::sal_Int32 SAL_CALL Paragraph::getSelectionStart()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -413,7 +401,7 @@ OUString SAL_CALL ParagraphImpl::getSelectedText()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Int32 SAL_CALL ParagraphImpl::getSelectionEnd()
|
::sal_Int32 SAL_CALL Paragraph::getSelectionEnd()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -421,7 +409,7 @@ OUString SAL_CALL ParagraphImpl::getSelectedText()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Bool SAL_CALL ParagraphImpl::setSelection(::sal_Int32 nStartIndex,
|
::sal_Bool SAL_CALL Paragraph::setSelection(::sal_Int32 nStartIndex,
|
||||||
::sal_Int32 nEndIndex)
|
::sal_Int32 nEndIndex)
|
||||||
throw (css::lang::IndexOutOfBoundsException,
|
throw (css::lang::IndexOutOfBoundsException,
|
||||||
css::uno::RuntimeException, std::exception)
|
css::uno::RuntimeException, std::exception)
|
||||||
@ -432,7 +420,7 @@ OUString SAL_CALL ParagraphImpl::getSelectedText()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
OUString SAL_CALL ParagraphImpl::getText()
|
OUString SAL_CALL Paragraph::getText()
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -440,7 +428,7 @@ OUString SAL_CALL ParagraphImpl::getText()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
OUString SAL_CALL ParagraphImpl::getTextRange(::sal_Int32 nStartIndex,
|
OUString SAL_CALL Paragraph::getTextRange(::sal_Int32 nStartIndex,
|
||||||
::sal_Int32 nEndIndex)
|
::sal_Int32 nEndIndex)
|
||||||
throw (css::lang::IndexOutOfBoundsException,
|
throw (css::lang::IndexOutOfBoundsException,
|
||||||
css::uno::RuntimeException, std::exception)
|
css::uno::RuntimeException, std::exception)
|
||||||
@ -450,28 +438,28 @@ OUString SAL_CALL ParagraphImpl::getTextRange(::sal_Int32 nStartIndex,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::com::sun::star::accessibility::TextSegment SAL_CALL ParagraphImpl::getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception)
|
::com::sun::star::accessibility::TextSegment SAL_CALL Paragraph::getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
return OCommonAccessibleText::getTextAtIndex(nIndex, aTextType);
|
return OCommonAccessibleText::getTextAtIndex(nIndex, aTextType);
|
||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::com::sun::star::accessibility::TextSegment SAL_CALL ParagraphImpl::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception)
|
::com::sun::star::accessibility::TextSegment SAL_CALL Paragraph::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
return OCommonAccessibleText::getTextBeforeIndex(nIndex, aTextType);
|
return OCommonAccessibleText::getTextBeforeIndex(nIndex, aTextType);
|
||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::com::sun::star::accessibility::TextSegment SAL_CALL ParagraphImpl::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception)
|
::com::sun::star::accessibility::TextSegment SAL_CALL Paragraph::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
return OCommonAccessibleText::getTextBehindIndex(nIndex, aTextType);
|
return OCommonAccessibleText::getTextBehindIndex(nIndex, aTextType);
|
||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Bool SAL_CALL ParagraphImpl::copyText(::sal_Int32 nStartIndex,
|
::sal_Bool SAL_CALL Paragraph::copyText(::sal_Int32 nStartIndex,
|
||||||
::sal_Int32 nEndIndex)
|
::sal_Int32 nEndIndex)
|
||||||
throw (css::lang::IndexOutOfBoundsException,
|
throw (css::lang::IndexOutOfBoundsException,
|
||||||
css::uno::RuntimeException, std::exception)
|
css::uno::RuntimeException, std::exception)
|
||||||
@ -482,7 +470,7 @@ OUString SAL_CALL ParagraphImpl::getTextRange(::sal_Int32 nStartIndex,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Bool SAL_CALL ParagraphImpl::cutText(::sal_Int32 nStartIndex,
|
::sal_Bool SAL_CALL Paragraph::cutText(::sal_Int32 nStartIndex,
|
||||||
::sal_Int32 nEndIndex)
|
::sal_Int32 nEndIndex)
|
||||||
throw (css::lang::IndexOutOfBoundsException,
|
throw (css::lang::IndexOutOfBoundsException,
|
||||||
css::uno::RuntimeException, std::exception)
|
css::uno::RuntimeException, std::exception)
|
||||||
@ -494,7 +482,7 @@ OUString SAL_CALL ParagraphImpl::getTextRange(::sal_Int32 nStartIndex,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Bool SAL_CALL ParagraphImpl::pasteText(::sal_Int32 nIndex)
|
::sal_Bool SAL_CALL Paragraph::pasteText(::sal_Int32 nIndex)
|
||||||
throw (css::lang::IndexOutOfBoundsException,
|
throw (css::lang::IndexOutOfBoundsException,
|
||||||
css::uno::RuntimeException, std::exception)
|
css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
@ -505,7 +493,7 @@ OUString SAL_CALL ParagraphImpl::getTextRange(::sal_Int32 nStartIndex,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Bool SAL_CALL ParagraphImpl::deleteText(::sal_Int32 nStartIndex,
|
::sal_Bool SAL_CALL Paragraph::deleteText(::sal_Int32 nStartIndex,
|
||||||
::sal_Int32 nEndIndex)
|
::sal_Int32 nEndIndex)
|
||||||
throw (css::lang::IndexOutOfBoundsException,
|
throw (css::lang::IndexOutOfBoundsException,
|
||||||
css::uno::RuntimeException, std::exception)
|
css::uno::RuntimeException, std::exception)
|
||||||
@ -517,7 +505,7 @@ OUString SAL_CALL ParagraphImpl::getTextRange(::sal_Int32 nStartIndex,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Bool SAL_CALL ParagraphImpl::insertText(OUString const & rText,
|
::sal_Bool SAL_CALL Paragraph::insertText(OUString const & rText,
|
||||||
::sal_Int32 nIndex)
|
::sal_Int32 nIndex)
|
||||||
throw (css::lang::IndexOutOfBoundsException,
|
throw (css::lang::IndexOutOfBoundsException,
|
||||||
css::uno::RuntimeException, std::exception)
|
css::uno::RuntimeException, std::exception)
|
||||||
@ -529,7 +517,7 @@ OUString SAL_CALL ParagraphImpl::getTextRange(::sal_Int32 nStartIndex,
|
|||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Bool SAL_CALL
|
::sal_Bool SAL_CALL
|
||||||
ParagraphImpl::replaceText(::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex,
|
Paragraph::replaceText(::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex,
|
||||||
OUString const & rReplacement)
|
OUString const & rReplacement)
|
||||||
throw (css::lang::IndexOutOfBoundsException,
|
throw (css::lang::IndexOutOfBoundsException,
|
||||||
css::uno::RuntimeException, std::exception)
|
css::uno::RuntimeException, std::exception)
|
||||||
@ -541,7 +529,7 @@ ParagraphImpl::replaceText(::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Bool SAL_CALL ParagraphImpl::setAttributes(
|
::sal_Bool SAL_CALL Paragraph::setAttributes(
|
||||||
::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex,
|
::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex,
|
||||||
css::uno::Sequence< css::beans::PropertyValue > const & rAttributeSet)
|
css::uno::Sequence< css::beans::PropertyValue > const & rAttributeSet)
|
||||||
throw (css::lang::IndexOutOfBoundsException,
|
throw (css::lang::IndexOutOfBoundsException,
|
||||||
@ -554,7 +542,7 @@ ParagraphImpl::replaceText(::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Bool SAL_CALL ParagraphImpl::setText(OUString const & rText)
|
::sal_Bool SAL_CALL Paragraph::setText(OUString const & rText)
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -564,7 +552,7 @@ ParagraphImpl::replaceText(::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex,
|
|||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::uno::Sequence< css::beans::PropertyValue > SAL_CALL
|
css::uno::Sequence< css::beans::PropertyValue > SAL_CALL
|
||||||
ParagraphImpl::getDefaultAttributes(const css::uno::Sequence< OUString >& RequestedAttributes)
|
Paragraph::getDefaultAttributes(const css::uno::Sequence< OUString >& RequestedAttributes)
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -573,7 +561,7 @@ ParagraphImpl::getDefaultAttributes(const css::uno::Sequence< OUString >& Reques
|
|||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::uno::Sequence< css::beans::PropertyValue > SAL_CALL
|
css::uno::Sequence< css::beans::PropertyValue > SAL_CALL
|
||||||
ParagraphImpl::getRunAttributes(::sal_Int32 Index, const css::uno::Sequence< OUString >& RequestedAttributes)
|
Paragraph::getRunAttributes(::sal_Int32 Index, const css::uno::Sequence< OUString >& RequestedAttributes)
|
||||||
throw (css::lang::IndexOutOfBoundsException,
|
throw (css::lang::IndexOutOfBoundsException,
|
||||||
css::uno::RuntimeException, std::exception)
|
css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
@ -582,7 +570,7 @@ ParagraphImpl::getRunAttributes(::sal_Int32 Index, const css::uno::Sequence< OUS
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Int32 SAL_CALL ParagraphImpl::getLineNumberAtIndex( ::sal_Int32 nIndex )
|
::sal_Int32 SAL_CALL Paragraph::getLineNumberAtIndex( ::sal_Int32 nIndex )
|
||||||
throw (css::lang::IndexOutOfBoundsException,
|
throw (css::lang::IndexOutOfBoundsException,
|
||||||
css::uno::RuntimeException, std::exception)
|
css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
@ -595,7 +583,7 @@ ParagraphImpl::getRunAttributes(::sal_Int32 Index, const css::uno::Sequence< OUS
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::accessibility::TextSegment SAL_CALL ParagraphImpl::getTextAtLineNumber( ::sal_Int32 nLineNo )
|
css::accessibility::TextSegment SAL_CALL Paragraph::getTextAtLineNumber( ::sal_Int32 nLineNo )
|
||||||
throw (css::lang::IndexOutOfBoundsException,
|
throw (css::lang::IndexOutOfBoundsException,
|
||||||
css::uno::RuntimeException, std::exception)
|
css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
@ -609,7 +597,7 @@ css::accessibility::TextSegment SAL_CALL ParagraphImpl::getTextAtLineNumber( ::s
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::accessibility::TextSegment SAL_CALL ParagraphImpl::getTextAtLineWithCaret( )
|
css::accessibility::TextSegment SAL_CALL Paragraph::getTextAtLineWithCaret( )
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -623,13 +611,13 @@ css::accessibility::TextSegment SAL_CALL ParagraphImpl::getTextAtLineWithCaret(
|
|||||||
} catch (const css::lang::IndexOutOfBoundsException&) {
|
} catch (const css::lang::IndexOutOfBoundsException&) {
|
||||||
throw css::uno::RuntimeException(
|
throw css::uno::RuntimeException(
|
||||||
"textwindowaccessibility.cxx:"
|
"textwindowaccessibility.cxx:"
|
||||||
" ParagraphImpl::getTextAtLineWithCaret",
|
" Paragraph::getTextAtLineWithCaret",
|
||||||
static_cast< css::uno::XWeak * >( this ) );
|
static_cast< css::uno::XWeak * >( this ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
::sal_Int32 SAL_CALL ParagraphImpl::getNumberOfLineWithCaret( )
|
::sal_Int32 SAL_CALL Paragraph::getNumberOfLineWithCaret( )
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
checkDisposed();
|
checkDisposed();
|
||||||
@ -638,7 +626,7 @@ css::accessibility::TextSegment SAL_CALL ParagraphImpl::getTextAtLineWithCaret(
|
|||||||
|
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
void SAL_CALL ParagraphImpl::addAccessibleEventListener(
|
void SAL_CALL Paragraph::addAccessibleEventListener(
|
||||||
css::uno::Reference<
|
css::uno::Reference<
|
||||||
css::accessibility::XAccessibleEventListener > const & rListener)
|
css::accessibility::XAccessibleEventListener > const & rListener)
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
@ -662,7 +650,7 @@ void SAL_CALL ParagraphImpl::addAccessibleEventListener(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
void SAL_CALL ParagraphImpl::removeAccessibleEventListener(
|
void SAL_CALL Paragraph::removeAccessibleEventListener(
|
||||||
css::uno::Reference<
|
css::uno::Reference<
|
||||||
css::accessibility::XAccessibleEventListener > const & rListener)
|
css::accessibility::XAccessibleEventListener > const & rListener)
|
||||||
throw (css::uno::RuntimeException, std::exception)
|
throw (css::uno::RuntimeException, std::exception)
|
||||||
@ -688,7 +676,7 @@ void SAL_CALL ParagraphImpl::removeAccessibleEventListener(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
void SAL_CALL ParagraphImpl::disposing()
|
void SAL_CALL Paragraph::disposing()
|
||||||
{
|
{
|
||||||
comphelper::AccessibleEventNotifier::TClientId nId = 0;
|
comphelper::AccessibleEventNotifier::TClientId nId = 0;
|
||||||
{
|
{
|
||||||
@ -701,26 +689,26 @@ void SAL_CALL ParagraphImpl::disposing()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
OUString ParagraphImpl::implGetText()
|
OUString Paragraph::implGetText()
|
||||||
{
|
{
|
||||||
return m_xDocument->retrieveParagraphText(this);
|
return m_xDocument->retrieveParagraphText(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
css::lang::Locale ParagraphImpl::implGetLocale()
|
css::lang::Locale Paragraph::implGetLocale()
|
||||||
{
|
{
|
||||||
return m_xDocument->retrieveLocale();
|
return m_xDocument->retrieveLocale();
|
||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
void ParagraphImpl::implGetSelection(::sal_Int32 & rStartIndex,
|
void Paragraph::implGetSelection(::sal_Int32 & rStartIndex,
|
||||||
::sal_Int32 & rEndIndex)
|
::sal_Int32 & rEndIndex)
|
||||||
{
|
{
|
||||||
m_xDocument->retrieveParagraphSelection(this, &rStartIndex, &rEndIndex);
|
m_xDocument->retrieveParagraphSelection(this, &rStartIndex, &rEndIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
void ParagraphImpl::implGetParagraphBoundary( css::i18n::Boundary& rBoundary,
|
void Paragraph::implGetParagraphBoundary( css::i18n::Boundary& rBoundary,
|
||||||
::sal_Int32 nIndex )
|
::sal_Int32 nIndex )
|
||||||
{
|
{
|
||||||
OUString sText( implGetText() );
|
OUString sText( implGetText() );
|
||||||
@ -739,7 +727,7 @@ void ParagraphImpl::implGetParagraphBoundary( css::i18n::Boundary& rBoundary,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
void ParagraphImpl::implGetLineBoundary( css::i18n::Boundary& rBoundary,
|
void Paragraph::implGetLineBoundary( css::i18n::Boundary& rBoundary,
|
||||||
::sal_Int32 nIndex )
|
::sal_Int32 nIndex )
|
||||||
{
|
{
|
||||||
OUString sText( implGetText() );
|
OUString sText( implGetText() );
|
||||||
@ -760,7 +748,7 @@ void ParagraphImpl::implGetLineBoundary( css::i18n::Boundary& rBoundary,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ParagraphImpl::checkDisposed()
|
void Paragraph::checkDisposed()
|
||||||
{
|
{
|
||||||
::osl::MutexGuard aGuard(rBHelper.rMutex);
|
::osl::MutexGuard aGuard(rBHelper.rMutex);
|
||||||
if (!(rBHelper.bDisposed || rBHelper.bInDispose))
|
if (!(rBHelper.bDisposed || rBHelper.bInDispose))
|
||||||
@ -793,7 +781,7 @@ css::lang::Locale Document::retrieveLocale()
|
|||||||
return m_rEngine.GetLocale();
|
return m_rEngine.GetLocale();
|
||||||
}
|
}
|
||||||
|
|
||||||
::sal_Int32 Document::retrieveParagraphIndex(ParagraphImpl const * pParagraph)
|
::sal_Int32 Document::retrieveParagraphIndex(Paragraph const * pParagraph)
|
||||||
{
|
{
|
||||||
::osl::MutexGuard aInternalGuard(GetMutex());
|
::osl::MutexGuard aInternalGuard(GetMutex());
|
||||||
|
|
||||||
@ -807,7 +795,7 @@ css::lang::Locale Document::retrieveLocale()
|
|||||||
// XXX numeric overflow
|
// XXX numeric overflow
|
||||||
}
|
}
|
||||||
|
|
||||||
::sal_Int64 Document::retrieveParagraphState(ParagraphImpl const * pParagraph)
|
::sal_Int64 Document::retrieveParagraphState(Paragraph const * pParagraph)
|
||||||
{
|
{
|
||||||
::osl::MutexGuard aInternalGuard(GetMutex());
|
::osl::MutexGuard aInternalGuard(GetMutex());
|
||||||
|
|
||||||
@ -843,7 +831,7 @@ css::lang::Locale Document::retrieveLocale()
|
|||||||
};
|
};
|
||||||
|
|
||||||
css::awt::Rectangle
|
css::awt::Rectangle
|
||||||
Document::retrieveParagraphBounds(ParagraphImpl const * pParagraph,
|
Document::retrieveParagraphBounds(Paragraph const * pParagraph,
|
||||||
bool bAbsolute)
|
bool bAbsolute)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
||||||
@ -883,7 +871,7 @@ Document::retrieveParagraphBounds(ParagraphImpl const * pParagraph,
|
|||||||
}
|
}
|
||||||
|
|
||||||
OUString
|
OUString
|
||||||
Document::retrieveParagraphText(ParagraphImpl const * pParagraph)
|
Document::retrieveParagraphText(Paragraph const * pParagraph)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
||||||
::osl::MutexGuard aInternalGuard(GetMutex());
|
::osl::MutexGuard aInternalGuard(GetMutex());
|
||||||
@ -891,7 +879,7 @@ Document::retrieveParagraphText(ParagraphImpl const * pParagraph)
|
|||||||
// numeric overflow cannot happen here
|
// numeric overflow cannot happen here
|
||||||
}
|
}
|
||||||
|
|
||||||
void Document::retrieveParagraphSelection(ParagraphImpl const * pParagraph,
|
void Document::retrieveParagraphSelection(Paragraph const * pParagraph,
|
||||||
::sal_Int32 * pBegin,
|
::sal_Int32 * pBegin,
|
||||||
::sal_Int32 * pEnd)
|
::sal_Int32 * pEnd)
|
||||||
{
|
{
|
||||||
@ -925,7 +913,7 @@ void Document::retrieveParagraphSelection(ParagraphImpl const * pParagraph,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::sal_Int32 Document::retrieveParagraphCaretPosition(ParagraphImpl const * pParagraph)
|
::sal_Int32 Document::retrieveParagraphCaretPosition(Paragraph const * pParagraph)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
||||||
::osl::MutexGuard aInternalGuard(GetMutex());
|
::osl::MutexGuard aInternalGuard(GetMutex());
|
||||||
@ -938,7 +926,7 @@ void Document::retrieveParagraphSelection(ParagraphImpl const * pParagraph,
|
|||||||
}
|
}
|
||||||
|
|
||||||
css::awt::Rectangle
|
css::awt::Rectangle
|
||||||
Document::retrieveCharacterBounds(ParagraphImpl const * pParagraph,
|
Document::retrieveCharacterBounds(Paragraph const * pParagraph,
|
||||||
::sal_Int32 nIndex)
|
::sal_Int32 nIndex)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
||||||
@ -988,7 +976,7 @@ Document::retrieveCharacterBounds(ParagraphImpl const * pParagraph,
|
|||||||
return aBounds;
|
return aBounds;
|
||||||
}
|
}
|
||||||
|
|
||||||
::sal_Int32 Document::retrieveCharacterIndex(ParagraphImpl const * pParagraph,
|
::sal_Int32 Document::retrieveCharacterIndex(Paragraph const * pParagraph,
|
||||||
css::awt::Point const & rPoint)
|
css::awt::Point const & rPoint)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
||||||
@ -1015,7 +1003,7 @@ struct IndexCompare
|
|||||||
|
|
||||||
css::uno::Sequence< css::beans::PropertyValue >
|
css::uno::Sequence< css::beans::PropertyValue >
|
||||||
Document::retrieveCharacterAttributes(
|
Document::retrieveCharacterAttributes(
|
||||||
ParagraphImpl const * pParagraph, ::sal_Int32 nIndex,
|
Paragraph const * pParagraph, ::sal_Int32 nIndex,
|
||||||
const css::uno::Sequence< OUString >& aRequestedAttributes)
|
const css::uno::Sequence< OUString >& aRequestedAttributes)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
||||||
@ -1160,7 +1148,7 @@ Document::retrieveCharacterAttributes(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Document::retrieveDefaultAttributesImpl(
|
void Document::retrieveDefaultAttributesImpl(
|
||||||
ParagraphImpl const * pParagraph,
|
Paragraph const * pParagraph,
|
||||||
const css::uno::Sequence< OUString >& RequestedAttributes,
|
const css::uno::Sequence< OUString >& RequestedAttributes,
|
||||||
tPropValMap& rDefAttrSeq)
|
tPropValMap& rDefAttrSeq)
|
||||||
{
|
{
|
||||||
@ -1172,7 +1160,7 @@ void Document::retrieveDefaultAttributesImpl(
|
|||||||
|
|
||||||
css::uno::Sequence< css::beans::PropertyValue >
|
css::uno::Sequence< css::beans::PropertyValue >
|
||||||
Document::retrieveDefaultAttributes(
|
Document::retrieveDefaultAttributes(
|
||||||
ParagraphImpl const * pParagraph,
|
Paragraph const * pParagraph,
|
||||||
const css::uno::Sequence< OUString >& RequestedAttributes)
|
const css::uno::Sequence< OUString >& RequestedAttributes)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::comphelper::IMutex > aExternalGuard( getExternalLock() );
|
::osl::Guard< ::comphelper::IMutex > aExternalGuard( getExternalLock() );
|
||||||
@ -1201,7 +1189,7 @@ Document::convertHashMapToSequence(tPropValMap& rAttrSeq)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Document::retrieveRunAttributesImpl(
|
void Document::retrieveRunAttributesImpl(
|
||||||
ParagraphImpl const * pParagraph, ::sal_Int32 Index,
|
Paragraph const * pParagraph, ::sal_Int32 Index,
|
||||||
const css::uno::Sequence< OUString >& RequestedAttributes,
|
const css::uno::Sequence< OUString >& RequestedAttributes,
|
||||||
tPropValMap& rRunAttrSeq)
|
tPropValMap& rRunAttrSeq)
|
||||||
{
|
{
|
||||||
@ -1255,7 +1243,7 @@ void Document::retrieveRunAttributesImpl(
|
|||||||
|
|
||||||
css::uno::Sequence< css::beans::PropertyValue >
|
css::uno::Sequence< css::beans::PropertyValue >
|
||||||
Document::retrieveRunAttributes(
|
Document::retrieveRunAttributes(
|
||||||
ParagraphImpl const * pParagraph, ::sal_Int32 Index,
|
Paragraph const * pParagraph, ::sal_Int32 Index,
|
||||||
const css::uno::Sequence< OUString >& RequestedAttributes)
|
const css::uno::Sequence< OUString >& RequestedAttributes)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::comphelper::IMutex > aExternalGuard( getExternalLock() );
|
::osl::Guard< ::comphelper::IMutex > aExternalGuard( getExternalLock() );
|
||||||
@ -1273,7 +1261,7 @@ Document::retrieveRunAttributes(
|
|||||||
return convertHashMapToSequence( aRunAttrSeq );
|
return convertHashMapToSequence( aRunAttrSeq );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Document::changeParagraphText(ParagraphImpl * pParagraph,
|
void Document::changeParagraphText(Paragraph * pParagraph,
|
||||||
OUString const & rText)
|
OUString const & rText)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
||||||
@ -1286,7 +1274,7 @@ void Document::changeParagraphText(ParagraphImpl * pParagraph,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Document::changeParagraphText(ParagraphImpl * pParagraph,
|
void Document::changeParagraphText(Paragraph * pParagraph,
|
||||||
::sal_Int32 nBegin, ::sal_Int32 nEnd,
|
::sal_Int32 nBegin, ::sal_Int32 nEnd,
|
||||||
bool bCut, bool bPaste,
|
bool bCut, bool bPaste,
|
||||||
OUString const & rText)
|
OUString const & rText)
|
||||||
@ -1308,7 +1296,7 @@ void Document::changeParagraphText(ParagraphImpl * pParagraph,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Document::copyParagraphText(ParagraphImpl const * pParagraph,
|
void Document::copyParagraphText(Paragraph const * pParagraph,
|
||||||
::sal_Int32 nBegin, ::sal_Int32 nEnd)
|
::sal_Int32 nBegin, ::sal_Int32 nEnd)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
||||||
@ -1331,7 +1319,7 @@ void Document::copyParagraphText(ParagraphImpl const * pParagraph,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Document::changeParagraphAttributes(
|
void Document::changeParagraphAttributes(
|
||||||
ParagraphImpl * pParagraph, ::sal_Int32 nBegin, ::sal_Int32 nEnd,
|
Paragraph * pParagraph, ::sal_Int32 nBegin, ::sal_Int32 nEnd,
|
||||||
css::uno::Sequence< css::beans::PropertyValue > const & rAttributeSet)
|
css::uno::Sequence< css::beans::PropertyValue > const & rAttributeSet)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
||||||
@ -1365,7 +1353,7 @@ void Document::changeParagraphAttributes(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Document::changeParagraphSelection(ParagraphImpl * pParagraph,
|
void Document::changeParagraphSelection(Paragraph * pParagraph,
|
||||||
::sal_Int32 nBegin, ::sal_Int32 nEnd)
|
::sal_Int32 nBegin, ::sal_Int32 nEnd)
|
||||||
{
|
{
|
||||||
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
||||||
@ -1387,7 +1375,7 @@ void Document::changeParagraphSelection(ParagraphImpl * pParagraph,
|
|||||||
}
|
}
|
||||||
|
|
||||||
css::i18n::Boundary
|
css::i18n::Boundary
|
||||||
Document::retrieveParagraphLineBoundary( ParagraphImpl const * pParagraph,
|
Document::retrieveParagraphLineBoundary( Paragraph const * pParagraph,
|
||||||
::sal_Int32 nIndex, ::sal_Int32 *pLineNo )
|
::sal_Int32 nIndex, ::sal_Int32 *pLineNo )
|
||||||
{
|
{
|
||||||
css::i18n::Boundary aBoundary;
|
css::i18n::Boundary aBoundary;
|
||||||
@ -1427,7 +1415,7 @@ Document::retrieveParagraphLineBoundary( ParagraphImpl const * pParagraph,
|
|||||||
}
|
}
|
||||||
|
|
||||||
css::i18n::Boundary
|
css::i18n::Boundary
|
||||||
Document::retrieveParagraphBoundaryOfLine( ParagraphImpl const * pParagraph,
|
Document::retrieveParagraphBoundaryOfLine( Paragraph const * pParagraph,
|
||||||
::sal_Int32 nLineNo )
|
::sal_Int32 nLineNo )
|
||||||
{
|
{
|
||||||
css::i18n::Boundary aBoundary;
|
css::i18n::Boundary aBoundary;
|
||||||
@ -1460,7 +1448,7 @@ Document::retrieveParagraphBoundaryOfLine( ParagraphImpl const * pParagraph,
|
|||||||
return aBoundary;
|
return aBoundary;
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Int32 Document::retrieveParagraphLineWithCursor( ParagraphImpl const * pParagraph )
|
sal_Int32 Document::retrieveParagraphLineWithCursor( Paragraph const * pParagraph )
|
||||||
{
|
{
|
||||||
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
|
||||||
::osl::MutexGuard aInternalGuard(GetMutex());
|
::osl::MutexGuard aInternalGuard(GetMutex());
|
||||||
@ -1474,7 +1462,7 @@ sal_Int32 Document::retrieveParagraphLineWithCursor( ParagraphImpl const * pPara
|
|||||||
|
|
||||||
|
|
||||||
css::uno::Reference< css::accessibility::XAccessibleRelationSet >
|
css::uno::Reference< css::accessibility::XAccessibleRelationSet >
|
||||||
Document::retrieveParagraphRelationSet( ParagraphImpl const * pParagraph )
|
Document::retrieveParagraphRelationSet( Paragraph const * pParagraph )
|
||||||
{
|
{
|
||||||
::osl::MutexGuard aInternalGuard( GetMutex() );
|
::osl::MutexGuard aInternalGuard( GetMutex() );
|
||||||
|
|
||||||
@ -1727,7 +1715,7 @@ IMPL_LINK(Document, WindowEventHandler, ::VclSimpleEvent *, pEvent)
|
|||||||
if ((m_aFocused >= m_aVisibleBegin && m_aFocused < m_aVisibleEnd) || bEmpty)
|
if ((m_aFocused >= m_aVisibleBegin && m_aFocused < m_aVisibleEnd) || bEmpty)
|
||||||
{
|
{
|
||||||
Paragraphs::iterator m_aTemp = bEmpty ? m_aVisibleBegin : m_aFocused;
|
Paragraphs::iterator m_aTemp = bEmpty ? m_aVisibleBegin : m_aFocused;
|
||||||
::rtl::Reference< ParagraphImpl > xParagraph(getParagraph(m_aTemp));
|
::rtl::Reference< Paragraph > xParagraph(getParagraph(m_aTemp));
|
||||||
if (xParagraph.is())
|
if (xParagraph.is())
|
||||||
{
|
{
|
||||||
xParagraph->notifyEvent(
|
xParagraph->notifyEvent(
|
||||||
@ -1740,7 +1728,7 @@ IMPL_LINK(Document, WindowEventHandler, ::VclSimpleEvent *, pEvent)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
::rtl::Reference< ParagraphImpl > xParagraph(
|
::rtl::Reference< Paragraph > xParagraph(
|
||||||
getParagraph(m_aFocused));
|
getParagraph(m_aFocused));
|
||||||
if (xParagraph.is())
|
if (xParagraph.is())
|
||||||
xParagraph->notifyEvent(
|
xParagraph->notifyEvent(
|
||||||
@ -1764,7 +1752,7 @@ IMPL_LINK(Document, WindowEventHandler, ::VclSimpleEvent *, pEvent)
|
|||||||
if ((m_aFocused >= m_aVisibleBegin && m_aFocused < m_aVisibleEnd) || bEmpty)
|
if ((m_aFocused >= m_aVisibleBegin && m_aFocused < m_aVisibleEnd) || bEmpty)
|
||||||
{
|
{
|
||||||
Paragraphs::iterator m_aTemp = bEmpty ? m_aVisibleBegin : m_aFocused;
|
Paragraphs::iterator m_aTemp = bEmpty ? m_aVisibleBegin : m_aFocused;
|
||||||
::rtl::Reference< ParagraphImpl > xParagraph(getParagraph(m_aTemp));
|
::rtl::Reference< Paragraph > xParagraph(getParagraph(m_aTemp));
|
||||||
if (xParagraph.is())
|
if (xParagraph.is())
|
||||||
xParagraph->notifyEvent(
|
xParagraph->notifyEvent(
|
||||||
::css::accessibility::AccessibleEventId::
|
::css::accessibility::AccessibleEventId::
|
||||||
@ -1778,7 +1766,7 @@ IMPL_LINK(Document, WindowEventHandler, ::VclSimpleEvent *, pEvent)
|
|||||||
/*
|
/*
|
||||||
if (m_aFocused >= m_aVisibleBegin && m_aFocused < m_aVisibleEnd)
|
if (m_aFocused >= m_aVisibleBegin && m_aFocused < m_aVisibleEnd)
|
||||||
{
|
{
|
||||||
::rtl::Reference< ParagraphImpl > xParagraph(
|
::rtl::Reference< Paragraph > xParagraph(
|
||||||
getParagraph(m_aFocused));
|
getParagraph(m_aFocused));
|
||||||
if (xParagraph.is())
|
if (xParagraph.is())
|
||||||
xParagraph->notifyEvent(
|
xParagraph->notifyEvent(
|
||||||
@ -1825,10 +1813,10 @@ void Document::init()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::rtl::Reference< ParagraphImpl >
|
::rtl::Reference< Paragraph >
|
||||||
Document::getParagraph(Paragraphs::iterator const & rIt)
|
Document::getParagraph(Paragraphs::iterator const & rIt)
|
||||||
{
|
{
|
||||||
return static_cast< ParagraphImpl * >(
|
return static_cast< Paragraph * >(
|
||||||
css::uno::Reference< css::accessibility::XAccessible >(
|
css::uno::Reference< css::accessibility::XAccessible >(
|
||||||
rIt->getParagraph()).get());
|
rIt->getParagraph()).get());
|
||||||
}
|
}
|
||||||
@ -1979,7 +1967,7 @@ void Document::handleParagraphNotifications()
|
|||||||
++aIt;
|
++aIt;
|
||||||
if (aIt == m_xParagraphs->end())
|
if (aIt == m_xParagraphs->end())
|
||||||
break;
|
break;
|
||||||
::rtl::Reference< ParagraphImpl > xParagraph(
|
::rtl::Reference< Paragraph > xParagraph(
|
||||||
getParagraph(aIt));
|
getParagraph(aIt));
|
||||||
if (xParagraph.is())
|
if (xParagraph.is())
|
||||||
xParagraph->numberChanged(true);
|
xParagraph->numberChanged(true);
|
||||||
@ -2081,7 +2069,7 @@ void Document::handleParagraphNotifications()
|
|||||||
|
|
||||||
for (; aIt != m_xParagraphs->end(); ++aIt)
|
for (; aIt != m_xParagraphs->end(); ++aIt)
|
||||||
{
|
{
|
||||||
::rtl::Reference< ParagraphImpl > xParagraph(
|
::rtl::Reference< Paragraph > xParagraph(
|
||||||
getParagraph(aIt));
|
getParagraph(aIt));
|
||||||
if (xParagraph.is())
|
if (xParagraph.is())
|
||||||
xParagraph->numberChanged(false);
|
xParagraph->numberChanged(false);
|
||||||
@ -2125,7 +2113,7 @@ void Document::handleParagraphNotifications()
|
|||||||
if (n < m_xParagraphs->size())
|
if (n < m_xParagraphs->size())
|
||||||
{
|
{
|
||||||
Paragraphs::iterator aIt(m_xParagraphs->begin() + n);
|
Paragraphs::iterator aIt(m_xParagraphs->begin() + n);
|
||||||
::rtl::Reference< ParagraphImpl > xParagraph(getParagraph(aIt));
|
::rtl::Reference< Paragraph > xParagraph(getParagraph(aIt));
|
||||||
if (xParagraph.is())
|
if (xParagraph.is())
|
||||||
xParagraph->textChanged();
|
xParagraph->textChanged();
|
||||||
}
|
}
|
||||||
@ -2253,7 +2241,7 @@ void Document::sendEvent(::sal_Int32 start, ::sal_Int32 end, ::sal_Int16 nEventI
|
|||||||
for (Paragraphs::iterator aIt = ::std::max(m_xParagraphs->begin() + start, m_aVisibleBegin);
|
for (Paragraphs::iterator aIt = ::std::max(m_xParagraphs->begin() + start, m_aVisibleBegin);
|
||||||
aIt < aEnd; ++aIt)
|
aIt < aEnd; ++aIt)
|
||||||
{
|
{
|
||||||
::rtl::Reference< ParagraphImpl > xParagraph(getParagraph(aIt));
|
::rtl::Reference< Paragraph > xParagraph(getParagraph(aIt));
|
||||||
if (xParagraph.is())
|
if (xParagraph.is())
|
||||||
xParagraph->notifyEvent(
|
xParagraph->notifyEvent(
|
||||||
nEventId,
|
nEventId,
|
||||||
@ -2283,7 +2271,7 @@ void Document::handleSelectionChangeNotification()
|
|||||||
if (m_aFocused != m_xParagraphs->end() && m_aFocused != aIt
|
if (m_aFocused != m_xParagraphs->end() && m_aFocused != aIt
|
||||||
&& m_aFocused >= m_aVisibleBegin && m_aFocused < m_aVisibleEnd)
|
&& m_aFocused >= m_aVisibleBegin && m_aFocused < m_aVisibleEnd)
|
||||||
{
|
{
|
||||||
::rtl::Reference< ParagraphImpl > xParagraph(getParagraph(m_aFocused));
|
::rtl::Reference< Paragraph > xParagraph(getParagraph(m_aFocused));
|
||||||
if (xParagraph.is())
|
if (xParagraph.is())
|
||||||
xParagraph->notifyEvent(
|
xParagraph->notifyEvent(
|
||||||
css::accessibility::AccessibleEventId::
|
css::accessibility::AccessibleEventId::
|
||||||
@ -2299,7 +2287,7 @@ void Document::handleSelectionChangeNotification()
|
|||||||
|| nNewLastPara != m_nSelectionLastPara
|
|| nNewLastPara != m_nSelectionLastPara
|
||||||
|| nNewLastPos != m_nSelectionLastPos))
|
|| nNewLastPos != m_nSelectionLastPos))
|
||||||
{
|
{
|
||||||
::rtl::Reference< ParagraphImpl > xParagraph(getParagraph(aIt));
|
::rtl::Reference< Paragraph > xParagraph(getParagraph(aIt));
|
||||||
if (xParagraph.is())
|
if (xParagraph.is())
|
||||||
{
|
{
|
||||||
//disable the first event when user types in empty field.
|
//disable the first event when user types in empty field.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user