[PATCH] Use ViewSize for Outline. OutlineViewShell is still fixed ho...

Rob Snelders (via Code Review) gerrit at gerrit.libreoffice.org
Sat Mar 23 15:04:02 PDT 2013


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 at ertai.nl>



More information about the LibreOffice mailing list