summaryrefslogtreecommitdiff
path: root/editeng/source/uno/unotext.cxx
diff options
context:
space:
mode:
authorVarun Dhall <varun.dhall@studentpartner.com>2017-06-22 11:24:10 +0530
committerMichael Stahl <mstahl@redhat.com>2017-06-30 19:39:16 +0200
commit3c1fc723ff622d8a541fa26a3397ca4258332e4a (patch)
tree2f7d5b66c2dcad5db9910f7b683ac9509bf227aa /editeng/source/uno/unotext.cxx
parenta429d4317d2d4f9d6a1a39d996ee9fa41096d741 (diff)
EditEngine: Changing export selection for copy/paste
Change-Id: I6f52f30eff76de5f0d641271ce3ea36ced572cc4 Reviewed-on: https://gerrit.libreoffice.org/39083 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'editeng/source/uno/unotext.cxx')
-rw-r--r--editeng/source/uno/unotext.cxx19
1 files changed, 12 insertions, 7 deletions
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 058e56ad7d9f..dcfdd72eace9 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -1955,13 +1955,18 @@ void SAL_CALL SvxUnoTextBase::setString( const OUString& aString )
uno::Reference< container::XEnumeration > SAL_CALL SvxUnoTextBase::createEnumeration()
{
SolarMutexGuard aGuard;
-
- ESelection aSelection;
- ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
- SetSelection( aSelection );
-
- uno::Reference< container::XEnumeration > xEnum( static_cast<container::XEnumeration*>(new SvxUnoTextContentEnumeration( *this )) );
- return xEnum;
+ if( maSelection.IsEqual(ESelection(0,0,0,0)) || maSelection.IsEqual(ESelection(EE_PARA_MAX_COUNT,0,0,0)) )
+ {
+ ESelection aSelection;
+ ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
+ uno::Reference< container::XEnumeration > xEnum( static_cast<container::XEnumeration*>( new SvxUnoTextContentEnumeration( *this, aSelection ) ) );
+ return xEnum;
+ }
+ else
+ {
+ uno::Reference< container::XEnumeration > xEnum( static_cast<container::XEnumeration*>( new SvxUnoTextContentEnumeration( *this, maSelection ) ) );
+ return xEnum;
+ }
}
// XElementAccess ( container::XEnumerationAccess )