fdo#42070-Fix RTL support in presenter console
Problems that still exist: 1-Help layout. 2-Slide sorter view (slides alignment). 3-Note view buttons. 4-Scroll bars. Change-Id: Ie78519358d2f6d847692ee870ecdc1790c5244e6 Reviewed-on: https://gerrit.libreoffice.org/1053 Tested-by: Lior Kaplan <kaplanlior@gmail.com> Reviewed-by: Andras Timar <atimar@suse.com> Tested-by: Andras Timar <atimar@suse.com>
This commit is contained in:
committed by
Andras Timar
parent
4012983def
commit
5e5c11c664
@@ -39,6 +39,7 @@ $(eval $(call gb_Library_use_libraries,PresenterScreen,\
|
|||||||
cppu \
|
cppu \
|
||||||
cppuhelper \
|
cppuhelper \
|
||||||
sal \
|
sal \
|
||||||
|
vcl \
|
||||||
))
|
))
|
||||||
|
|
||||||
$(eval $(call gb_Library_add_exception_objects,PresenterScreen,\
|
$(eval $(call gb_Library_add_exception_objects,PresenterScreen,\
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "vcl/svapp.hxx"
|
||||||
#include "PresenterButton.hxx"
|
#include "PresenterButton.hxx"
|
||||||
#include "PresenterCanvasHelper.hxx"
|
#include "PresenterCanvasHelper.hxx"
|
||||||
#include "PresenterController.hxx"
|
#include "PresenterController.hxx"
|
||||||
@@ -301,7 +302,6 @@ void SAL_CALL PresenterButton::mousePressed (const css::awt::MouseEvent& rEvent)
|
|||||||
{
|
{
|
||||||
(void)rEvent;
|
(void)rEvent;
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
|
|
||||||
meState = PresenterBitmapDescriptor::ButtonDown;
|
meState = PresenterBitmapDescriptor::ButtonDown;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -413,6 +413,9 @@ void PresenterButton::RenderButton (
|
|||||||
rendering::RenderState aRenderState (geometry::AffineMatrix2D(1,0,0, 0,1,0), NULL,
|
rendering::RenderState aRenderState (geometry::AffineMatrix2D(1,0,0, 0,1,0), NULL,
|
||||||
Sequence<double>(4), rendering::CompositeOperation::SOURCE);
|
Sequence<double>(4), rendering::CompositeOperation::SOURCE);
|
||||||
PresenterCanvasHelper::SetDeviceColor(aRenderState, rpFont->mnColor);
|
PresenterCanvasHelper::SetDeviceColor(aRenderState, rpFont->mnColor);
|
||||||
|
/// this is responsible of the close button
|
||||||
|
/// check whether RTL interface or not
|
||||||
|
if(!Application::GetSettings().GetLayoutRTL()){
|
||||||
aRenderState.AffineTransform.m02 = (rSize.Width - aTextBBox.X2 + aTextBBox.X1)/2;
|
aRenderState.AffineTransform.m02 = (rSize.Width - aTextBBox.X2 + aTextBBox.X1)/2;
|
||||||
aRenderState.AffineTransform.m12 = (rSize.Height - aTextBBox.Y2 + aTextBBox.Y1)/2 - aTextBBox.Y1;
|
aRenderState.AffineTransform.m12 = (rSize.Height - aTextBBox.Y2 + aTextBBox.Y1)/2 - aTextBBox.Y1;
|
||||||
|
|
||||||
@@ -422,6 +425,17 @@ void PresenterButton::RenderButton (
|
|||||||
rendering::ViewState(geometry::AffineMatrix2D(1,0,0, 0,1,0), NULL),
|
rendering::ViewState(geometry::AffineMatrix2D(1,0,0, 0,1,0), NULL),
|
||||||
aRenderState,
|
aRenderState,
|
||||||
rendering::TextDirection::WEAK_LEFT_TO_RIGHT);
|
rendering::TextDirection::WEAK_LEFT_TO_RIGHT);
|
||||||
|
}else{
|
||||||
|
aRenderState.AffineTransform.m02 = (rSize.Width + aTextBBox.X2 - aTextBBox.X1)/2;
|
||||||
|
aRenderState.AffineTransform.m12 = (rSize.Height - aTextBBox.Y2 + aTextBBox.Y1)/2 - aTextBBox.Y1;
|
||||||
|
|
||||||
|
rxCanvas->drawText(
|
||||||
|
aContext,
|
||||||
|
rpFont->mxFont,
|
||||||
|
rendering::ViewState(geometry::AffineMatrix2D(1,0,0, 0,1,0), NULL),
|
||||||
|
aRenderState,
|
||||||
|
rendering::TextDirection::WEAK_RIGHT_TO_LEFT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PresenterButton::Invalidate (void)
|
void PresenterButton::Invalidate (void)
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "vcl/svapp.hxx"
|
||||||
#include "PresenterPaneBorderPainter.hxx"
|
#include "PresenterPaneBorderPainter.hxx"
|
||||||
#include "PresenterCanvasHelper.hxx"
|
#include "PresenterCanvasHelper.hxx"
|
||||||
#include "PresenterConfigurationAccess.hxx"
|
#include "PresenterConfigurationAccess.hxx"
|
||||||
@@ -536,9 +537,12 @@ void PresenterPaneBorderPainter::Renderer::PaintTitle (
|
|||||||
if ( ! xLayout.is())
|
if ( ! xLayout.is())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/// this is responsible of the texts above the slide windows
|
||||||
|
/// check whether RTL interface or not
|
||||||
|
if(!Application::GetSettings().GetLayoutRTL()){
|
||||||
geometry::RealRectangle2D aBox (xLayout->queryTextBounds());
|
geometry::RealRectangle2D aBox (xLayout->queryTextBounds());
|
||||||
const double nTextHeight = aBox.Y2 - aBox.Y1;
|
const double nTextHeight = aBox.Y2 - aBox.Y1;
|
||||||
const double nTextWidth = aBox.X2 - aBox.X1;
|
const double nTextWidth = aBox.X1 + aBox.X2;
|
||||||
double nX = rInnerBox.X + (rInnerBox.Width - nTextWidth)/2;
|
double nX = rInnerBox.X + (rInnerBox.Width - nTextWidth)/2;
|
||||||
const sal_Int32 nTitleBarHeight = rInnerBox.Y - rOuterBox.Y - 1;
|
const sal_Int32 nTitleBarHeight = rInnerBox.Y - rOuterBox.Y - 1;
|
||||||
double nY = rOuterBox.Y + (nTitleBarHeight - nTextHeight) / 2 - aBox.Y1;
|
double nY = rOuterBox.Y + (nTitleBarHeight - nTextHeight) / 2 - aBox.Y1;
|
||||||
@@ -606,6 +610,78 @@ void PresenterPaneBorderPainter::Renderer::PaintTitle (
|
|||||||
rendering::TextDirection::WEAK_LEFT_TO_RIGHT);
|
rendering::TextDirection::WEAK_LEFT_TO_RIGHT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
geometry::RealRectangle2D aBox (xLayout->queryTextBounds());
|
||||||
|
const double nTextHeight = aBox.Y2 - aBox.Y1;
|
||||||
|
const double nTextWidth = aBox.X1 - aBox.X2;
|
||||||
|
double nX = rInnerBox.X + (rInnerBox.Width - nTextWidth)/2;
|
||||||
|
const sal_Int32 nTitleBarHeight = rInnerBox.Y - rOuterBox.Y - 1;
|
||||||
|
double nY = rOuterBox.Y + (nTitleBarHeight - nTextHeight) / 2 - aBox.Y1;
|
||||||
|
if (nY >= rInnerBox.Y)
|
||||||
|
nY = rInnerBox.Y - 1;
|
||||||
|
switch (rpStyle->meFontAnchor)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
case RendererPaneStyle::AnchorLeft:
|
||||||
|
nX = rInnerBox.X;
|
||||||
|
break;
|
||||||
|
case RendererPaneStyle::AnchorRight:
|
||||||
|
nX = rInnerBox.X + rInnerBox.Width - nTextWidth;
|
||||||
|
break;
|
||||||
|
case RendererPaneStyle::AnchorCenter:
|
||||||
|
nX = rInnerBox.X + (rInnerBox.Width - nTextWidth)/2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
nX += rpStyle->mnFontXOffset;
|
||||||
|
nY += rpStyle->mnFontYOffset;
|
||||||
|
|
||||||
|
if (rUpdateBox.X >= nX+nTextWidth
|
||||||
|
|| rUpdateBox.Y >= nY+nTextHeight
|
||||||
|
|| rUpdateBox.X+rUpdateBox.Width <= nX
|
||||||
|
|| rUpdateBox.Y+rUpdateBox.Height <= nY)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
rendering::RenderState aRenderState(
|
||||||
|
geometry::AffineMatrix2D(1,0,nX, 0,1,nY),
|
||||||
|
NULL,
|
||||||
|
Sequence<double>(4),
|
||||||
|
rendering::CompositeOperation::SOURCE);
|
||||||
|
|
||||||
|
if (bPaintBackground)
|
||||||
|
{
|
||||||
|
PresenterCanvasHelper::SetDeviceColor(aRenderState, util::Color(0x00ffffff));
|
||||||
|
Sequence<Sequence<geometry::RealPoint2D> > aPolygons(1);
|
||||||
|
aPolygons[0] = Sequence<geometry::RealPoint2D>(4);
|
||||||
|
aPolygons[0][0] = geometry::RealPoint2D(0, -nTextHeight);
|
||||||
|
aPolygons[0][1] = geometry::RealPoint2D(0, 0);
|
||||||
|
aPolygons[0][2] = geometry::RealPoint2D(nTextWidth, 0);
|
||||||
|
aPolygons[0][3] = geometry::RealPoint2D(nTextWidth, -nTextHeight);
|
||||||
|
Reference<rendering::XPolyPolygon2D> xPolygon (
|
||||||
|
mxCanvas->getDevice()->createCompatibleLinePolyPolygon(aPolygons), UNO_QUERY);
|
||||||
|
if (xPolygon.is())
|
||||||
|
xPolygon->setClosed(0, sal_True);
|
||||||
|
mxCanvas->fillPolyPolygon(
|
||||||
|
xPolygon,
|
||||||
|
maViewState,
|
||||||
|
aRenderState);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PresenterCanvasHelper::SetDeviceColor(
|
||||||
|
aRenderState,
|
||||||
|
rpStyle->mpFont->mnColor);
|
||||||
|
|
||||||
|
mxCanvas->drawText(
|
||||||
|
aContext,
|
||||||
|
xFont,
|
||||||
|
maViewState,
|
||||||
|
aRenderState,
|
||||||
|
rendering::TextDirection::WEAK_RIGHT_TO_LEFT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
::boost::shared_ptr<RendererPaneStyle>
|
::boost::shared_ptr<RendererPaneStyle>
|
||||||
PresenterPaneBorderPainter::Renderer::GetRendererPaneStyle (const OUString& rsResourceURL)
|
PresenterPaneBorderPainter::Renderer::GetRendererPaneStyle (const OUString& rsResourceURL)
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "PresenterSlideShowView.hxx"
|
#include "PresenterSlideShowView.hxx"
|
||||||
|
#include "vcl/svapp.hxx"
|
||||||
#include "PresenterCanvasHelper.hxx"
|
#include "PresenterCanvasHelper.hxx"
|
||||||
#include "PresenterGeometryHelper.hxx"
|
#include "PresenterGeometryHelper.hxx"
|
||||||
#include "PresenterHelper.hxx"
|
#include "PresenterHelper.hxx"
|
||||||
@@ -781,6 +781,9 @@ void PresenterSlideShowView::PaintEndSlide (const awt::Rectangle& rRepaintBox)
|
|||||||
if (pFont.get() == NULL)
|
if (pFont.get() == NULL)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/// this is responsible of the " presentation exit " text inside the slide windows
|
||||||
|
/// check whether RTL interface or not
|
||||||
|
if(!Application::GetSettings().GetLayoutRTL()){
|
||||||
PresenterCanvasHelper::SetDeviceColor(aRenderState, util::Color(0x00ffffff));
|
PresenterCanvasHelper::SetDeviceColor(aRenderState, util::Color(0x00ffffff));
|
||||||
aRenderState.AffineTransform.m02 = 20;
|
aRenderState.AffineTransform.m02 = 20;
|
||||||
aRenderState.AffineTransform.m12 = 40;
|
aRenderState.AffineTransform.m12 = 40;
|
||||||
@@ -794,6 +797,21 @@ void PresenterSlideShowView::PaintEndSlide (const awt::Rectangle& rRepaintBox)
|
|||||||
aRenderState,
|
aRenderState,
|
||||||
rendering::TextDirection::WEAK_LEFT_TO_RIGHT);
|
rendering::TextDirection::WEAK_LEFT_TO_RIGHT);
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
PresenterCanvasHelper::SetDeviceColor(aRenderState, util::Color(0x00ffffff));
|
||||||
|
aRenderState.AffineTransform.m02 = rRepaintBox.Width-20;
|
||||||
|
aRenderState.AffineTransform.m12 = 40;
|
||||||
|
const rendering::StringContext aContext (
|
||||||
|
msClickToExitPresentationText, 0, msClickToExitPresentationText.getLength());
|
||||||
|
pFont->PrepareFont(mxCanvas);
|
||||||
|
mxCanvas->drawText(
|
||||||
|
aContext,
|
||||||
|
pFont->mxFont,
|
||||||
|
aViewState,
|
||||||
|
aRenderState,
|
||||||
|
rendering::TextDirection::WEAK_RIGHT_TO_LEFT);
|
||||||
|
}
|
||||||
|
}
|
||||||
while (false);
|
while (false);
|
||||||
|
|
||||||
// Finally, in double buffered environments, request the changes to be
|
// Finally, in double buffered environments, request the changes to be
|
||||||
|
@@ -17,6 +17,8 @@
|
|||||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "vcl/svapp.hxx"
|
||||||
|
|
||||||
#include "PresenterSlideSorter.hxx"
|
#include "PresenterSlideSorter.hxx"
|
||||||
#include "PresenterButton.hxx"
|
#include "PresenterButton.hxx"
|
||||||
#include "PresenterCanvasHelper.hxx"
|
#include "PresenterCanvasHelper.hxx"
|
||||||
@@ -512,14 +514,26 @@ void SAL_CALL PresenterSlideSorter::windowPaint (const css::awt::PaintEvent& rEv
|
|||||||
void SAL_CALL PresenterSlideSorter::mousePressed (const css::awt::MouseEvent& rEvent)
|
void SAL_CALL PresenterSlideSorter::mousePressed (const css::awt::MouseEvent& rEvent)
|
||||||
throw(css::uno::RuntimeException)
|
throw(css::uno::RuntimeException)
|
||||||
{
|
{
|
||||||
const geometry::RealPoint2D aPosition (rEvent.X, rEvent.Y);
|
css::awt::MouseEvent rTemp =rEvent;
|
||||||
|
/// check whether RTL interface or not
|
||||||
|
if(Application::GetSettings().GetLayoutRTL()){
|
||||||
|
awt::Rectangle aBox = mxWindow->getPosSize();
|
||||||
|
rTemp.X=aBox.Width-rEvent.X;
|
||||||
|
}
|
||||||
|
const geometry::RealPoint2D aPosition(rTemp.X, rEvent.Y);
|
||||||
mnSlideIndexMousePressed = mpLayout->GetSlideIndexForPosition(aPosition);
|
mnSlideIndexMousePressed = mpLayout->GetSlideIndexForPosition(aPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL PresenterSlideSorter::mouseReleased (const css::awt::MouseEvent& rEvent)
|
void SAL_CALL PresenterSlideSorter::mouseReleased (const css::awt::MouseEvent& rEvent)
|
||||||
throw(css::uno::RuntimeException)
|
throw(css::uno::RuntimeException)
|
||||||
{
|
{
|
||||||
const geometry::RealPoint2D aPosition (rEvent.X, rEvent.Y);
|
css::awt::MouseEvent rTemp =rEvent;
|
||||||
|
/// check whether RTL interface or not
|
||||||
|
if(Application::GetSettings().GetLayoutRTL()){
|
||||||
|
awt::Rectangle aBox = mxWindow->getPosSize();
|
||||||
|
rTemp.X=aBox.Width-rEvent.X;
|
||||||
|
}
|
||||||
|
const geometry::RealPoint2D aPosition(rTemp.X, rEvent.Y);
|
||||||
const sal_Int32 nSlideIndex (mpLayout->GetSlideIndexForPosition(aPosition));
|
const sal_Int32 nSlideIndex (mpLayout->GetSlideIndexForPosition(aPosition));
|
||||||
|
|
||||||
if (nSlideIndex == mnSlideIndexMousePressed && mnSlideIndexMousePressed >= 0)
|
if (nSlideIndex == mnSlideIndexMousePressed && mnSlideIndexMousePressed >= 0)
|
||||||
@@ -563,7 +577,13 @@ void SAL_CALL PresenterSlideSorter::mouseMoved (const css::awt::MouseEvent& rEve
|
|||||||
{
|
{
|
||||||
if (mpMouseOverManager.get() != NULL)
|
if (mpMouseOverManager.get() != NULL)
|
||||||
{
|
{
|
||||||
const geometry::RealPoint2D aPosition (rEvent.X, rEvent.Y);
|
css::awt::MouseEvent rTemp =rEvent;
|
||||||
|
/// check whether RTL interface or not
|
||||||
|
if(Application::GetSettings().GetLayoutRTL()){
|
||||||
|
awt::Rectangle aBox = mxWindow->getPosSize();
|
||||||
|
rTemp.X=aBox.Width-rEvent.X;
|
||||||
|
}
|
||||||
|
const geometry::RealPoint2D aPosition(rTemp.X, rEvent.Y);
|
||||||
sal_Int32 nSlideIndex (mpLayout->GetSlideIndexForPosition(aPosition));
|
sal_Int32 nSlideIndex (mpLayout->GetSlideIndexForPosition(aPosition));
|
||||||
|
|
||||||
if (nSlideIndex < 0)
|
if (nSlideIndex < 0)
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "vcl/svapp.hxx"
|
||||||
#include "PresenterToolBar.hxx"
|
#include "PresenterToolBar.hxx"
|
||||||
|
|
||||||
#include "PresenterBitmapContainer.hxx"
|
#include "PresenterBitmapContainer.hxx"
|
||||||
@@ -562,24 +563,28 @@ void SAL_CALL PresenterToolBar::windowPaint (const css::awt::PaintEvent& rEvent)
|
|||||||
void SAL_CALL PresenterToolBar::mousePressed (const css::awt::MouseEvent& rEvent)
|
void SAL_CALL PresenterToolBar::mousePressed (const css::awt::MouseEvent& rEvent)
|
||||||
throw(css::uno::RuntimeException)
|
throw(css::uno::RuntimeException)
|
||||||
{
|
{
|
||||||
|
ThrowIfDisposed();
|
||||||
CheckMouseOver(rEvent, true, true);
|
CheckMouseOver(rEvent, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL PresenterToolBar::mouseReleased (const css::awt::MouseEvent& rEvent)
|
void SAL_CALL PresenterToolBar::mouseReleased (const css::awt::MouseEvent& rEvent)
|
||||||
throw(css::uno::RuntimeException)
|
throw(css::uno::RuntimeException)
|
||||||
{
|
{
|
||||||
|
ThrowIfDisposed();
|
||||||
CheckMouseOver(rEvent, true);
|
CheckMouseOver(rEvent, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL PresenterToolBar::mouseEntered (const css::awt::MouseEvent& rEvent)
|
void SAL_CALL PresenterToolBar::mouseEntered (const css::awt::MouseEvent& rEvent)
|
||||||
throw(css::uno::RuntimeException)
|
throw(css::uno::RuntimeException)
|
||||||
{
|
{
|
||||||
|
ThrowIfDisposed();
|
||||||
CheckMouseOver(rEvent, true);
|
CheckMouseOver(rEvent, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SAL_CALL PresenterToolBar::mouseExited (const css::awt::MouseEvent& rEvent)
|
void SAL_CALL PresenterToolBar::mouseExited (const css::awt::MouseEvent& rEvent)
|
||||||
throw(css::uno::RuntimeException)
|
throw(css::uno::RuntimeException)
|
||||||
{
|
{
|
||||||
|
ThrowIfDisposed();
|
||||||
CheckMouseOver(rEvent, false);
|
CheckMouseOver(rEvent, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -589,7 +594,6 @@ void SAL_CALL PresenterToolBar::mouseMoved (const css::awt::MouseEvent& rEvent)
|
|||||||
throw (css::uno::RuntimeException)
|
throw (css::uno::RuntimeException)
|
||||||
{
|
{
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
|
|
||||||
CheckMouseOver(rEvent, true);
|
CheckMouseOver(rEvent, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -726,6 +730,7 @@ void PresenterToolBar::Layout (
|
|||||||
const awt::Rectangle aWindowBox (mxWindow->getPosSize());
|
const awt::Rectangle aWindowBox (mxWindow->getPosSize());
|
||||||
ElementContainer::iterator iPart;
|
ElementContainer::iterator iPart;
|
||||||
ElementContainer::iterator iEnd (maElementContainer.end());
|
ElementContainer::iterator iEnd (maElementContainer.end());
|
||||||
|
ElementContainer::iterator iBegin (maElementContainer.begin());
|
||||||
::std::vector<geometry::RealSize2D> aPartSizes (maElementContainer.size());
|
::std::vector<geometry::RealSize2D> aPartSizes (maElementContainer.size());
|
||||||
geometry::RealSize2D aTotalSize (0,0);
|
geometry::RealSize2D aTotalSize (0,0);
|
||||||
bool bIsHorizontal (true);
|
bool bIsHorizontal (true);
|
||||||
@@ -793,7 +798,8 @@ void PresenterToolBar::Layout (
|
|||||||
maBoundingBox.Y2 = nY + aTotalSize.Height;
|
maBoundingBox.Y2 = nY + aTotalSize.Height;
|
||||||
|
|
||||||
/* push front or back ? ... */
|
/* push front or back ? ... */
|
||||||
|
/// check whether RTL interface or not
|
||||||
|
if(!Application::GetSettings().GetLayoutRTL()){
|
||||||
for (iPart=maElementContainer.begin(), nIndex=0; iPart!=iEnd; ++iPart,++nIndex)
|
for (iPart=maElementContainer.begin(), nIndex=0; iPart!=iEnd; ++iPart,++nIndex)
|
||||||
{
|
{
|
||||||
geometry::RealRectangle2D aBoundingBox(
|
geometry::RealRectangle2D aBoundingBox(
|
||||||
@@ -809,6 +815,24 @@ void PresenterToolBar::Layout (
|
|||||||
bIsHorizontal = !bIsHorizontal;
|
bIsHorizontal = !bIsHorizontal;
|
||||||
nX += aBoundingBox.X2 - aBoundingBox.X1 + nGapWidth;
|
nX += aBoundingBox.X2 - aBoundingBox.X1 + nGapWidth;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (iPart=maElementContainer.end()-1, nIndex=2; iPart!=iBegin-1; --iPart, --nIndex)
|
||||||
|
{
|
||||||
|
geometry::RealRectangle2D aBoundingBox(
|
||||||
|
nX, nY,
|
||||||
|
nX+aPartSizes[nIndex].Width, nY+aTotalSize.Height);
|
||||||
|
|
||||||
|
// Add space for gaps between elements.
|
||||||
|
if ((*iPart)->size() > 1)
|
||||||
|
if (bIsHorizontal)
|
||||||
|
aBoundingBox.X2 += ((*iPart)->size()-1) * nGapWidth;
|
||||||
|
|
||||||
|
LayoutPart(rxCanvas, *iPart, aBoundingBox, aPartSizes[nIndex], bIsHorizontal);
|
||||||
|
bIsHorizontal = !bIsHorizontal;
|
||||||
|
nX += aBoundingBox.X2 - aBoundingBox.X1 + nGapWidth;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// The whole window has to be repainted.
|
// The whole window has to be repainted.
|
||||||
mpPresenterController->GetPaintManager()->Invalidate(mxWindow);
|
mpPresenterController->GetPaintManager()->Invalidate(mxWindow);
|
||||||
@@ -870,6 +894,10 @@ void PresenterToolBar::LayoutPart (
|
|||||||
|
|
||||||
ElementContainerPart::const_iterator iElement;
|
ElementContainerPart::const_iterator iElement;
|
||||||
ElementContainerPart::const_iterator iEnd (rpPart->end());
|
ElementContainerPart::const_iterator iEnd (rpPart->end());
|
||||||
|
ElementContainerPart::const_iterator iBegin (rpPart->begin());
|
||||||
|
|
||||||
|
/// check whether RTL interface or not
|
||||||
|
if(!Application::GetSettings().GetLayoutRTL()){
|
||||||
for (iElement=rpPart->begin(); iElement!=iEnd; ++iElement)
|
for (iElement=rpPart->begin(); iElement!=iEnd; ++iElement)
|
||||||
{
|
{
|
||||||
if (iElement->get() == NULL)
|
if (iElement->get() == NULL)
|
||||||
@@ -902,6 +930,55 @@ void PresenterToolBar::LayoutPart (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
for (iElement=rpPart->end()-1; iElement!=iBegin-1; --iElement)
|
||||||
|
{
|
||||||
|
if (iElement->get() == NULL)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
const awt::Size aElementSize ((*iElement)->GetBoundingSize(rxCanvas));
|
||||||
|
if (bIsHorizontal)
|
||||||
|
{
|
||||||
|
if ((*iElement)->IsFilling())
|
||||||
|
{
|
||||||
|
nY = rBoundingBox.Y1;
|
||||||
|
(*iElement)->SetSize(geometry::RealSize2D(aElementSize.Width, rBoundingBox.Y2 - rBoundingBox.Y1));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
nY = rBoundingBox.Y1 + (rBoundingBox.Y2-rBoundingBox.Y1 - aElementSize.Height) / 2;
|
||||||
|
(*iElement)->SetLocation(awt::Point(sal_Int32(0.5 + nX), sal_Int32(0.5 + nY)));
|
||||||
|
nX += aElementSize.Width + nGap;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// reverse presentation time with current time
|
||||||
|
if (iElement==iBegin){
|
||||||
|
iElement=iBegin+2;
|
||||||
|
}
|
||||||
|
else if (iElement==iBegin+2){
|
||||||
|
iElement=iBegin;
|
||||||
|
}
|
||||||
|
const awt::Size aNewElementSize ((*iElement)->GetBoundingSize(rxCanvas));
|
||||||
|
if ((*iElement)->IsFilling())
|
||||||
|
{
|
||||||
|
nX = rBoundingBox.X1;
|
||||||
|
(*iElement)->SetSize(geometry::RealSize2D(rBoundingBox.X2 - rBoundingBox.X1, aNewElementSize.Height));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
nX = rBoundingBox.X1 + (rBoundingBox.X2-rBoundingBox.X1 - aNewElementSize.Width) / 2;
|
||||||
|
(*iElement)->SetLocation(awt::Point(sal_Int32(0.5 + nX), sal_Int32(0.5 + nY)));
|
||||||
|
nY += aNewElementSize.Height + nGap;
|
||||||
|
|
||||||
|
// return the index as it was before the reversing
|
||||||
|
if (iElement==iBegin)
|
||||||
|
iElement=iBegin+2;
|
||||||
|
else if (iElement==iBegin+2)
|
||||||
|
iElement=iBegin;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void PresenterToolBar::Paint (
|
void PresenterToolBar::Paint (
|
||||||
const awt::Rectangle& rUpdateBox,
|
const awt::Rectangle& rUpdateBox,
|
||||||
@@ -950,6 +1027,11 @@ void PresenterToolBar::CheckMouseOver (
|
|||||||
const bool bOverWindow,
|
const bool bOverWindow,
|
||||||
const bool bMouseDown)
|
const bool bMouseDown)
|
||||||
{
|
{
|
||||||
|
css::awt::MouseEvent rTemp =rEvent;
|
||||||
|
if(Application::GetSettings().GetLayoutRTL()){
|
||||||
|
awt::Rectangle aWindowBox = mxWindow->getPosSize();
|
||||||
|
rTemp.X=aWindowBox.Width-rTemp.X;
|
||||||
|
}
|
||||||
ElementContainer::iterator iPart;
|
ElementContainer::iterator iPart;
|
||||||
ElementContainer::const_iterator iEnd (maElementContainer.end());
|
ElementContainer::const_iterator iEnd (maElementContainer.end());
|
||||||
for (iPart=maElementContainer.begin(); iPart!=iEnd; ++iPart)
|
for (iPart=maElementContainer.begin(); iPart!=iEnd; ++iPart)
|
||||||
@@ -963,13 +1045,13 @@ void PresenterToolBar::CheckMouseOver (
|
|||||||
|
|
||||||
awt::Rectangle aBox ((*iElement)->GetBoundingBox());
|
awt::Rectangle aBox ((*iElement)->GetBoundingBox());
|
||||||
const bool bIsOver = bOverWindow
|
const bool bIsOver = bOverWindow
|
||||||
&& aBox.X <= rEvent.X
|
&& aBox.X <= rTemp.X
|
||||||
&& aBox.Width+aBox.X-1 >= rEvent.X
|
&& aBox.Width+aBox.X-1 >= rTemp.X
|
||||||
&& aBox.Y <= rEvent.Y
|
&& aBox.Y <= rTemp.Y
|
||||||
&& aBox.Height+aBox.Y-1 >= rEvent.Y;
|
&& aBox.Height+aBox.Y-1 >= rTemp.Y;
|
||||||
(*iElement)->SetState(
|
(*iElement)->SetState(
|
||||||
bIsOver,
|
bIsOver,
|
||||||
bIsOver && rEvent.Buttons!=0 && bMouseDown && rEvent.ClickCount>0);
|
bIsOver && rTemp.Buttons!=0 && bMouseDown && rTemp.ClickCount>0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1507,6 +1589,8 @@ void Button::PaintIcon (
|
|||||||
Reference<rendering::XBitmap> xBitmap (mpMode->mpIcon->GetBitmap(GetMode()));
|
Reference<rendering::XBitmap> xBitmap (mpMode->mpIcon->GetBitmap(GetMode()));
|
||||||
if (xBitmap.is())
|
if (xBitmap.is())
|
||||||
{
|
{
|
||||||
|
/// check whether RTL interface or not
|
||||||
|
if(!Application::GetSettings().GetLayoutRTL()){
|
||||||
const sal_Int32 nX (maLocation.X
|
const sal_Int32 nX (maLocation.X
|
||||||
+ (maSize.Width-xBitmap->getSize().Width) / 2);
|
+ (maSize.Width-xBitmap->getSize().Width) / 2);
|
||||||
const sal_Int32 nY (maLocation.Y
|
const sal_Int32 nY (maLocation.Y
|
||||||
@@ -1518,6 +1602,19 @@ void Button::PaintIcon (
|
|||||||
rendering::CompositeOperation::OVER);
|
rendering::CompositeOperation::OVER);
|
||||||
rxCanvas->drawBitmap(xBitmap, rViewState, aRenderState);
|
rxCanvas->drawBitmap(xBitmap, rViewState, aRenderState);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
const sal_Int32 nX (maLocation.X
|
||||||
|
+ (maSize.Width+xBitmap->getSize().Width) / 2);
|
||||||
|
const sal_Int32 nY (maLocation.Y
|
||||||
|
+ (maSize.Height - nTextHeight - xBitmap->getSize().Height) / 2);
|
||||||
|
const rendering::RenderState aRenderState(
|
||||||
|
geometry::AffineMatrix2D(-1,0,nX, 0,1,nY),
|
||||||
|
NULL,
|
||||||
|
Sequence<double>(4),
|
||||||
|
rendering::CompositeOperation::OVER);
|
||||||
|
rxCanvas->drawBitmap(xBitmap, rViewState, aRenderState);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PresenterBitmapDescriptor::Mode Button::GetMode (void) const
|
PresenterBitmapDescriptor::Mode Button::GetMode (void) const
|
||||||
@@ -1669,7 +1766,10 @@ void Text::Paint (
|
|||||||
aContext,
|
aContext,
|
||||||
rendering::TextDirection::WEAK_LEFT_TO_RIGHT,
|
rendering::TextDirection::WEAK_LEFT_TO_RIGHT,
|
||||||
0));
|
0));
|
||||||
|
/** this responsible of the toolbar and the zoom
|
||||||
|
that in the note mode.
|
||||||
|
check whether RTL interface or not. */
|
||||||
|
if(!Application::GetSettings().GetLayoutRTL()){
|
||||||
geometry::RealRectangle2D aBox (xLayout->queryTextBounds());
|
geometry::RealRectangle2D aBox (xLayout->queryTextBounds());
|
||||||
const double nTextWidth = aBox.X2 - aBox.X1;
|
const double nTextWidth = aBox.X2 - aBox.X1;
|
||||||
const double nY = rBoundingBox.Y + rBoundingBox.Height - aBox.Y2;
|
const double nY = rBoundingBox.Y + rBoundingBox.Height - aBox.Y2;
|
||||||
@@ -1681,7 +1781,6 @@ void Text::Paint (
|
|||||||
Sequence<double>(4),
|
Sequence<double>(4),
|
||||||
rendering::CompositeOperation::SOURCE);
|
rendering::CompositeOperation::SOURCE);
|
||||||
PresenterCanvasHelper::SetDeviceColor(aRenderState, mpFont->mnColor);
|
PresenterCanvasHelper::SetDeviceColor(aRenderState, mpFont->mnColor);
|
||||||
|
|
||||||
rxCanvas->drawText(
|
rxCanvas->drawText(
|
||||||
aContext,
|
aContext,
|
||||||
mpFont->mxFont,
|
mpFont->mxFont,
|
||||||
@@ -1689,6 +1788,26 @@ void Text::Paint (
|
|||||||
aRenderState,
|
aRenderState,
|
||||||
rendering::TextDirection::WEAK_LEFT_TO_RIGHT);
|
rendering::TextDirection::WEAK_LEFT_TO_RIGHT);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
geometry::RealRectangle2D aBox (xLayout->queryTextBounds());
|
||||||
|
const double nTextWidth = aBox.X2 - aBox.X1;
|
||||||
|
const double nY = rBoundingBox.Y + rBoundingBox.Height - aBox.Y2;
|
||||||
|
const double nX = rBoundingBox.X + (rBoundingBox.Width + nTextWidth)/2;
|
||||||
|
|
||||||
|
rendering::RenderState aRenderState(
|
||||||
|
geometry::AffineMatrix2D(1,0,nX, 0,1,nY),
|
||||||
|
NULL,
|
||||||
|
Sequence<double>(4),
|
||||||
|
rendering::CompositeOperation::SOURCE);
|
||||||
|
PresenterCanvasHelper::SetDeviceColor(aRenderState, mpFont->mnColor);
|
||||||
|
rxCanvas->drawText(
|
||||||
|
aContext,
|
||||||
|
mpFont->mxFont,
|
||||||
|
rViewState,
|
||||||
|
aRenderState,
|
||||||
|
rendering::TextDirection::WEAK_RIGHT_TO_LEFT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
geometry::RealRectangle2D Text::GetBoundingBox (const Reference<rendering::XCanvas>& rxCanvas)
|
geometry::RealRectangle2D Text::GetBoundingBox (const Reference<rendering::XCanvas>& rxCanvas)
|
||||||
{
|
{
|
||||||
@@ -1698,6 +1817,8 @@ geometry::RealRectangle2D Text::GetBoundingBox (const Reference<rendering::XCanv
|
|||||||
mpFont->PrepareFont(rxCanvas);
|
mpFont->PrepareFont(rxCanvas);
|
||||||
if (mpFont->mxFont.is())
|
if (mpFont->mxFont.is())
|
||||||
{
|
{
|
||||||
|
/// check whether RTL interface or not
|
||||||
|
if(!Application::GetSettings().GetLayoutRTL()){
|
||||||
rendering::StringContext aContext (msText, 0, msText.getLength());
|
rendering::StringContext aContext (msText, 0, msText.getLength());
|
||||||
Reference<rendering::XTextLayout> xLayout (
|
Reference<rendering::XTextLayout> xLayout (
|
||||||
mpFont->mxFont->createTextLayout(
|
mpFont->mxFont->createTextLayout(
|
||||||
@@ -1706,6 +1827,16 @@ geometry::RealRectangle2D Text::GetBoundingBox (const Reference<rendering::XCanv
|
|||||||
0));
|
0));
|
||||||
return xLayout->queryTextBounds();
|
return xLayout->queryTextBounds();
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
rendering::StringContext aContext (msText, 0, msText.getLength());
|
||||||
|
Reference<rendering::XTextLayout> xLayout (
|
||||||
|
mpFont->mxFont->createTextLayout(
|
||||||
|
aContext,
|
||||||
|
rendering::TextDirection::WEAK_RIGHT_TO_LEFT,
|
||||||
|
0));
|
||||||
|
return xLayout->queryTextBounds();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return geometry::RealRectangle2D(0,0,0,0);
|
return geometry::RealRectangle2D(0,0,0,0);
|
||||||
}
|
}
|
||||||
@@ -1727,6 +1858,8 @@ OUString TimeFormatter::FormatTime (const oslDateTime& rTime)
|
|||||||
const sal_Int32 nMinutes (sal::static_int_cast<sal_Int32>(rTime.Minutes));
|
const sal_Int32 nMinutes (sal::static_int_cast<sal_Int32>(rTime.Minutes));
|
||||||
const sal_Int32 nSeconds(sal::static_int_cast<sal_Int32>(rTime.Seconds));
|
const sal_Int32 nSeconds(sal::static_int_cast<sal_Int32>(rTime.Seconds));
|
||||||
|
|
||||||
|
/// check whether RTL interface or not
|
||||||
|
if(!Application::GetSettings().GetLayoutRTL()){
|
||||||
// Hours
|
// Hours
|
||||||
if (mbIs24HourFormat)
|
if (mbIs24HourFormat)
|
||||||
sText.append(OUString::valueOf(nHours));
|
sText.append(OUString::valueOf(nHours));
|
||||||
@@ -1751,7 +1884,45 @@ OUString TimeFormatter::FormatTime (const oslDateTime& rTime)
|
|||||||
sText.append(A2S("0"));
|
sText.append(A2S("0"));
|
||||||
sText.append(sSeconds);
|
sText.append(sSeconds);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Seconds
|
||||||
|
if (mbIsShowSeconds)
|
||||||
|
{
|
||||||
|
const OUString sSeconds (OUString::valueOf(nSeconds));
|
||||||
|
if (sSeconds.getLength() == 1){
|
||||||
|
sText.append(sSeconds[0]);
|
||||||
|
sText.append(A2S("0"));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sText.append(sSeconds[1]);
|
||||||
|
sText.append(sSeconds[0]);
|
||||||
|
}
|
||||||
|
sText.append(A2S(":"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Minutes
|
||||||
|
const OUString sMinutes (OUString::valueOf(nMinutes));
|
||||||
|
if (sMinutes.getLength() == 1){
|
||||||
|
sText.append(sMinutes[0]);
|
||||||
|
sText.append(A2S("0"));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sText.append(sMinutes[1]);
|
||||||
|
sText.append(sMinutes[0]);
|
||||||
|
}
|
||||||
|
// Hours
|
||||||
|
OUString tempHours;
|
||||||
|
sText.append(A2S(":"));
|
||||||
|
if (mbIs24HourFormat)
|
||||||
|
tempHours = OUString::valueOf(nHours);
|
||||||
|
else
|
||||||
|
tempHours = OUString::valueOf(
|
||||||
|
sal::static_int_cast<sal_Int32>(nHours>12 ? nHours-12 : nHours));
|
||||||
|
if (tempHours.getLength() > 1)
|
||||||
|
sText.append(tempHours[1]);
|
||||||
|
sText.append(tempHours[0]);
|
||||||
|
}
|
||||||
if (mbIsAmPmFormat)
|
if (mbIsAmPmFormat)
|
||||||
{
|
{
|
||||||
if (rTime.Hours < 12)
|
if (rTime.Hours < 12)
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
#undef ENABLE_PANE_RESIZING
|
#undef ENABLE_PANE_RESIZING
|
||||||
//#define ENABLE_PANE_RESIZING
|
//#define ENABLE_PANE_RESIZING
|
||||||
|
|
||||||
|
#include "vcl/svapp.hxx"
|
||||||
#include "PresenterWindowManager.hxx"
|
#include "PresenterWindowManager.hxx"
|
||||||
#include "PresenterController.hxx"
|
#include "PresenterController.hxx"
|
||||||
#include "PresenterGeometryHelper.hxx"
|
#include "PresenterGeometryHelper.hxx"
|
||||||
@@ -655,7 +656,8 @@ void PresenterWindowManager::LayoutStandardMode (void)
|
|||||||
const double nGap (20);
|
const double nGap (20);
|
||||||
const double nHorizontalSlideDivide (aBox.Width / nGoldenRatio);
|
const double nHorizontalSlideDivide (aBox.Width / nGoldenRatio);
|
||||||
double nSlidePreviewTop (0);
|
double nSlidePreviewTop (0);
|
||||||
|
/// check whether RTL interface or not
|
||||||
|
if(!Application::GetSettings().GetLayoutRTL()){
|
||||||
// For the current slide view calculate the outer height from the outer
|
// For the current slide view calculate the outer height from the outer
|
||||||
// width. This takes into acount the slide aspect ratio and thus has to
|
// width. This takes into acount the slide aspect ratio and thus has to
|
||||||
// go over the inner pane size.
|
// go over the inner pane size.
|
||||||
@@ -691,7 +693,44 @@ void PresenterWindowManager::LayoutStandardMode (void)
|
|||||||
aNextSlideOuterBox.Width,
|
aNextSlideOuterBox.Width,
|
||||||
aNextSlideOuterBox.Height);
|
aNextSlideOuterBox.Height);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
|
||||||
|
// For the current slide view calculate the outer height from the outer
|
||||||
|
// width. This takes into acount the slide aspect ratio and thus has to
|
||||||
|
// go over the inner pane size.
|
||||||
|
PresenterPaneContainer::SharedPaneDescriptor pPane (
|
||||||
|
mpPaneContainer->FindPaneURL(PresenterPaneFactory::msCurrentSlidePreviewPaneURL));
|
||||||
|
if (pPane.get() != NULL)
|
||||||
|
{
|
||||||
|
const awt::Size aNextSlideOuterBox (CalculatePaneSize(
|
||||||
|
nHorizontalSlideDivide - 1.5*nGap,
|
||||||
|
PresenterPaneFactory::msCurrentSlidePreviewPaneURL));
|
||||||
|
nSlidePreviewTop = (aBox.Height - aNextSlideOuterBox.Height) / 2;
|
||||||
|
SetPanePosSizeAbsolute (
|
||||||
|
PresenterPaneFactory::msCurrentSlidePreviewPaneURL,
|
||||||
|
aBox.Width - aNextSlideOuterBox.Width - nGap,
|
||||||
|
nSlidePreviewTop,
|
||||||
|
aNextSlideOuterBox.Width,
|
||||||
|
aNextSlideOuterBox.Height);
|
||||||
|
}
|
||||||
|
|
||||||
|
// For the next slide view calculate the outer height from the outer
|
||||||
|
// width. This takes into acount the slide aspect ratio and thus has to
|
||||||
|
// go over the inner pane size.
|
||||||
|
pPane = mpPaneContainer->FindPaneURL(PresenterPaneFactory::msNextSlidePreviewPaneURL);
|
||||||
|
if (pPane.get() != NULL)
|
||||||
|
{
|
||||||
|
const awt::Size aCurrentSlideOuterBox(CalculatePaneSize(
|
||||||
|
aBox.Width - nHorizontalSlideDivide - 1.5*nGap,
|
||||||
|
PresenterPaneFactory::msNextSlidePreviewPaneURL));
|
||||||
|
SetPanePosSizeAbsolute (
|
||||||
|
PresenterPaneFactory::msNextSlidePreviewPaneURL,
|
||||||
|
nGap,
|
||||||
|
nSlidePreviewTop,
|
||||||
|
aCurrentSlideOuterBox.Width,
|
||||||
|
aCurrentSlideOuterBox.Height);
|
||||||
|
}
|
||||||
|
}
|
||||||
LayoutToolBar();
|
LayoutToolBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -708,6 +747,8 @@ void PresenterWindowManager::LayoutNotesMode (void)
|
|||||||
const double nTertiaryWidth (nSecondaryWidth / nGoldenRatio);
|
const double nTertiaryWidth (nSecondaryWidth / nGoldenRatio);
|
||||||
double nSlidePreviewTop (0);
|
double nSlidePreviewTop (0);
|
||||||
double nNotesViewBottom (aToolBarBox.Y1 - nGap);
|
double nNotesViewBottom (aToolBarBox.Y1 - nGap);
|
||||||
|
/// check whether RTL interface or not
|
||||||
|
if(!Application::GetSettings().GetLayoutRTL()){
|
||||||
|
|
||||||
// The notes view has no fixed aspect ratio.
|
// The notes view has no fixed aspect ratio.
|
||||||
PresenterPaneContainer::SharedPaneDescriptor pPane (
|
PresenterPaneContainer::SharedPaneDescriptor pPane (
|
||||||
@@ -761,6 +802,61 @@ void PresenterWindowManager::LayoutNotesMode (void)
|
|||||||
aNextSlideOuterBox.Width,
|
aNextSlideOuterBox.Width,
|
||||||
aNextSlideOuterBox.Height);
|
aNextSlideOuterBox.Height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}else {
|
||||||
|
// The notes view has no fixed aspect ratio.
|
||||||
|
PresenterPaneContainer::SharedPaneDescriptor pPane (
|
||||||
|
mpPaneContainer->FindPaneURL(PresenterPaneFactory::msNotesPaneURL));
|
||||||
|
if (pPane.get() != NULL)
|
||||||
|
{
|
||||||
|
const geometry::RealSize2D aNotesViewOuterSize(
|
||||||
|
nPrimaryWidth - 1.5*nGap + 0.5,
|
||||||
|
nNotesViewBottom);
|
||||||
|
nSlidePreviewTop = (aBox.Height
|
||||||
|
- aToolBarBox.Y2 + aToolBarBox.Y1 - aNotesViewOuterSize.Height) / 2;
|
||||||
|
SetPanePosSizeAbsolute (
|
||||||
|
PresenterPaneFactory::msNotesPaneURL,
|
||||||
|
nGap,
|
||||||
|
nSlidePreviewTop,
|
||||||
|
aNotesViewOuterSize.Width,
|
||||||
|
aNotesViewOuterSize.Height);
|
||||||
|
nNotesViewBottom = nSlidePreviewTop + aNotesViewOuterSize.Height;
|
||||||
|
}
|
||||||
|
|
||||||
|
// For the current slide view calculate the outer height from the outer
|
||||||
|
// width. This takes into acount the slide aspect ratio and thus has to
|
||||||
|
// go over the inner pane size.
|
||||||
|
pPane = mpPaneContainer->FindPaneURL(PresenterPaneFactory::msCurrentSlidePreviewPaneURL);
|
||||||
|
if (pPane.get() != NULL)
|
||||||
|
{
|
||||||
|
const awt::Size aCurrentSlideOuterBox(CalculatePaneSize(
|
||||||
|
nSecondaryWidth - 1.5*nGap,
|
||||||
|
PresenterPaneFactory::msCurrentSlidePreviewPaneURL));
|
||||||
|
SetPanePosSizeAbsolute (
|
||||||
|
PresenterPaneFactory::msCurrentSlidePreviewPaneURL,
|
||||||
|
aBox.Width - aCurrentSlideOuterBox.Width - nGap,
|
||||||
|
nSlidePreviewTop,
|
||||||
|
aCurrentSlideOuterBox.Width,
|
||||||
|
aCurrentSlideOuterBox.Height);
|
||||||
|
}
|
||||||
|
|
||||||
|
// For the next slide view calculate the outer height from the outer
|
||||||
|
// width. This takes into acount the slide aspect ratio and thus has to
|
||||||
|
// go over the inner pane size.
|
||||||
|
pPane = mpPaneContainer->FindPaneURL(PresenterPaneFactory::msNextSlidePreviewPaneURL);
|
||||||
|
if (pPane.get() != NULL)
|
||||||
|
{
|
||||||
|
const awt::Size aNextSlideOuterBox (CalculatePaneSize(
|
||||||
|
nTertiaryWidth,
|
||||||
|
PresenterPaneFactory::msNextSlidePreviewPaneURL));
|
||||||
|
SetPanePosSizeAbsolute (
|
||||||
|
PresenterPaneFactory::msNextSlidePreviewPaneURL,
|
||||||
|
aBox.Width - aNextSlideOuterBox.Width - nGap,
|
||||||
|
nNotesViewBottom - aNextSlideOuterBox.Height,
|
||||||
|
aNextSlideOuterBox.Width,
|
||||||
|
aNextSlideOuterBox.Height);
|
||||||
|
}}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PresenterWindowManager::LayoutSlideSorterMode (void)
|
void PresenterWindowManager::LayoutSlideSorterMode (void)
|
||||||
|
Reference in New Issue
Block a user