Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2955

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/55/2955/1

Use ViewSize for Outline. OutlineViewShell is still fixed however.

Change-Id: I3fc1b6e94d09c123adbb8bfd58c9bb5b11699f13
---
M sd/source/ui/view/outlview.cxx
1 file changed, 3 insertions(+), 6 deletions(-)



diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 8d5f9f3..cc9b9b4 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -76,9 +76,6 @@
 
 namespace sd {
 
-// width: DIN A4, two margins à 1 cm each
-#define OUTLINE_PAPERWIDTH 19000
-
 // a progress bar gets displayed when more than
 // PROCESS_WITH_PROGRESS_THRESHOLD pages are concerned
 #define PROCESS_WITH_PROGRESS_THRESHOLD  5
@@ -97,7 +94,7 @@
 |*
 \************************************************************************/
 
-OutlineView::OutlineView( DrawDocShell& rDocSh, ::Window* pWindow, OutlineViewShell& 
rOutlineViewSh)
+OutlineView::OutlineView( DrawDocShell& rDocSh, Window* pWindow, OutlineViewShell& rOutlineViewSh)
 : ::sd::View(*rDocSh.GetDoc(), pWindow, &rOutlineViewSh)
 , mrOutlineViewShell(rOutlineViewSh)
 , mrOutliner(*mrDoc.GetOutliner(sal_True))
@@ -116,7 +113,7 @@
         bInitOutliner = sal_True;
         mrOutliner.Init( OUTLINERMODE_OUTLINEVIEW );
         mrOutliner.SetRefDevice( SD_MOD()->GetRefDevice( rDocSh ) );
-        sal_uLong nWidth = OUTLINE_PAPERWIDTH;
+        sal_uLong nWidth = pWindow->GetViewSize().Width();
         mrOutliner.SetPaperSize(Size(nWidth, 400000000));
     }
 
@@ -860,7 +857,7 @@
     ::sd::Window*   pWin = mrOutlineViewShell.GetActiveWindow();
     OutlinerView*   pOutlinerView = GetViewByWindow(pWin);
     Rectangle     aVis          = pOutlinerView->GetVisArea();
-    sal_uLong nWidth = OUTLINE_PAPERWIDTH;
+    sal_uLong nWidth = pWin->GetViewSize().Width();
     Rectangle aText = Rectangle(Point(0,0),
                                    Size(nWidth,
                                         mrOutliner.GetTextHeight()));

-- 
To view, visit https://gerrit.libreoffice.org/2955
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3fc1b6e94d09c123adbb8bfd58c9bb5b11699f13
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Rob Snelders <libreoffice@ertai.nl>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.