bump product version to 6.3.0.0.beta1
[LibreOffice.git] / sdext / source / presenter / PresenterHelpView.cxx
blob03df1dcd379779074f6e30fcff0500a0e6f91cf5
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #include <vcl/svapp.hxx>
20 #include <vcl/settings.hxx>
21 #include "PresenterHelpView.hxx"
22 #include "PresenterButton.hxx"
23 #include "PresenterCanvasHelper.hxx"
24 #include "PresenterGeometryHelper.hxx"
25 #include "PresenterHelper.hxx"
26 #include "PresenterWindowManager.hxx"
27 #include <com/sun/star/awt/XWindowPeer.hpp>
28 #include <com/sun/star/container/XNameAccess.hpp>
29 #include <com/sun/star/drawing/framework/XConfigurationController.hpp>
30 #include <com/sun/star/drawing/framework/XControllerManager.hpp>
31 #include <com/sun/star/rendering/CompositeOperation.hpp>
32 #include <com/sun/star/rendering/TextDirection.hpp>
33 #include <com/sun/star/util/Color.hpp>
34 #include <algorithm>
35 #include <numeric>
36 #include <vector>
38 using namespace ::com::sun::star;
39 using namespace ::com::sun::star::uno;
40 using namespace ::com::sun::star::drawing::framework;
41 using ::std::vector;
43 namespace sdext { namespace presenter {
45 namespace {
46 const static sal_Int32 gnHorizontalGap (20);
47 const static sal_Int32 gnVerticalBorder (30);
48 const static sal_Int32 gnVerticalButtonPadding (12);
50 class LineDescriptor
52 public:
53 LineDescriptor();
54 void AddPart (
55 const OUString& rsLine,
56 const css::uno::Reference<css::rendering::XCanvasFont>& rxFont);
57 bool IsEmpty() const;
59 OUString msLine;
60 geometry::RealSize2D maSize;
61 double mnVerticalOffset;
63 void CalculateSize (const css::uno::Reference<css::rendering::XCanvasFont>& rxFont);
66 class LineDescriptorList
68 public:
69 LineDescriptorList (
70 const OUString& rsText,
71 const css::uno::Reference<css::rendering::XCanvasFont>& rxFont,
72 const sal_Int32 nMaximalWidth);
74 void Update (
75 const css::uno::Reference<css::rendering::XCanvasFont>& rxFont,
76 const sal_Int32 nMaximalWidth);
78 double Paint(
79 const Reference<rendering::XCanvas>& rxCanvas,
80 const geometry::RealRectangle2D& rBBox,
81 const bool bFlushLeft,
82 const rendering::ViewState& rViewState,
83 rendering::RenderState& rRenderState,
84 const css::uno::Reference<css::rendering::XCanvasFont>& rxFont) const;
85 double GetHeight() const;
87 private:
88 const OUString msText;
89 std::shared_ptr<vector<LineDescriptor> > mpLineDescriptors;
91 static void SplitText (const OUString& rsText, vector<OUString>& rTextParts);
92 void FormatText (
93 const vector<OUString>& rTextParts,
94 const css::uno::Reference<css::rendering::XCanvasFont>& rxFont,
95 const sal_Int32 nMaximalWidth);
98 class Block
100 public:
101 Block (
102 const OUString& rsLeftText,
103 const OUString& rsRightText,
104 const css::uno::Reference<css::rendering::XCanvasFont>& rxFont,
105 const sal_Int32 nMaximalWidth);
106 Block(const Block&) = delete;
107 Block& operator=(const Block&) = delete;
108 void Update (
109 const css::uno::Reference<css::rendering::XCanvasFont>& rxFont,
110 const sal_Int32 nMaximalWidth);
112 LineDescriptorList maLeft;
113 LineDescriptorList maRight;
115 } // end of anonymous namespace
117 class PresenterHelpView::TextContainer : public vector<std::shared_ptr<Block> >
121 PresenterHelpView::PresenterHelpView (
122 const Reference<uno::XComponentContext>& rxContext,
123 const Reference<XResourceId>& rxViewId,
124 const Reference<frame::XController>& rxController,
125 const ::rtl::Reference<PresenterController>& rpPresenterController)
126 : PresenterHelpViewInterfaceBase(m_aMutex),
127 mxComponentContext(rxContext),
128 mxViewId(rxViewId),
129 mxPane(),
130 mxWindow(),
131 mxCanvas(),
132 mpPresenterController(rpPresenterController),
133 mpFont(),
134 mpTextContainer(),
135 mpCloseButton(),
136 mnSeparatorY(0),
137 mnMaximalWidth(0)
141 // Get the content window via the pane anchor.
142 Reference<XControllerManager> xCM (rxController, UNO_QUERY_THROW);
143 Reference<XConfigurationController> xCC (
144 xCM->getConfigurationController(), UNO_SET_THROW);
145 mxPane.set(xCC->getResource(rxViewId->getAnchor()), UNO_QUERY_THROW);
147 mxWindow = mxPane->getWindow();
148 ProvideCanvas();
150 mxWindow->addWindowListener(this);
151 mxWindow->addPaintListener(this);
152 Reference<awt::XWindowPeer> xPeer (mxWindow, UNO_QUERY);
153 if (xPeer.is())
154 xPeer->setBackground(util::Color(0xff000000));
155 mxWindow->setVisible(true);
157 if (mpPresenterController.is())
159 mpFont = mpPresenterController->GetViewFont(mxViewId->getResourceURL());
160 if (mpFont.get() != nullptr)
162 mpFont->PrepareFont(mxCanvas);
166 // Create the close button.
167 mpCloseButton = PresenterButton::Create(
168 mxComponentContext,
169 mpPresenterController,
170 mpPresenterController->GetTheme(),
171 mxWindow,
172 mxCanvas,
173 "HelpViewCloser");
175 ReadHelpStrings();
176 Resize();
178 catch (RuntimeException&)
180 mxViewId = nullptr;
181 mxWindow = nullptr;
182 throw;
186 PresenterHelpView::~PresenterHelpView()
190 void SAL_CALL PresenterHelpView::disposing()
192 mxViewId = nullptr;
194 if (mpCloseButton.is())
196 Reference<lang::XComponent> xComponent (
197 static_cast<XWeak*>(mpCloseButton.get()), UNO_QUERY);
198 mpCloseButton = nullptr;
199 if (xComponent.is())
200 xComponent->dispose();
203 if (mxWindow.is())
205 mxWindow->removeWindowListener(this);
206 mxWindow->removePaintListener(this);
210 //----- lang::XEventListener --------------------------------------------------
212 void SAL_CALL PresenterHelpView::disposing (const lang::EventObject& rEventObject)
214 if (rEventObject.Source == mxCanvas)
216 mxCanvas = nullptr;
218 else if (rEventObject.Source == mxWindow)
220 mxWindow = nullptr;
221 dispose();
225 //----- XWindowListener -------------------------------------------------------
227 void SAL_CALL PresenterHelpView::windowResized (const awt::WindowEvent&)
229 ThrowIfDisposed();
230 Resize();
233 void SAL_CALL PresenterHelpView::windowMoved (const awt::WindowEvent&)
235 ThrowIfDisposed();
238 void SAL_CALL PresenterHelpView::windowShown (const lang::EventObject&)
240 ThrowIfDisposed();
241 Resize();
244 void SAL_CALL PresenterHelpView::windowHidden (const lang::EventObject&)
246 ThrowIfDisposed();
249 //----- XPaintListener --------------------------------------------------------
251 void SAL_CALL PresenterHelpView::windowPaint (const css::awt::PaintEvent& rEvent)
253 Paint(rEvent.UpdateRect);
256 void PresenterHelpView::Paint (const awt::Rectangle& rUpdateBox)
258 ProvideCanvas();
259 if ( ! mxCanvas.is())
260 return;
262 // Clear background.
263 const awt::Rectangle aWindowBox (mxWindow->getPosSize());
264 mpPresenterController->GetCanvasHelper()->Paint(
265 mpPresenterController->GetViewBackground(mxViewId->getResourceURL()),
266 Reference<rendering::XCanvas>(mxCanvas, UNO_QUERY),
267 rUpdateBox,
268 awt::Rectangle(0,0,aWindowBox.Width,aWindowBox.Height),
269 awt::Rectangle());
271 // Paint vertical divider.
273 rendering::ViewState aViewState(
274 geometry::AffineMatrix2D(1,0,0, 0,1,0),
275 PresenterGeometryHelper::CreatePolygon(rUpdateBox, mxCanvas->getDevice()));
277 rendering::RenderState aRenderState (
278 geometry::AffineMatrix2D(1,0,0, 0,1,0),
279 nullptr,
280 Sequence<double>(4),
281 rendering::CompositeOperation::SOURCE);
282 PresenterCanvasHelper::SetDeviceColor(aRenderState, mpFont->mnColor);
284 mxCanvas->drawLine(
285 geometry::RealPoint2D((aWindowBox.Width/2.0), gnVerticalBorder),
286 geometry::RealPoint2D((aWindowBox.Width/2.0), mnSeparatorY - gnVerticalBorder),
287 aViewState,
288 aRenderState);
290 // Paint the horizontal separator.
291 mxCanvas->drawLine(
292 geometry::RealPoint2D(0, mnSeparatorY),
293 geometry::RealPoint2D(aWindowBox.Width, mnSeparatorY),
294 aViewState,
295 aRenderState);
297 // Paint text.
298 double nY (gnVerticalBorder);
299 for (const auto& rxBlock : *mpTextContainer)
301 sal_Int32 LeftX1 = gnHorizontalGap;
302 sal_Int32 LeftX2 = aWindowBox.Width/2 - gnHorizontalGap;
303 sal_Int32 RightX1 = aWindowBox.Width/2 + gnHorizontalGap;
304 sal_Int32 RightX2 = aWindowBox.Width - gnHorizontalGap;
305 /* check whether RTL interface or not
306 then replace the windowbox position */
307 if(AllSettings::GetLayoutRTL())
309 LeftX1 = aWindowBox.Width/2 + gnHorizontalGap;
310 LeftX2 = aWindowBox.Width - gnHorizontalGap;
311 RightX1 = gnHorizontalGap;
312 RightX2 = aWindowBox.Width/2 - gnHorizontalGap;
314 const double nLeftHeight (
315 rxBlock->maLeft.Paint(mxCanvas,
316 geometry::RealRectangle2D(
317 LeftX1,
319 LeftX2,
320 aWindowBox.Height - gnVerticalBorder),
321 false,
322 aViewState,
323 aRenderState,
324 mpFont->mxFont));
325 const double nRightHeight (
326 rxBlock->maRight.Paint(mxCanvas,
327 geometry::RealRectangle2D(
328 RightX1,
330 RightX2,
331 aWindowBox.Height - gnVerticalBorder),
332 true,
333 aViewState,
334 aRenderState,
335 mpFont->mxFont));
337 nY += ::std::max(nLeftHeight,nRightHeight);
340 Reference<rendering::XSpriteCanvas> xSpriteCanvas (mxCanvas, UNO_QUERY);
341 if (xSpriteCanvas.is())
342 xSpriteCanvas->updateScreen(false);
345 void PresenterHelpView::ReadHelpStrings()
347 mpTextContainer.reset(new TextContainer);
348 PresenterConfigurationAccess aConfiguration (
349 mxComponentContext,
350 "/org.openoffice.Office.PresenterScreen/",
351 PresenterConfigurationAccess::READ_ONLY);
352 Reference<container::XNameAccess> xStrings (
353 aConfiguration.GetConfigurationNode("PresenterScreenSettings/HelpView/HelpStrings"),
354 UNO_QUERY);
355 PresenterConfigurationAccess::ForAll(
356 xStrings,
357 [this](OUString const&, uno::Reference<beans::XPropertySet> const& xProps)
359 return this->ProcessString(xProps);
363 void PresenterHelpView::ProcessString (
364 const Reference<beans::XPropertySet>& rsProperties)
366 if ( ! rsProperties.is())
367 return;
369 OUString sLeftText;
370 PresenterConfigurationAccess::GetProperty(rsProperties, "Left") >>= sLeftText;
371 OUString sRightText;
372 PresenterConfigurationAccess::GetProperty(rsProperties, "Right") >>= sRightText;
373 mpTextContainer->push_back(
374 std::make_shared<Block>(
375 sLeftText, sRightText, mpFont->mxFont, mnMaximalWidth));
378 void PresenterHelpView::CheckFontSize()
380 if (mpFont.get() == nullptr)
381 return;
383 sal_Int32 nBestSize (6);
385 // Scaling down and then reformatting can cause the text to be too large
386 // still. So do this again and again until the text size is
387 // small enough. Restrict the number of loops.
388 for (int nLoopCount=0; nLoopCount<5; ++nLoopCount)
390 double nY = std::accumulate(mpTextContainer->begin(), mpTextContainer->end(), double(0),
391 [](const double& sum, const std::shared_ptr<Block>& rxBlock) {
392 return sum + std::max(
393 rxBlock->maLeft.GetHeight(),
394 rxBlock->maRight.GetHeight());
397 const double nHeightDifference (nY - (mnSeparatorY-gnVerticalBorder));
398 if (nHeightDifference <= 0 && nHeightDifference > -50)
400 // We have found a good font size that is large and leaves not
401 // too much space below the help text.
402 return;
405 // Use a simple linear transformation to calculate initial guess of
406 // a size that lets all help text be shown inside the window.
407 const double nScale (double(mnSeparatorY-gnVerticalBorder) / nY);
408 if (nScale > 1.0 && nScale < 1.05)
409 break;
411 sal_Int32 nFontSizeGuess (sal_Int32(mpFont->mnSize * nScale));
412 if (nHeightDifference<=0 && mpFont->mnSize>nBestSize)
413 nBestSize = mpFont->mnSize;
414 mpFont->mnSize = nFontSizeGuess;
415 mpFont->mxFont = nullptr;
416 mpFont->PrepareFont(mxCanvas);
418 // Reformat blocks.
419 for (auto& rxBlock : *mpTextContainer)
420 rxBlock->Update(mpFont->mxFont, mnMaximalWidth);
423 if (nBestSize != mpFont->mnSize)
425 mpFont->mnSize = nBestSize;
426 mpFont->mxFont = nullptr;
427 mpFont->PrepareFont(mxCanvas);
429 // Reformat blocks.
430 for (auto& rxBlock : *mpTextContainer)
432 rxBlock->Update(mpFont->mxFont, mnMaximalWidth);
437 //----- XResourceId -----------------------------------------------------------
439 Reference<XResourceId> SAL_CALL PresenterHelpView::getResourceId()
441 ThrowIfDisposed();
442 return mxViewId;
445 sal_Bool SAL_CALL PresenterHelpView::isAnchorOnly()
447 return false;
451 void PresenterHelpView::ProvideCanvas()
453 if ( ! mxCanvas.is() && mxPane.is())
455 mxCanvas = mxPane->getCanvas();
456 if ( ! mxCanvas.is())
457 return;
458 Reference<lang::XComponent> xComponent (mxCanvas, UNO_QUERY);
459 if (xComponent.is())
460 xComponent->addEventListener(static_cast<awt::XPaintListener*>(this));
462 if (mpCloseButton.is())
463 mpCloseButton->SetCanvas(mxCanvas, mxWindow);
467 void PresenterHelpView::Resize()
469 if (!(mpCloseButton.get() != nullptr && mxWindow.is()))
470 return;
472 const awt::Rectangle aWindowBox (mxWindow->getPosSize());
473 mnMaximalWidth = (mxWindow->getPosSize().Width - 4*gnHorizontalGap) / 2;
475 // Place vertical separator.
476 mnSeparatorY = aWindowBox.Height
477 - mpCloseButton->GetSize().Height - gnVerticalButtonPadding;
479 mpCloseButton->SetCenter(geometry::RealPoint2D(
480 aWindowBox.Width/2.0,
481 aWindowBox.Height - mpCloseButton->GetSize().Height/2.0));
483 CheckFontSize();
486 void PresenterHelpView::ThrowIfDisposed()
488 if (rBHelper.bDisposed || rBHelper.bInDispose)
490 throw lang::DisposedException (
491 "PresenterHelpView has been already disposed",
492 static_cast<uno::XWeak*>(this));
496 //===== LineDescriptor =========================================================
498 namespace {
500 LineDescriptor::LineDescriptor()
501 : msLine(),
502 maSize(0,0),
503 mnVerticalOffset(0)
507 void LineDescriptor::AddPart (
508 const OUString& rsLine,
509 const css::uno::Reference<css::rendering::XCanvasFont>& rxFont)
511 msLine += rsLine;
513 CalculateSize(rxFont);
516 bool LineDescriptor::IsEmpty() const
518 return msLine.isEmpty();
521 void LineDescriptor::CalculateSize (
522 const css::uno::Reference<css::rendering::XCanvasFont>& rxFont)
524 OSL_ASSERT(rxFont.is());
526 rendering::StringContext aContext (msLine, 0, msLine.getLength());
527 Reference<rendering::XTextLayout> xLayout (
528 rxFont->createTextLayout(aContext, rendering::TextDirection::WEAK_LEFT_TO_RIGHT, 0));
529 const geometry::RealRectangle2D aTextBBox (xLayout->queryTextBounds());
530 maSize = css::geometry::RealSize2D(aTextBBox.X2 - aTextBBox.X1, aTextBBox.Y2 - aTextBBox.Y1);
531 mnVerticalOffset = aTextBBox.Y2;
534 } // end of anonymous namespace
536 //===== LineDescriptorList ====================================================
538 namespace {
540 LineDescriptorList::LineDescriptorList (
541 const OUString& rsText,
542 const css::uno::Reference<css::rendering::XCanvasFont>& rxFont,
543 const sal_Int32 nMaximalWidth)
544 : msText(rsText)
546 Update(rxFont, nMaximalWidth);
549 double LineDescriptorList::Paint(
550 const Reference<rendering::XCanvas>& rxCanvas,
551 const geometry::RealRectangle2D& rBBox,
552 const bool bFlushLeft,
553 const rendering::ViewState& rViewState,
554 rendering::RenderState& rRenderState,
555 const css::uno::Reference<css::rendering::XCanvasFont>& rxFont) const
557 if ( ! rxCanvas.is())
558 return 0;
560 double nY (rBBox.Y1);
561 for (const auto& rLine : *mpLineDescriptors)
563 double nX;
564 /// check whether RTL interface or not
565 if(!AllSettings::GetLayoutRTL())
567 nX = rBBox.X1;
568 if ( ! bFlushLeft)
569 nX = rBBox.X2 - rLine.maSize.Width;
571 else
573 nX=rBBox.X2 - rLine.maSize.Width;
574 if ( ! bFlushLeft)
575 nX = rBBox.X1;
577 rRenderState.AffineTransform.m02 = nX;
578 rRenderState.AffineTransform.m12 = nY + rLine.maSize.Height - rLine.mnVerticalOffset;
580 const rendering::StringContext aContext (rLine.msLine, 0, rLine.msLine.getLength());
581 Reference<rendering::XTextLayout> xLayout (
582 rxFont->createTextLayout(aContext, rendering::TextDirection::WEAK_LEFT_TO_RIGHT, 0));
583 rxCanvas->drawTextLayout (
584 xLayout,
585 rViewState,
586 rRenderState);
588 nY += rLine.maSize.Height * 1.2;
591 return nY - rBBox.Y1;
594 double LineDescriptorList::GetHeight() const
596 return std::accumulate(mpLineDescriptors->begin(), mpLineDescriptors->end(), double(0),
597 [](const double& nHeight, const LineDescriptor& rLine) {
598 return nHeight + rLine.maSize.Height * 1.2;
602 void LineDescriptorList::Update (
603 const css::uno::Reference<css::rendering::XCanvasFont>& rxFont,
604 const sal_Int32 nMaximalWidth)
606 vector<OUString> aTextParts;
607 SplitText(msText, aTextParts);
608 FormatText(aTextParts, rxFont, nMaximalWidth);
611 void LineDescriptorList::SplitText (
612 const OUString& rsText,
613 vector<OUString>& rTextParts)
615 const sal_Char cQuote ('\'');
616 const sal_Char cSeparator (',');
618 sal_Int32 nIndex (0);
619 sal_Int32 nStart (0);
620 sal_Int32 nLength (rsText.getLength());
621 bool bIsQuoted (false);
622 while (nIndex < nLength)
624 const sal_Int32 nQuoteIndex (rsText.indexOf(cQuote, nIndex));
625 const sal_Int32 nSeparatorIndex (rsText.indexOf(cSeparator, nIndex));
626 if (nQuoteIndex>=0 && (nSeparatorIndex==-1 || nQuoteIndex<nSeparatorIndex))
628 bIsQuoted = !bIsQuoted;
629 nIndex = nQuoteIndex+1;
630 continue;
633 const sal_Int32 nNextIndex = nSeparatorIndex;
634 if (nNextIndex < 0)
636 break;
638 else if ( ! bIsQuoted)
640 rTextParts.push_back(rsText.copy(nStart, nNextIndex-nStart));
641 nStart = nNextIndex + 1;
643 nIndex = nNextIndex+1;
645 if (nStart < nLength)
646 rTextParts.push_back(rsText.copy(nStart, nLength-nStart));
649 void LineDescriptorList::FormatText (
650 const vector<OUString>& rTextParts,
651 const css::uno::Reference<css::rendering::XCanvasFont>& rxFont,
652 const sal_Int32 nMaximalWidth)
654 LineDescriptor aLineDescriptor;
656 mpLineDescriptors.reset(new vector<LineDescriptor>);
658 vector<OUString>::const_iterator iPart (rTextParts.begin());
659 vector<OUString>::const_iterator iEnd (rTextParts.end());
660 while (iPart!=iEnd)
662 if (aLineDescriptor.IsEmpty())
664 // Avoid empty lines.
665 if (PresenterCanvasHelper::GetTextSize(
666 rxFont, *iPart).Width > nMaximalWidth)
668 const sal_Char cSpace (' ');
670 sal_Int32 nIndex (0);
671 sal_Int32 nStart (0);
672 sal_Int32 nLength (iPart->getLength());
673 while (nIndex < nLength)
675 sal_Int32 nSpaceIndex (iPart->indexOf(cSpace, nIndex));
676 while (nSpaceIndex >= 0 && PresenterCanvasHelper::GetTextSize(
677 rxFont, iPart->copy(nStart, nSpaceIndex-nStart)).Width <= nMaximalWidth)
679 nIndex = nSpaceIndex;
680 nSpaceIndex = iPart->indexOf(cSpace, nIndex+1);
683 if (nSpaceIndex < 0 && PresenterCanvasHelper::GetTextSize(
684 rxFont, iPart->copy(nStart, nLength-nStart)).Width <= nMaximalWidth)
686 nIndex = nLength;
689 if (nIndex == nStart)
691 nIndex = nLength;
694 aLineDescriptor.AddPart(iPart->copy(nStart, nIndex-nStart), rxFont);
695 if (nIndex != nLength)
697 mpLineDescriptors->push_back(aLineDescriptor);
698 aLineDescriptor = LineDescriptor();
700 nStart = nIndex;
703 else
705 aLineDescriptor.AddPart(*iPart, rxFont);
708 else if (PresenterCanvasHelper::GetTextSize(
709 rxFont, aLineDescriptor.msLine+", "+*iPart).Width > nMaximalWidth)
711 aLineDescriptor.AddPart(",", rxFont);
712 mpLineDescriptors->push_back(aLineDescriptor);
713 aLineDescriptor = LineDescriptor();
714 continue;
716 else
718 aLineDescriptor.AddPart(", "+*iPart, rxFont);
720 ++iPart;
722 if ( ! aLineDescriptor.IsEmpty())
724 mpLineDescriptors->push_back(aLineDescriptor);
728 } // end of anonymous namespace
730 //===== Block =================================================================
732 namespace {
734 Block::Block (
735 const OUString& rsLeftText,
736 const OUString& rsRightText,
737 const css::uno::Reference<css::rendering::XCanvasFont>& rxFont,
738 const sal_Int32 nMaximalWidth)
739 : maLeft(rsLeftText, rxFont, nMaximalWidth),
740 maRight(rsRightText, rxFont, nMaximalWidth)
744 void Block::Update (
745 const css::uno::Reference<css::rendering::XCanvasFont>& rxFont,
746 const sal_Int32 nMaximalWidth)
748 maLeft.Update(rxFont, nMaximalWidth);
749 maRight.Update(rxFont, nMaximalWidth);
752 } // end of anonymous namespace
754 } } // end of namespace ::sdext::presenter
756 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */