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
|
namespace Print
|
||||||
{
|
{
|
||||||
int const nLeftMargin = 1700;
|
long const nLeftMargin = 1700;
|
||||||
int const nRightMargin = 900;
|
long const nRightMargin = 900;
|
||||||
int const nTopMargin = 2000;
|
long const nTopMargin = 2000;
|
||||||
int const nBottomMargin = 1000;
|
long const nBottomMargin = 1000;
|
||||||
int const nBorder = 300;
|
long const nBorder = 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
short const ValidWindow = 0x1234;
|
short const ValidWindow = 0x1234;
|
||||||
@@ -1558,7 +1558,7 @@ void ModulWindowLayout::BasicRemoveWatch ()
|
|||||||
aWatchWindow.RemoveSelectedWatch();
|
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));
|
AddToLeft(&rObjectCatalog, Size(nWidth * 0.20, nHeight * 0.75));
|
||||||
AddToBottom(&aWatchWindow, Size(nWidth * 0.67, nHeight * 0.25));
|
AddToBottom(&aWatchWindow, Size(nWidth * 0.67, nHeight * 0.25));
|
||||||
|
@@ -424,7 +424,7 @@ protected:
|
|||||||
// Window:
|
// Window:
|
||||||
virtual void Paint (const Rectangle& rRect);
|
virtual void Paint (const Rectangle& rRect);
|
||||||
// Layout:
|
// Layout:
|
||||||
virtual void OnFirstSize (int nWidth, int nHeight);
|
virtual void OnFirstSize (long nWidth, long nHeight);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// main child window
|
// 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));
|
AddToLeft(&rObjectCatalog, Size(nWidth * 0.25, nHeight * 0.35));
|
||||||
if (pPropertyBrowser)
|
if (pPropertyBrowser)
|
||||||
|
@@ -29,7 +29,7 @@ namespace basctl
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
// the thickness of the splitting lines
|
// the thickness of the splitting lines
|
||||||
static int const nSplitThickness = 3;
|
static long const nSplitThickness = 3;
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
// ctor for derived classes
|
// ctor for derived classes
|
||||||
@@ -80,7 +80,7 @@ void Layout::ArrangeWindows ()
|
|||||||
bInArrangeWindows = true;
|
bInArrangeWindows = true;
|
||||||
|
|
||||||
Size const aSize = GetOutputSizePixel();
|
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
|
if (nWidth && nHeight) // non-empty size
|
||||||
{
|
{
|
||||||
// On first call the derived classes initializes the sizes of the
|
// 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)
|
// Add() -- adds a new window to the side (after construction)
|
||||||
void Layout::SplittedSide::Add (DockingWindow* pWin, Size const& rSize)
|
void Layout::SplittedSide::Add (DockingWindow* pWin, Size const& rSize)
|
||||||
{
|
{
|
||||||
int const nSize1 = (bVertical ? rSize.Width() : rSize.Height()) + nSplitThickness;
|
long const nSize1 = (bVertical ? rSize.Width() : rSize.Height()) + nSplitThickness;
|
||||||
int const nSize2 = bVertical ? rSize.Height() : rSize.Width();
|
long const nSize2 = bVertical ? rSize.Height() : rSize.Width();
|
||||||
// nSize
|
// nSize
|
||||||
if (nSize1 > nSize)
|
if (nSize1 > nSize)
|
||||||
nSize = nSize1;
|
nSize = nSize1;
|
||||||
@@ -215,11 +215,11 @@ void Layout::SplittedSide::Remove (DockingWindow* pWin)
|
|||||||
|
|
||||||
// creating a Point or a Size object
|
// creating a Point or a Size object
|
||||||
// The coordinate order depends on bVertical (reversed if true).
|
// 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);
|
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);
|
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)
|
// 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;
|
return IsEmpty() ? 0 : nSize;
|
||||||
}
|
}
|
||||||
@@ -253,13 +253,13 @@ void Layout::SplittedSide::ArrangeIn (Rectangle const& rRect)
|
|||||||
aRect = rRect;
|
aRect = rRect;
|
||||||
|
|
||||||
// the length of the side
|
// the length of the side
|
||||||
int const nLength = bVertical ? aRect.GetSize().Height() : aRect.GetSize().Width();
|
long const nLength = bVertical ? aRect.GetSize().Height() : aRect.GetSize().Width();
|
||||||
int const nOtherSize = bVertical ? aRect.GetSize().Width() : aRect.GetSize().Height();
|
long const nOtherSize = bVertical ? aRect.GetSize().Width() : aRect.GetSize().Height();
|
||||||
// bVertical ? horizontal pozition : vertical pozition
|
// 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));
|
(bLower ? 0 : nOtherSize - (nSize - nSplitThickness));
|
||||||
// bVertical ? vertical position : horizontal position
|
// bVertical ? vertical position : horizontal position
|
||||||
int const nPos2 = bVertical ? aRect.Top() : aRect.Left();
|
long const nPos2 = bVertical ? aRect.Top() : aRect.Left();
|
||||||
|
|
||||||
// main line
|
// main line
|
||||||
bool const bEmpty = IsEmpty();
|
bool const bEmpty = IsEmpty();
|
||||||
@@ -282,7 +282,7 @@ void Layout::SplittedSide::ArrangeIn (Rectangle const& rRect)
|
|||||||
|
|
||||||
// positioning separator lines and windows
|
// positioning separator lines and windows
|
||||||
bool bPrevDocking = false; // is the previous window docked?
|
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
|
unsigned iLastWin; // index of last docking window in the strip
|
||||||
// (iLastWin will be initialized if !bEmpty)
|
// (iLastWin will be initialized if !bEmpty)
|
||||||
for (unsigned i = 0; i != vItems.size(); ++i)
|
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)
|
void Layout::SplittedSide::CheckMarginsFor (Splitter* pSplitter)
|
||||||
{
|
{
|
||||||
// The splitter line cannot be closer to the edges than nMargin pixels.
|
// The splitter line cannot be closer to the edges than nMargin pixels.
|
||||||
static int const nMargin = 16;
|
static long const nMargin = 16;
|
||||||
// Checking margins:
|
// Checking margins:
|
||||||
if (int const nLength = pSplitter->IsHorizontal() ?
|
if (long const nLength = pSplitter->IsHorizontal() ?
|
||||||
aRect.GetWidth() : aRect.GetHeight()
|
aRect.GetWidth() : aRect.GetHeight()
|
||||||
) {
|
) {
|
||||||
// bounds
|
// bounds
|
||||||
int const nLower = (pSplitter->IsHorizontal() ? aRect.Left() : aRect.Top()) + nMargin;
|
long const nLower = (pSplitter->IsHorizontal() ? aRect.Left() : aRect.Top()) + nMargin;
|
||||||
int const nUpper = nLower + nLength - 2*nMargin;
|
long const nUpper = nLower + nLength - 2*nMargin;
|
||||||
// split position
|
// split position
|
||||||
int const nPos = pSplitter->GetSplitPosPixel();
|
long const nPos = pSplitter->GetSplitPosPixel();
|
||||||
// checking bounds
|
// checking bounds
|
||||||
if (nPos < nLower)
|
if (nPos < nLower)
|
||||||
pSplitter->SetSplitPosPixel(nLower);
|
pSplitter->SetSplitPosPixel(nLower);
|
||||||
|
@@ -67,7 +67,7 @@ protected:
|
|||||||
virtual void Resize ();
|
virtual void Resize ();
|
||||||
virtual void DataChanged (DataChangedEvent const& rDCEvt);
|
virtual void DataChanged (DataChangedEvent const& rDCEvt);
|
||||||
// new:
|
// new:
|
||||||
virtual void OnFirstSize (int nWidth, int nHeight) = 0;
|
virtual void OnFirstSize (long nWidth, long nHeight) = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// the main child window (either ModulWindow or DialogWindow)
|
// the main child window (either ModulWindow or DialogWindow)
|
||||||
@@ -85,7 +85,7 @@ private:
|
|||||||
void Add (DockingWindow*, Size const&);
|
void Add (DockingWindow*, Size const&);
|
||||||
void Remove (DockingWindow*);
|
void Remove (DockingWindow*);
|
||||||
bool IsEmpty () const;
|
bool IsEmpty () const;
|
||||||
int GetSize () const;
|
long GetSize () const;
|
||||||
void ArrangeIn (Rectangle const&);
|
void ArrangeIn (Rectangle const&);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -98,9 +98,9 @@ private:
|
|||||||
// rectangle to move in
|
// rectangle to move in
|
||||||
Rectangle aRect;
|
Rectangle aRect;
|
||||||
// size (width or height)
|
// size (width or height)
|
||||||
int nSize;
|
long nSize;
|
||||||
// last position (between Add()s)
|
// last position (between Add()s)
|
||||||
int nLastPos;
|
long nLastPos;
|
||||||
// the main splitting line
|
// the main splitting line
|
||||||
Splitter aSplitter;
|
Splitter aSplitter;
|
||||||
// the dockable windows (and some data)
|
// the dockable windows (and some data)
|
||||||
@@ -113,15 +113,15 @@ private:
|
|||||||
// the window may fill the space of the adjacent currently
|
// the window may fill the space of the adjacent currently
|
||||||
// non-docking windows, but this change is not stored in these
|
// non-docking windows, but this change is not stored in these
|
||||||
// variables. These change only when the splitter lines are moved.
|
// variables. These change only when the splitter lines are moved.
|
||||||
int nStartPos, nEndPos;
|
long nStartPos, nEndPos;
|
||||||
// splitter line window before the window
|
// splitter line window before the window
|
||||||
// (the first one is always nullptr)
|
// (the first one is always nullptr)
|
||||||
boost::shared_ptr<Splitter> pSplit;
|
boost::shared_ptr<Splitter> pSplit;
|
||||||
};
|
};
|
||||||
std::vector<Item> vItems;
|
std::vector<Item> vItems;
|
||||||
private:
|
private:
|
||||||
Point MakePoint (int, int) const;
|
Point MakePoint (long, long) const;
|
||||||
Size MakeSize (int, int) const;
|
Size MakeSize (long, long) const;
|
||||||
private:
|
private:
|
||||||
static bool IsDocking (DockingWindow const&);
|
static bool IsDocking (DockingWindow const&);
|
||||||
private:
|
private:
|
||||||
|
@@ -1124,11 +1124,11 @@ void DlgEditor::ClearModifyFlag()
|
|||||||
|
|
||||||
namespace Print
|
namespace Print
|
||||||
{
|
{
|
||||||
int const nLeftMargin = 1700;
|
long const nLeftMargin = 1700;
|
||||||
int const nRightMargin = 900;
|
long const nRightMargin = 900;
|
||||||
int const nTopMargin = 2000;
|
long const nTopMargin = 2000;
|
||||||
int const nBottomMargin = 1000;
|
long const nBottomMargin = 1000;
|
||||||
int const nBorder = 300;
|
long const nBorder = 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcl_PrintHeader( Printer* pPrinter, const ::rtl::OUString& rTitle ) // not working yet
|
void lcl_PrintHeader( Printer* pPrinter, const ::rtl::OUString& rTitle ) // not working yet
|
||||||
|
@@ -140,7 +140,7 @@ public:
|
|||||||
virtual void UpdateDebug (bool){};
|
virtual void UpdateDebug (bool){};
|
||||||
protected:
|
protected:
|
||||||
// Layout:
|
// Layout:
|
||||||
virtual void OnFirstSize (int nWidth, int nHeight);
|
virtual void OnFirstSize (long nWidth, long nHeight);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// child window
|
// child window
|
||||||
|
Reference in New Issue
Block a user