summaryrefslogtreecommitdiff
path: root/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx
diff options
context:
space:
mode:
authorAndre Fischer <af@openoffice.org>2010-03-02 15:54:17 +0100
committerAndre Fischer <af@openoffice.org>2010-03-02 15:54:17 +0100
commitefc8b0f870e318fd790c0258dbd0c92dc7cd83fa (patch)
treedf4cfba75f9fb2de112474eacf6535afa8ac367d /sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx
parentf1a49de1365676c852a766617c35614d14f899d8 (diff)
renaissance1: #i107215# Modified display of substitution and insertion indicator.
Diffstat (limited to 'sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx')
-rw-r--r--sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx26
1 files changed, 22 insertions, 4 deletions
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx
index 2b89006dc9ea..8075464d92ff 100644
--- a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx
@@ -29,10 +29,13 @@
*
************************************************************************/
+#include "precompiled_sd.hxx"
+
#include "view/SlsPageObjectLayouter.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "view/SlsFontProvider.hxx"
+#include "view/SlsTheme.hxx"
#include "tools/IconCache.hxx"
#include "Window.hxx"
#include "res_bmp.hrc"
@@ -62,7 +65,8 @@ PageObjectLayouter::PageObjectLayouter (
maPreviewBoundingBox(),
maTransitionEffectBoundingBox(),
maButtonAreaBoundingBox(),
- maTransitionEffectIcon(IconCache::Instance().GetIcon(BMP_FADE_EFFECT_INDICATOR))
+ maTransitionEffectIcon(IconCache::Instance().GetIcon(BMP_FADE_EFFECT_INDICATOR)),
+ mpPageNumberFont(Theme::GetFont(Theme::PageNumberFont, *rpWindow))
{
const Size aPageNumberAreaSize (GetPageNumberAreaSize(nPageCount));
@@ -179,6 +183,19 @@ Rectangle PageObjectLayouter::GetBoundingBox (
const CoordinateSystem eCoordinateSystem,
const sal_Int32 nIndex)
{
+ Point aLocation (rpPageDescriptor ? rpPageDescriptor->GetLocation() : Point(0,0));
+ return GetBoundingBox(aLocation, ePart, eCoordinateSystem, nIndex);
+}
+
+
+
+
+Rectangle PageObjectLayouter::GetBoundingBox (
+ const Point& rPageObjectLocation,
+ const Part ePart,
+ const CoordinateSystem eCoordinateSystem,
+ const sal_Int32 nIndex)
+{
Rectangle aBoundingBox;
switch (ePart)
{
@@ -221,11 +238,11 @@ Rectangle PageObjectLayouter::GetBoundingBox (
break;
}
- Point aLocation (rpPageDescriptor ? rpPageDescriptor->GetLocation() : Point(0,0));
+ Point aLocation (rPageObjectLocation);
if (eCoordinateSystem == ScreenCoordinateSystem)
aLocation += mpWindow->GetMapMode().GetOrigin();
- return Rectangle(
+ return Rectangle(
aBoundingBox.TopLeft() + aLocation,
aBoundingBox.BottomRight() + aLocation);
}
@@ -255,7 +272,8 @@ Size PageObjectLayouter::GetPageNumberAreaSize (const int nPageCount)
// Set the correct font.
Font aOriginalFont (mpWindow->GetFont());
- mpWindow->SetFont(*FontProvider::Instance().GetFont(*mpWindow));
+ if (mpPageNumberFont)
+ mpWindow->SetFont(*mpPageNumberFont);
String sPageNumberTemplate;
if (nPageCount < 10)