basctl: int -> long for Point and Size
To be consequent, because Point and Size use long. Change-Id: I776a1839ee5d2cbdbcedad2b2922cb33b94c7b37
This commit is contained in:
committed by
Andras Timar
parent
19e7696b0f
commit
70d1b98a53
@@ -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));
|
||||
|
@@ -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
|
||||
|
@@ -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)
|
||||
|
@@ -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);
|
||||
|
@@ -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:
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user