diff options
author | Uray M. János <uray.janos@gmail.com> | 2012-09-07 10:31:53 +0200 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-09-07 11:55:31 +0200 |
commit | 70d1b98a53cae469aeadb070c5681c76d6e6996f (patch) | |
tree | 160b0a0df6c781da5987de14644e88eb66943f6c /basctl | |
parent | 19e7696b0f3e6771b630220379f00d306b44ec3d (diff) |
basctl: int -> long for Point and Size
To be consequent, because Point and Size use long.
Change-Id: I776a1839ee5d2cbdbcedad2b2922cb33b94c7b37
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 12 | ||||
-rw-r--r-- | basctl/source/basicide/baside2.hxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/baside3.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/layout.cxx | 34 | ||||
-rw-r--r-- | basctl/source/basicide/layout.hxx | 14 | ||||
-rw-r--r-- | basctl/source/dlged/dlged.cxx | 10 | ||||
-rw-r--r-- | basctl/source/inc/baside3.hxx | 2 |
7 files changed, 38 insertions, 38 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 7de663d804a4..13b169152819 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -59,11 +59,11 @@ namespace namespace Print { - int const nLeftMargin = 1700; - int const nRightMargin = 900; - int const nTopMargin = 2000; - int const nBottomMargin = 1000; - int const nBorder = 300; + long const nLeftMargin = 1700; + long const nRightMargin = 900; + long const nTopMargin = 2000; + long const nBottomMargin = 1000; + long const nBorder = 300; } short const ValidWindow = 0x1234; @@ -1558,7 +1558,7 @@ void ModulWindowLayout::BasicRemoveWatch () aWatchWindow.RemoveSelectedWatch(); } -void ModulWindowLayout::OnFirstSize (int const nWidth, int const nHeight) +void ModulWindowLayout::OnFirstSize (long const nWidth, long const nHeight) { AddToLeft(&rObjectCatalog, Size(nWidth * 0.20, nHeight * 0.75)); AddToBottom(&aWatchWindow, Size(nWidth * 0.67, nHeight * 0.25)); diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index 489376c55201..b7d8975d67b8 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -424,7 +424,7 @@ protected: // Window: virtual void Paint (const Rectangle& rRect); // Layout: - virtual void OnFirstSize (int nWidth, int nHeight); + virtual void OnFirstSize (long nWidth, long nHeight); private: // main child window diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 2d22e5083eaa..619704312955 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -1530,7 +1530,7 @@ void DialogWindowLayout::GetState (SfxItemSet& rSet, unsigned nWhich) } } -void DialogWindowLayout::OnFirstSize (int const nWidth, int const nHeight) +void DialogWindowLayout::OnFirstSize (long const nWidth, long const nHeight) { AddToLeft(&rObjectCatalog, Size(nWidth * 0.25, nHeight * 0.35)); if (pPropertyBrowser) diff --git a/basctl/source/basicide/layout.cxx b/basctl/source/basicide/layout.cxx index 752f830ed89b..0f672e2a3a09 100644 --- a/basctl/source/basicide/layout.cxx +++ b/basctl/source/basicide/layout.cxx @@ -29,7 +29,7 @@ namespace basctl namespace { // the thickness of the splitting lines -static int const nSplitThickness = 3; +static long const nSplitThickness = 3; } // namespace // ctor for derived classes @@ -80,7 +80,7 @@ void Layout::ArrangeWindows () bInArrangeWindows = true; Size const aSize = GetOutputSizePixel(); - int const nWidth = aSize.Width(), nHeight = aSize.Height(); + long const nWidth = aSize.Width(), nHeight = aSize.Height(); if (nWidth && nHeight) // non-empty size { // On first call the derived classes initializes the sizes of the @@ -174,8 +174,8 @@ Layout::SplittedSide::SplittedSide (Layout* pParent, Side eSide) : // Add() -- adds a new window to the side (after construction) void Layout::SplittedSide::Add (DockingWindow* pWin, Size const& rSize) { - int const nSize1 = (bVertical ? rSize.Width() : rSize.Height()) + nSplitThickness; - int const nSize2 = bVertical ? rSize.Height() : rSize.Width(); + long const nSize1 = (bVertical ? rSize.Width() : rSize.Height()) + nSplitThickness; + long const nSize2 = bVertical ? rSize.Height() : rSize.Width(); // nSize if (nSize1 > nSize) nSize = nSize1; @@ -215,11 +215,11 @@ void Layout::SplittedSide::Remove (DockingWindow* pWin) // creating a Point or a Size object // The coordinate order depends on bVertical (reversed if true). -inline Size Layout::SplittedSide::MakeSize (int A, int B) const +inline Size Layout::SplittedSide::MakeSize (long A, long B) const { return bVertical ? Size(B, A) : Size(A, B); } -inline Point Layout::SplittedSide::MakePoint (int A, int B) const +inline Point Layout::SplittedSide::MakePoint (long A, long B) const { return bVertical ? Point(B, A) : Point(A, B); } @@ -240,7 +240,7 @@ bool Layout::SplittedSide::IsEmpty () const } // GetSize() -- returns the width or height of the strip (depending on the direction) -int Layout::SplittedSide::GetSize () const +long Layout::SplittedSide::GetSize () const { return IsEmpty() ? 0 : nSize; } @@ -253,13 +253,13 @@ void Layout::SplittedSide::ArrangeIn (Rectangle const& rRect) aRect = rRect; // the length of the side - int const nLength = bVertical ? aRect.GetSize().Height() : aRect.GetSize().Width(); - int const nOtherSize = bVertical ? aRect.GetSize().Width() : aRect.GetSize().Height(); + long const nLength = bVertical ? aRect.GetSize().Height() : aRect.GetSize().Width(); + long const nOtherSize = bVertical ? aRect.GetSize().Width() : aRect.GetSize().Height(); // bVertical ? horizontal pozition : vertical pozition - int const nPos1 = (bVertical ? aRect.Left() : aRect.Top()) + + long const nPos1 = (bVertical ? aRect.Left() : aRect.Top()) + (bLower ? 0 : nOtherSize - (nSize - nSplitThickness)); // bVertical ? vertical position : horizontal position - int const nPos2 = bVertical ? aRect.Top() : aRect.Left(); + long const nPos2 = bVertical ? aRect.Top() : aRect.Left(); // main line bool const bEmpty = IsEmpty(); @@ -282,7 +282,7 @@ void Layout::SplittedSide::ArrangeIn (Rectangle const& rRect) // positioning separator lines and windows bool bPrevDocking = false; // is the previous window docked? - int nStartPos = 0; // window position in the strip + long nStartPos = 0; // window position in the strip unsigned iLastWin; // index of last docking window in the strip // (iLastWin will be initialized if !bEmpty) for (unsigned i = 0; i != vItems.size(); ++i) @@ -380,16 +380,16 @@ IMPL_LINK(Layout::SplittedSide, SplitHdl, Splitter*, pSplitter) void Layout::SplittedSide::CheckMarginsFor (Splitter* pSplitter) { // The splitter line cannot be closer to the edges than nMargin pixels. - static int const nMargin = 16; + static long const nMargin = 16; // Checking margins: - if (int const nLength = pSplitter->IsHorizontal() ? + if (long const nLength = pSplitter->IsHorizontal() ? aRect.GetWidth() : aRect.GetHeight() ) { // bounds - int const nLower = (pSplitter->IsHorizontal() ? aRect.Left() : aRect.Top()) + nMargin; - int const nUpper = nLower + nLength - 2*nMargin; + long const nLower = (pSplitter->IsHorizontal() ? aRect.Left() : aRect.Top()) + nMargin; + long const nUpper = nLower + nLength - 2*nMargin; // split position - int const nPos = pSplitter->GetSplitPosPixel(); + long const nPos = pSplitter->GetSplitPosPixel(); // checking bounds if (nPos < nLower) pSplitter->SetSplitPosPixel(nLower); diff --git a/basctl/source/basicide/layout.hxx b/basctl/source/basicide/layout.hxx index 127f77e80f77..b65de961c5f9 100644 --- a/basctl/source/basicide/layout.hxx +++ b/basctl/source/basicide/layout.hxx @@ -67,7 +67,7 @@ protected: virtual void Resize (); virtual void DataChanged (DataChangedEvent const& rDCEvt); // new: - virtual void OnFirstSize (int nWidth, int nHeight) = 0; + virtual void OnFirstSize (long nWidth, long nHeight) = 0; private: // the main child window (either ModulWindow or DialogWindow) @@ -85,7 +85,7 @@ private: void Add (DockingWindow*, Size const&); void Remove (DockingWindow*); bool IsEmpty () const; - int GetSize () const; + long GetSize () const; void ArrangeIn (Rectangle const&); private: @@ -98,9 +98,9 @@ private: // rectangle to move in Rectangle aRect; // size (width or height) - int nSize; + long nSize; // last position (between Add()s) - int nLastPos; + long nLastPos; // the main splitting line Splitter aSplitter; // the dockable windows (and some data) @@ -113,15 +113,15 @@ private: // the window may fill the space of the adjacent currently // non-docking windows, but this change is not stored in these // variables. These change only when the splitter lines are moved. - int nStartPos, nEndPos; + long nStartPos, nEndPos; // splitter line window before the window // (the first one is always nullptr) boost::shared_ptr<Splitter> pSplit; }; std::vector<Item> vItems; private: - Point MakePoint (int, int) const; - Size MakeSize (int, int) const; + Point MakePoint (long, long) const; + Size MakeSize (long, long) const; private: static bool IsDocking (DockingWindow const&); private: diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index 9d3119817fa5..9dfb43182c94 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -1124,11 +1124,11 @@ void DlgEditor::ClearModifyFlag() namespace Print { - int const nLeftMargin = 1700; - int const nRightMargin = 900; - int const nTopMargin = 2000; - int const nBottomMargin = 1000; - int const nBorder = 300; + long const nLeftMargin = 1700; + long const nRightMargin = 900; + long const nTopMargin = 2000; + long const nBottomMargin = 1000; + long const nBorder = 300; } void lcl_PrintHeader( Printer* pPrinter, const ::rtl::OUString& rTitle ) // not working yet diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx index 5e389c54ed3c..9b239e53571b 100644 --- a/basctl/source/inc/baside3.hxx +++ b/basctl/source/inc/baside3.hxx @@ -140,7 +140,7 @@ public: virtual void UpdateDebug (bool){}; protected: // Layout: - virtual void OnFirstSize (int nWidth, int nHeight); + virtual void OnFirstSize (long nWidth, long nHeight); private: // child window |