summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sdext/source/presenter/PresenterWindowManager.cxx125
1 files changed, 28 insertions, 97 deletions
diff --git a/sdext/source/presenter/PresenterWindowManager.cxx b/sdext/source/presenter/PresenterWindowManager.cxx
index 7c8124d17d13..9f1e8d074318 100644
--- a/sdext/source/presenter/PresenterWindowManager.cxx
+++ b/sdext/source/presenter/PresenterWindowManager.cxx
@@ -656,8 +656,8 @@ void PresenterWindowManager::LayoutStandardMode (void)
const double nGap (20);
const double nHorizontalSlideDivide (aBox.Width / nGoldenRatio);
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
// width. This takes into acount the slide aspect ratio and thus has to
// go over the inner pane size.
@@ -669,9 +669,13 @@ void PresenterWindowManager::LayoutStandardMode (void)
nHorizontalSlideDivide - 1.5*nGap,
PresenterPaneFactory::msCurrentSlidePreviewPaneURL));
nSlidePreviewTop = (aBox.Height - aCurrentSlideOuterBox.Height) / 2;
+ double Temp=nGap;
+ /// check whether RTL interface or not
+ if(Application::GetSettings().GetLayoutRTL())
+ Temp=aBox.Width - aCurrentSlideOuterBox.Width - nGap;
SetPanePosSizeAbsolute (
PresenterPaneFactory::msCurrentSlidePreviewPaneURL,
- nGap,
+ Temp,
nSlidePreviewTop,
aCurrentSlideOuterBox.Width,
aCurrentSlideOuterBox.Height);
@@ -686,51 +690,18 @@ void PresenterWindowManager::LayoutStandardMode (void)
const awt::Size aNextSlideOuterBox (CalculatePaneSize(
aBox.Width - nHorizontalSlideDivide - 1.5*nGap,
PresenterPaneFactory::msNextSlidePreviewPaneURL));
+ double Temp=aBox.Width - aNextSlideOuterBox.Width - nGap;
+ /// check whether RTL interface or not
+ if(Application::GetSettings().GetLayoutRTL())
+ Temp=nGap;
SetPanePosSizeAbsolute (
PresenterPaneFactory::msNextSlidePreviewPaneURL,
- aBox.Width - aNextSlideOuterBox.Width - nGap,
+ Temp,
nSlidePreviewTop,
aNextSlideOuterBox.Width,
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();
}
@@ -748,7 +719,7 @@ void PresenterWindowManager::LayoutNotesMode (void)
double nSlidePreviewTop (0);
double nNotesViewBottom (aToolBarBox.Y1 - nGap);
/// check whether RTL interface or not
- if(!Application::GetSettings().GetLayoutRTL()){
+
// The notes view has no fixed aspect ratio.
PresenterPaneContainer::SharedPaneDescriptor pPane (
@@ -760,9 +731,13 @@ void PresenterWindowManager::LayoutNotesMode (void)
nNotesViewBottom);
nSlidePreviewTop = (aBox.Height
- aToolBarBox.Y2 + aToolBarBox.Y1 - aNotesViewOuterSize.Height) / 2;
+ /// check whether RTL interface or not
+ double Temp=aBox.Width - aNotesViewOuterSize.Width - nGap;
+ if(Application::GetSettings().GetLayoutRTL())
+ Temp=nGap;
SetPanePosSizeAbsolute (
PresenterPaneFactory::msNotesPaneURL,
- aBox.Width - aNotesViewOuterSize.Width - nGap,
+ Temp,
nSlidePreviewTop,
aNotesViewOuterSize.Width,
aNotesViewOuterSize.Height);
@@ -778,9 +753,13 @@ void PresenterWindowManager::LayoutNotesMode (void)
const awt::Size aCurrentSlideOuterBox(CalculatePaneSize(
nSecondaryWidth - 1.5*nGap,
PresenterPaneFactory::msCurrentSlidePreviewPaneURL));
+ /// check whether RTL interface or not
+ double Temp=nGap;
+ if(Application::GetSettings().GetLayoutRTL())
+ Temp=aBox.Width - aCurrentSlideOuterBox.Width - nGap;
SetPanePosSizeAbsolute (
PresenterPaneFactory::msCurrentSlidePreviewPaneURL,
- nGap,
+ Temp,
nSlidePreviewTop,
aCurrentSlideOuterBox.Width,
aCurrentSlideOuterBox.Height);
@@ -795,68 +774,20 @@ void PresenterWindowManager::LayoutNotesMode (void)
const awt::Size aNextSlideOuterBox (CalculatePaneSize(
nTertiaryWidth,
PresenterPaneFactory::msNextSlidePreviewPaneURL));
+ /// check whether RTL interface or not
+ double Temp=nGap;
+ if(Application::GetSettings().GetLayoutRTL())
+ Temp=aBox.Width - aNextSlideOuterBox.Width - nGap;
SetPanePosSizeAbsolute (
PresenterPaneFactory::msNextSlidePreviewPaneURL,
- nGap,
+ Temp,
nNotesViewBottom - aNextSlideOuterBox.Height,
aNextSlideOuterBox.Width,
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)