From c8ea02049373f99ec30758ef3e8a09049c0af6c1 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 23 Apr 2009 16:30:25 +0000 Subject: [PATCH] CWS-TOOLING: integrate CWS aw072_DEV300 2009-04-21 17:50:04 +0200 aw r271050 : #i101250# corrected flag for ModifyWithAttributes 2009-04-21 15:41:02 +0200 aw r271040 : #i101169# corrected old MetaFile tag generation for text animations in slideshow --- .../processor2d/vclmetafileprocessor2d.cxx | 21 ++++++++++--------- .../schema/org/openoffice/Office/Impress.xcs | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index dc5589200c15..172413105b1c 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -912,7 +912,7 @@ namespace drawinglayer { // for supporting TEXT_ MetaFile actions there is more to do here; get the candidate const primitive2d::TextSimplePortionPrimitive2D& rTextCandidate = static_cast< const primitive2d::TextSimplePortionPrimitive2D& >(rCandidate); - const primitive2d::TextDecoratedPortionPrimitive2D* pTextDecoratedCandidate = dynamic_cast< const primitive2d::TextDecoratedPortionPrimitive2D* >(&rCandidate); + // const primitive2d::TextDecoratedPortionPrimitive2D* pTextDecoratedCandidate = dynamic_cast< const primitive2d::TextDecoratedPortionPrimitive2D* >(&rCandidate); // Adapt evtl. used special DrawMode const sal_uInt32 nOriginalDrawMode(mpOutputDevice->GetDrawMode()); @@ -924,7 +924,7 @@ namespace drawinglayer // restore DrawMode mpOutputDevice->SetDrawMode(nOriginalDrawMode); - if(pTextDecoratedCandidate) + // #i101169# if(pTextDecoratedCandidate) { // support for TEXT_ MetaFile actions only for decorated texts if(!mxBreakIterator.is()) @@ -936,36 +936,37 @@ namespace drawinglayer if(mxBreakIterator.is()) { const rtl::OUString& rTxt = rTextCandidate.getText(); - const sal_Int32 nTextLength(rTxt.getLength()); + const sal_Int32 nTextLength(rTextCandidate.getTextLength()); // rTxt.getLength()); if(nTextLength) { const ::com::sun::star::lang::Locale& rLocale = rTextCandidate.getLocale(); + const sal_Int32 nTextPosition(rTextCandidate.getTextPosition()); sal_Int32 nDone; - sal_Int32 nNextCellBreak(mxBreakIterator->nextCharacters(rTxt, 0, rLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, 0, nDone)); - ::com::sun::star::i18n::Boundary nNextWordBoundary(mxBreakIterator->getWordBoundary(rTxt, 0, rLocale, ::com::sun::star::i18n::WordType::ANY_WORD, sal_True)); - sal_Int32 nNextSentenceBreak(mxBreakIterator->endOfSentence(rTxt, 0, rLocale)); + sal_Int32 nNextCellBreak(mxBreakIterator->nextCharacters(rTxt, nTextPosition, rLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, 0, nDone)); + ::com::sun::star::i18n::Boundary nNextWordBoundary(mxBreakIterator->getWordBoundary(rTxt, nTextPosition, rLocale, ::com::sun::star::i18n::WordType::ANY_WORD, sal_True)); + sal_Int32 nNextSentenceBreak(mxBreakIterator->endOfSentence(rTxt, nTextPosition, rLocale)); static const ByteString aCommentStringA("XTEXT_EOC"); static const ByteString aCommentStringB("XTEXT_EOW"); static const ByteString aCommentStringC("XTEXT_EOS"); - for(sal_Int32 i(0); i < nTextLength; i++) + for(sal_Int32 i(nTextPosition); i < nTextPosition + nTextLength; i++) { // create the entries for the respective break positions if(i == nNextCellBreak) { - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringA, i)); + mrMetaFile.AddAction(new MetaCommentAction(aCommentStringA, i - nTextPosition)); nNextCellBreak = mxBreakIterator->nextCharacters(rTxt, i, rLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, 1, nDone); } if(i == nNextWordBoundary.endPos) { - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringB, i)); + mrMetaFile.AddAction(new MetaCommentAction(aCommentStringB, i - nTextPosition)); nNextWordBoundary = mxBreakIterator->getWordBoundary(rTxt, i + 1, rLocale, ::com::sun::star::i18n::WordType::ANY_WORD, sal_True); } if(i == nNextSentenceBreak) { - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringC, i)); + mrMetaFile.AddAction(new MetaCommentAction(aCommentStringC, i - nTextPosition)); nNextSentenceBreak = mxBreakIterator->endOfSentence(rTxt, i + 1, rLocale); } } diff --git a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs index 23127636c0ee..6cf3a7abdc68 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs @@ -427,7 +427,7 @@ Indicates whether the object creation and modification will be visualized using the full object attribute set or wireframe. - false + true