diff options
Diffstat (limited to 'sdext/source/presenter/PresenterTextView.cxx')
-rw-r--r-- | sdext/source/presenter/PresenterTextView.cxx | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx index b30e441727c7..5bfbfd7d77d0 100644 --- a/sdext/source/presenter/PresenterTextView.cxx +++ b/sdext/source/presenter/PresenterTextView.cxx @@ -116,54 +116,6 @@ PresenterTextView::PresenterTextView ( UNO_QUERY_THROW); } - - - -PresenterTextView::PresenterTextView ( - const Reference<XComponentContext>& rxContext, - const Reference<rendering::XCanvas>& rxCanvas) - : mxCanvas(rxCanvas), - mbDoOuput(false), - mxBreakIterator(), - mxScriptTypeDetector(), - maLocation(0,0), - maSize(0,0), - mpFont(), - maParagraphs(), - mpCaret(new PresenterTextCaret( - ::boost::bind(&PresenterTextView::GetCaretBounds, this, _1, _2), - ::boost::function<void(const css::awt::Rectangle&)>())), - mnLeftOffset(0), - mnTopOffset(0), - maInvalidator(), - mbIsFormatPending(false), - mnCharacterCount(-1), - maTextChangeBroadcaster() -{ - Reference<lang::XMultiComponentFactory> xFactory ( - rxContext->getServiceManager(), UNO_QUERY); - if ( ! xFactory.is()) - return; - - // Create the break iterator that we use to break text into lines. - mxBreakIterator = Reference<i18n::XBreakIterator>( - xFactory->createInstanceWithContext( - A2S("com.sun.star.i18n.BreakIterator"), - rxContext), - UNO_QUERY_THROW); - - // Create the script type detector that is used to split paragraphs into - // portions of the same text direction. - mxScriptTypeDetector = Reference<i18n::XScriptTypeDetector>( - xFactory->createInstanceWithContext( - A2S("com.sun.star.i18n.ScriptTypeDetector"), - rxContext), - UNO_QUERY_THROW); -} - - - - void PresenterTextView::SetText (const Reference<text::XText>& rxText) { maParagraphs.clear(); @@ -202,48 +154,12 @@ void PresenterTextView::SetText (const Reference<text::XText>& rxText) RequestFormat(); } - - - -void PresenterTextView::SetText (const ::rtl::OUString& rsText) -{ - maParagraphs.clear(); - mnCharacterCount = -1; - - if ( ! mpFont || ! mpFont->PrepareFont(mxCanvas)) - return; - - sal_Int32 nCharacterCount (0); - - SharedPresenterTextParagraph pParagraph (new PresenterTextParagraph( - 0, - mxBreakIterator, - mxScriptTypeDetector, - rsText, - mpCaret)); - pParagraph->SetupCellArray(mpFont); - pParagraph->SetCharacterOffset(nCharacterCount); - nCharacterCount += pParagraph->GetCharacterCount(); - maParagraphs.push_back(pParagraph); - - if (mpCaret) - mpCaret->HideCaret(); - - RequestFormat(); -} - - - - void PresenterTextView::SetTextChangeBroadcaster ( const ::boost::function<void(void)>& rBroadcaster) { maTextChangeBroadcaster = rBroadcaster; } - - - void PresenterTextView::SetLocation (const css::geometry::RealPoint2D& rLocation) { maLocation = rLocation; @@ -260,18 +176,12 @@ void PresenterTextView::SetLocation (const css::geometry::RealPoint2D& rLocation } } - - - void PresenterTextView::SetSize (const css::geometry::RealSize2D& rSize) { maSize = rSize; RequestFormat(); } - - - double PresenterTextView::GetTotalTextHeight (void) { double nTotalHeight (0); @@ -295,18 +205,12 @@ double PresenterTextView::GetTotalTextHeight (void) return nTotalHeight; } - - - void PresenterTextView::SetFont (const PresenterTheme::SharedFontDescriptor& rpFont) { mpFont = rpFont; RequestFormat(); } - - - void PresenterTextView::SetOffset( const double nLeft, const double nTop) @@ -318,8 +222,6 @@ void PresenterTextView::SetOffset( SetLocation(maLocation); } - - void PresenterTextView::MoveCaret ( const sal_Int32 nDistance, const sal_Int16 nTextType) @@ -402,9 +304,6 @@ void PresenterTextView::MoveCaret ( mpCaret->SetPosition(nParagraphIndex, nCharacterIndex); } - - - void PresenterTextView::Paint ( const css::awt::Rectangle& rUpdateBox) { |