summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-10-16 15:30:32 +0200
committerDavid Tardon <dtardon@redhat.com>2014-10-16 17:44:44 +0200
commit582ef22d3e8e30ffd58f092d37ffda30bd07bd9e (patch)
tree80c42b34da7e7ee05843b572f7311b3c230de9dd /sc
parentada4862afc3227b04c12960ded761db24f61257e (diff)
fdo#84854 it seems long is not enough on 32 bit
Fraction used BigInt internally for computations, rational does nothing like that. Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/column.hxx4
-rw-r--r--sc/inc/document.hxx6
-rw-r--r--sc/inc/editutil.hxx6
-rw-r--r--sc/inc/patattr.hxx4
-rw-r--r--sc/inc/rowheightcontext.hxx10
-rw-r--r--sc/inc/table.hxx6
-rw-r--r--sc/source/core/data/column2.cxx6
-rw-r--r--sc/source/core/data/dociter.cxx4
-rw-r--r--sc/source/core/data/documen8.cxx4
-rw-r--r--sc/source/core/data/document.cxx6
-rw-r--r--sc/source/core/data/drwlayer.cxx8
-rw-r--r--sc/source/core/data/patattr.cxx8
-rw-r--r--sc/source/core/data/rowheightcontext.cxx2
-rw-r--r--sc/source/core/data/table1.cxx6
-rw-r--r--sc/source/core/data/table2.cxx2
-rw-r--r--sc/source/filter/rtf/eeimpars.cxx2
-rw-r--r--sc/source/ui/app/client.cxx4
-rw-r--r--sc/source/ui/app/inputhdl.cxx2
-rw-r--r--sc/source/ui/cctrl/dpcontrol.cxx6
-rw-r--r--sc/source/ui/docshell/docfunc.cxx6
-rw-r--r--sc/source/ui/docshell/docsh.cxx2
-rw-r--r--sc/source/ui/docshell/docsh5.cxx4
-rw-r--r--sc/source/ui/drawfunc/fuins1.cxx2
-rw-r--r--sc/source/ui/inc/dpcontrol.hxx6
-rw-r--r--sc/source/ui/inc/drawutil.hxx4
-rw-r--r--sc/source/ui/inc/drawview.hxx8
-rw-r--r--sc/source/ui/inc/inputhdl.hxx6
-rw-r--r--sc/source/ui/inc/output.hxx8
-rw-r--r--sc/source/ui/inc/tabview.hxx2
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx2
-rw-r--r--sc/source/ui/inc/viewdata.hxx26
-rw-r--r--sc/source/ui/undo/undobase.cxx8
-rw-r--r--sc/source/ui/undo/undoblk3.cxx4
-rw-r--r--sc/source/ui/undo/undostyl.cxx2
-rw-r--r--sc/source/ui/unoobj/docuno.cxx4
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx8
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx4
-rw-r--r--sc/source/ui/vba/excelvbahelper.cxx2
-rw-r--r--sc/source/ui/view/drawutil.cxx8
-rw-r--r--sc/source/ui/view/drawvie4.cxx10
-rw-r--r--sc/source/ui/view/drawview.cxx10
-rw-r--r--sc/source/ui/view/gridwin.cxx4
-rw-r--r--sc/source/ui/view/gridwin3.cxx4
-rw-r--r--sc/source/ui/view/gridwin4.cxx6
-rw-r--r--sc/source/ui/view/output.cxx6
-rw-r--r--sc/source/ui/view/output2.cxx8
-rw-r--r--sc/source/ui/view/preview.cxx24
-rw-r--r--sc/source/ui/view/printfun.cxx8
-rw-r--r--sc/source/ui/view/tabview.cxx10
-rw-r--r--sc/source/ui/view/tabview2.cxx2
-rw-r--r--sc/source/ui/view/tabview3.cxx4
-rw-r--r--sc/source/ui/view/tabview5.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx6
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx20
-rw-r--r--sc/source/ui/view/tabvwsha.cxx4
-rw-r--r--sc/source/ui/view/tabvwshb.cxx10
-rw-r--r--sc/source/ui/view/tabvwshh.cxx8
-rw-r--r--sc/source/ui/view/viewdata.cxx46
-rw-r--r--sc/source/ui/view/viewfun2.cxx12
-rw-r--r--sc/source/ui/view/viewfun7.cxx2
-rw-r--r--sc/source/ui/view/viewfunc.cxx18
61 files changed, 218 insertions, 218 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 50204b310c99..560729b0887d 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -456,12 +456,12 @@ public:
long GetNeededSize(
SCROW nRow, OutputDevice* pDev, double nPPTX, double nPPTY,
- const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY,
+ const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY,
bool bWidth, const ScNeededSizeOptions& rOptions, const ScPatternAttr** pPatternChange ) const;
sal_uInt16 GetOptimalColWidth(
OutputDevice* pDev, double nPPTX, double nPPTY,
- const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY,
+ const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY,
bool bFormula, sal_uInt16 nOldWidth, const ScMarkData* pMarkData, const ScColWidthParam* pParam) const;
void GetOptimalHeight(
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 93f33bdc3cf3..9a796748cf6c 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1453,7 +1453,7 @@ public:
void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved,
OutputDevice* pDev,
double nPPTX, double nPPTY,
- const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY );
+ const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY );
bool IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllStyles ) const;
@@ -1521,7 +1521,7 @@ public:
sal_uInt16 GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev,
double nPPTX, double nPPTY,
- const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY,
+ const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY,
bool bFormula,
const ScMarkData* pMarkData = NULL,
const ScColWidthParam* pParam = NULL );
@@ -1534,7 +1534,7 @@ public:
long GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
OutputDevice* pDev,
double nPPTX, double nPPTY,
- const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY,
+ const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY,
bool bWidth, bool bTotalSize = false );
SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, bool bShow);
diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx
index d3f7b3be986d..9e564319fc2c 100644
--- a/sc/inc/editutil.hxx
+++ b/sc/inc/editutil.hxx
@@ -44,8 +44,8 @@ class ScEditUtil
OutputDevice* pDev; // MapMode has to be set
double nPPTX;
double nPPTY;
- boost::rational<long> aZoomX;
- boost::rational<long> aZoomY;
+ boost::rational<sal_Int64> aZoomX;
+ boost::rational<sal_Int64> aZoomY;
static const char pCalcDelimiters[];
@@ -82,7 +82,7 @@ public:
ScEditUtil( ScDocument* pDocument, SCCOL nX, SCROW nY, SCTAB nZ,
const Point& rScrPosPixel,
OutputDevice* pDevice, double nScaleX, double nScaleY,
- const boost::rational<long>& rX, const boost::rational<long>& rY ) :
+ const boost::rational<sal_Int64>& rX, const boost::rational<sal_Int64>& rY ) :
pDoc(pDocument),nCol(nX),nRow(nY),nTab(nZ),
aScrPos(rScrPosPixel),pDev(pDevice),
nPPTX(nScaleX),nPPTY(nScaleY),aZoomX(rX),aZoomY(rY) {}
diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx
index 66bdc7e50edb..0f72e0308aa7 100644
--- a/sc/inc/patattr.hxx
+++ b/sc/inc/patattr.hxx
@@ -84,14 +84,14 @@ public:
static void GetFont( vcl::Font& rFont, const SfxItemSet& rItemSet,
ScAutoFontColorMode eAutoMode,
OutputDevice* pOutDev = NULL,
- const boost::rational<long>* pScale = NULL,
+ const boost::rational<sal_Int64>* pScale = NULL,
const SfxItemSet* pCondSet = NULL,
sal_uInt8 nScript = 0, const Color* pBackConfigColor = NULL,
const Color* pTextConfigColor = NULL );
/** Fills a font object from the own item set. */
void GetFont( vcl::Font& rFont, ScAutoFontColorMode eAutoMode,
OutputDevice* pOutDev = NULL,
- const boost::rational<long>* pScale = NULL,
+ const boost::rational<sal_Int64>* pScale = NULL,
const SfxItemSet* pCondSet = NULL,
sal_uInt8 nScript = 0, const Color* pBackConfigColor = NULL,
const Color* pTextConfigColor = NULL ) const;
diff --git a/sc/inc/rowheightcontext.hxx b/sc/inc/rowheightcontext.hxx
index 0db012c4a263..816c53d0c88a 100644
--- a/sc/inc/rowheightcontext.hxx
+++ b/sc/inc/rowheightcontext.hxx
@@ -22,8 +22,8 @@ class SC_DLLPUBLIC RowHeightContext
{
double mfPPTX;
double mfPPTY;
- boost::rational<long> maZoomX;
- boost::rational<long> maZoomY;
+ boost::rational<sal_Int64> maZoomX;
+ boost::rational<sal_Int64> maZoomY;
OutputDevice* mpOutDev;
sal_uInt16 mnExtraHeight;
@@ -31,15 +31,15 @@ class SC_DLLPUBLIC RowHeightContext
public:
RowHeightContext(
- double fPPTX, double fPPTY, const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY,
+ double fPPTX, double fPPTY, const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY,
OutputDevice* pOutDev );
~RowHeightContext();
double getPPTX() const { return mfPPTX;}
double getPPTY() const { return mfPPTY;}
- const boost::rational<long>& getZoomX() const { return maZoomX;}
- const boost::rational<long>& getZoomY() const { return maZoomY;}
+ const boost::rational<sal_Int64>& getZoomX() const { return maZoomX;}
+ const boost::rational<sal_Int64>& getZoomY() const { return maZoomY;}
OutputDevice* getOutputDevice() { return mpOutDev;}
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index c59dc473aeb6..3b33c65007e7 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -637,7 +637,7 @@ public:
void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved,
OutputDevice* pDev,
double nPPTX, double nPPTY,
- const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY );
+ const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY );
bool IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllStyles ) const;
@@ -672,7 +672,7 @@ public:
sal_uInt16 GetOptimalColWidth( SCCOL nCol, OutputDevice* pDev,
double nPPTX, double nPPTY,
- const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY,
+ const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY,
bool bFormula, const ScMarkData* pMarkData,
const ScColWidthParam* pParam );
bool SetOptimalHeight(
@@ -686,7 +686,7 @@ public:
long GetNeededSize( SCCOL nCol, SCROW nRow,
OutputDevice* pDev,
double nPPTX, double nPPTY,
- const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY,
+ const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY,
bool bWidth, bool bTotalSize );
void SetColWidth( SCCOL nCol, sal_uInt16 nNewWidth );
void SetColWidthOnly( SCCOL nCol, sal_uInt16 nNewWidth );
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index fd05c65a46e8..ad9a45c65ef7 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -83,7 +83,7 @@ inline bool IsAmbiguousScript( sal_uInt8 nScript )
long ScColumn::GetNeededSize(
SCROW nRow, OutputDevice* pDev, double nPPTX, double nPPTY,
- const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY,
+ const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY,
bool bWidth, const ScNeededSizeOptions& rOptions,
const ScPatternAttr** ppPatternChange ) const
{
@@ -240,7 +240,7 @@ long ScColumn::GetNeededSize(
// bGetFont is set also if script type changes
if (rOptions.bGetFont)
{
- boost::rational<long> aFontZoom = ( eOrient == SVX_ORIENTATION_STANDARD ) ? rZoomX : rZoomY;
+ boost::rational<sal_Int64> aFontZoom = ( eOrient == SVX_ORIENTATION_STANDARD ) ? rZoomX : rZoomY;
vcl::Font aFont;
// font color doesn't matter here
pPattern->GetFont( aFont, SC_AUTOCOL_BLACK, pDev, &aFontZoom, pCondSet, nScript );
@@ -616,7 +616,7 @@ public:
}
sal_uInt16 ScColumn::GetOptimalColWidth(
- OutputDevice* pDev, double nPPTX, double nPPTY, const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY,
+ OutputDevice* pDev, double nPPTX, double nPPTY, const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY,
bool bFormula, sal_uInt16 nOldWidth, const ScMarkData* pMarkData, const ScColWidthParam* pParam) const
{
if (maCells.block_size() == 1 && maCells.begin()->type == sc::element_type_empty)
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 3613477e948a..3df2f13dc6ad 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -2544,7 +2544,7 @@ void ScDocRowHeightUpdater::update()
ScProgress aProgress(mrDoc.GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nCellCount);
- boost::rational<long> aZoom(1, 1);
+ boost::rational<sal_Int64> aZoom(1, 1);
itr = mpTabRangesArray->begin();
sal_uInt32 nProgressStart = 0;
sc::RowHeightContext aCxt(mfPPTX, mfPPTY, aZoom, aZoom, mpOutDev);
@@ -2582,7 +2582,7 @@ void ScDocRowHeightUpdater::updateAll()
ScProgress aProgress(mrDoc.GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nCellCount);
- boost::rational<long> aZoom(1, 1);
+ boost::rational<sal_Int64> aZoom(1, 1);
sc::RowHeightContext aCxt(mfPPTX, mfPPTY, aZoom, aZoom, mpOutDev);
sal_uLong nProgressStart = 0;
for (SCTAB nTab = 0; nTab < mrDoc.GetTableCount(); ++nTab)
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index a7ba4025851b..bc0b478ebea8 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -569,7 +569,7 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
}
sal_uInt16 nZoom = getScaleValue(*pStyle, ATTR_PAGE_SCALE);
- boost::rational<long> aZoomFract(nZoom, 100);
+ boost::rational<sal_Int64> aZoomFract(nZoom, 100);
// Start at specified cell position (nCol, nRow, nTab).
ScColumn* pCol = &pTab->aCol[aScope.Col()];
@@ -655,7 +655,7 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
if (getScaleValue(*pStyle, ATTR_PAGE_SCALETOPAGES) == 0)
{
nZoom = getScaleValue(*pStyle, ATTR_PAGE_SCALE);
- aZoomFract = boost::rational<long>(nZoom, 100);
+ aZoomFract = boost::rational<sal_Int64>(nZoom, 100);
}
else
nZoom = 0;
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index fb0c664ded76..9b0a3416a36f 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -3883,7 +3883,7 @@ sal_uLong ScDocument::GetRowOffset( SCROW nRow, SCTAB nTab, bool bHiddenAsZero )
sal_uInt16 ScDocument::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev,
double nPPTX, double nPPTY,
- const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY,
+ const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY,
bool bFormula, const ScMarkData* pMarkData,
const ScColWidthParam* pParam )
{
@@ -3897,7 +3897,7 @@ sal_uInt16 ScDocument::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice*
long ScDocument::GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
OutputDevice* pDev,
double nPPTX, double nPPTY,
- const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY,
+ const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY,
bool bWidth, bool bTotalSize )
{
if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
@@ -4594,7 +4594,7 @@ const ScStyleSheet* ScDocument::GetSelectionStyle( const ScMarkData& rMark ) con
void ScDocument::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved,
OutputDevice* pDev,
double nPPTX, double nPPTY,
- const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY )
+ const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY )
{
TableContainer::iterator it = maTabs.begin();
for (; it != maTabs.end(); ++it)
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index c1d2c8f6eccc..adcb84c68073 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -1421,19 +1421,19 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
long nWidthDiff = nDestWidth - nSourceWidth;
long nHeightDiff = nDestHeight - nSourceHeight;
- boost::rational<long> aHorFract(1,1);
- boost::rational<long> aVerFract(1,1);
+ boost::rational<sal_Int64> aHorFract(1,1);
+ boost::rational<sal_Int64> aVerFract(1,1);
bool bResize = false;
// sizes can differ by 1 from twips->1/100mm conversion for equal cell sizes,
// don't resize to empty size when pasting into hidden columns or rows
if ( std::abs(nWidthDiff) > 1 && nDestWidth > 1 && nSourceWidth > 1 )
{
- aHorFract = boost::rational<long>( nDestWidth, nSourceWidth );
+ aHorFract = boost::rational<sal_Int64>( nDestWidth, nSourceWidth );
bResize = true;
}
if ( std::abs(nHeightDiff) > 1 && nDestHeight > 1 && nSourceHeight > 1 )
{
- aVerFract = boost::rational<long>( nDestHeight, nSourceHeight );
+ aVerFract = boost::rational<sal_Int64>( nDestHeight, nSourceHeight );
bResize = true;
}
Point aRefPos = rDestRange.TopLeft(); // for resizing (after moving)
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index f0c6d478010a..a92c92925b04 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -216,7 +216,7 @@ SvxCellOrientation ScPatternAttr::GetCellOrientation( const SfxItemSet* pCondSet
void ScPatternAttr::GetFont(
vcl::Font& rFont, const SfxItemSet& rItemSet, ScAutoFontColorMode eAutoMode,
- OutputDevice* pOutDev, const boost::rational<long>* pScale,
+ OutputDevice* pOutDev, const boost::rational<sal_Int64>* pScale,
const SfxItemSet* pCondSet, sal_uInt8 nScript,
const Color* pBackConfigColor, const Color* pTextConfigColor )
{
@@ -376,7 +376,7 @@ void ScPatternAttr::GetFont(
if ( pOutDev != NULL )
{
Size aEffSize;
- boost::rational<long> aFraction( 1,1 );
+ boost::rational<sal_Int64> aFraction( 1,1 );
if (pScale)
aFraction = *pScale;
Size aSize( 0, (long) nFontHeight );
@@ -386,7 +386,7 @@ void ScPatternAttr::GetFont(
aEffSize = pOutDev->LogicToPixel( aSize, aSrcMode );
else
{
- boost::rational<long> aFractOne(1,1);
+ boost::rational<sal_Int64> aFractOne(1,1);
aDestMode.SetScaleX( aFractOne );
aDestMode.SetScaleY( aFractOne );
aEffSize = OutputDevice::LogicToLogic( aSize, aSrcMode, aDestMode );
@@ -482,7 +482,7 @@ void ScPatternAttr::GetFont(
void ScPatternAttr::GetFont(
vcl::Font& rFont, ScAutoFontColorMode eAutoMode,
- OutputDevice* pOutDev, const boost::rational<long>* pScale,
+ OutputDevice* pOutDev, const boost::rational<sal_Int64>* pScale,
const SfxItemSet* pCondSet, sal_uInt8 nScript,
const Color* pBackConfigColor, const Color* pTextConfigColor ) const
{
diff --git a/sc/source/core/data/rowheightcontext.cxx b/sc/source/core/data/rowheightcontext.cxx
index 46cce64908fc..43ca932c3ad8 100644
--- a/sc/source/core/data/rowheightcontext.cxx
+++ b/sc/source/core/data/rowheightcontext.cxx
@@ -12,7 +12,7 @@
namespace sc {
RowHeightContext::RowHeightContext(
- double fPPTX, double fPPTY, const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY,
+ double fPPTX, double fPPTY, const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY,
OutputDevice* pOutDev ) :
mfPPTX(fPPTX), mfPPTY(fPPTY),
maZoomX(rZoomX), maZoomY(rZoomY),
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 9917e110698d..0357e185c9b2 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -427,7 +427,7 @@ void ScTable::SetLink( sal_uInt8 nMode,
sal_uInt16 ScTable::GetOptimalColWidth( SCCOL nCol, OutputDevice* pDev,
double nPPTX, double nPPTY,
- const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY,
+ const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY,
bool bFormula, const ScMarkData* pMarkData,
const ScColWidthParam* pParam )
{
@@ -438,7 +438,7 @@ sal_uInt16 ScTable::GetOptimalColWidth( SCCOL nCol, OutputDevice* pDev,
long ScTable::GetNeededSize( SCCOL nCol, SCROW nRow,
OutputDevice* pDev,
double nPPTX, double nPPTY,
- const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY,
+ const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY,
bool bWidth, bool bTotalSize )
{
ScNeededSizeOptions aOptions;
@@ -1800,7 +1800,7 @@ void ScTable::MaybeAddExtraColumn(SCCOL& rCol, SCROW nRow, OutputDevice* pDev, d
aOptions.bFormula = bFormula;
aOptions.bSkipMerged = false;
- boost::rational<long> aZoom(1,1);
+ boost::rational<sal_Int64> aZoom(1,1);
nPixel = aCol[rCol].GetNeededSize(
nRow, pDev, nPPTX, nPPTY, aZoom, aZoom, true, aOptions, NULL );
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 98e512171259..2aa91d03e619 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -2542,7 +2542,7 @@ bool ScTable::IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllStyle
void ScTable::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved,
OutputDevice* pDev,
double nPPTX, double nPPTY,
- const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY )
+ const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY )
{
ScFlatBoolRowSegments aUsedRows;
for (SCCOL i = 0; i <= MAXCOL; ++i)
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index 1ba6ca2ad959..23b73968ba63 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -429,7 +429,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
}
DELETEZ( pProgress ); // SetOptimalHeight has its own ProgressBar
// Adjust line height, base is 100% zoom
- boost::rational<long> aZoom( 1, 1 );
+ boost::rational<sal_Int64> aZoom( 1, 1 );
// Factor is printer to display ratio
double nPPTX = ScGlobal::nScreenPPTX * boost::rational_cast<double>(aZoom) / nOutputFactor;
double nPPTY = ScGlobal::nScreenPPTY * boost::rational_cast<double>(aZoom);
diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx
index 8f33f7853e85..a9d7f740c51c 100644
--- a/sc/source/ui/app/client.cxx
+++ b/sc/source/ui/app/client.cxx
@@ -213,8 +213,8 @@ void ScClient::ViewChanged()
if (pDrawObj)
{
Rectangle aLogicRect = pDrawObj->GetLogicRect();
- boost::rational<long> aFractX = GetScaleWidth();
- boost::rational<long> aFractY = GetScaleHeight();
+ boost::rational<sal_Int64> aFractX = GetScaleWidth();
+ boost::rational<sal_Int64> aFractY = GetScaleHeight();
aFractX *= aVisSize.Width();
aFractY *= aVisSize.Height();
aVisSize = Size( boost::rational_cast<long>(aFractX), boost::rational_cast<long>(aFractY) ); // Scaled for Draw model
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 0dcc849ee080..1a8fb0f02c5b 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -569,7 +569,7 @@ ScInputHandler::~ScInputHandler()
delete pFormulaDataPara;
}
-void ScInputHandler::SetRefScale( const boost::rational<long>& rX, const boost::rational<long>& rY )
+void ScInputHandler::SetRefScale( const boost::rational<sal_Int64>& rX, const boost::rational<sal_Int64>& rY )
{
if ( rX != aScaleX || rY != aScaleY )
{
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index 02022a1d348d..2a2ad4207506 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -27,7 +27,7 @@
#include "docpool.hxx"
#include "patattr.hxx"
-ScDPFieldButton::ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pStyle, const boost::rational<long>* pZoomX, const boost::rational<long>* pZoomY, ScDocument* pDoc) :
+ScDPFieldButton::ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pStyle, const boost::rational<sal_Int64>* pZoomX, const boost::rational<sal_Int64>* pZoomY, ScDocument* pDoc) :
mpDoc(pDoc),
mpOutDev(pOutDev),
mpStyle(pStyle),
@@ -40,12 +40,12 @@ ScDPFieldButton::ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pSt
if (pZoomX)
maZoomX = *pZoomX;
else
- maZoomX = boost::rational<long>(1, 1);
+ maZoomX = boost::rational<sal_Int64>(1, 1);
if (pZoomY)
maZoomY = *pZoomY;
else
- maZoomY = boost::rational<long>(1, 1);
+ maZoomY = boost::rational<sal_Int64>(1, 1);
}
ScDPFieldButton::~ScDPFieldButton()
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index b3085442ce17..c117a62f342c 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -153,7 +153,7 @@ bool ScDocFunc::AdjustRowHeight( const ScRange& rRange, bool bPaint )
SCROW nEndRow = rRange.aEnd.Row();
ScSizeDeviceProvider aProv( &rDocShell );
- boost::rational<long> aOne(1,1);
+ boost::rational<sal_Int64> aOne(1,1);
sc::RowHeightContext aCxt(aProv.GetPPTX(), aProv.GetPPTY(), aOne, aOne, aProv.GetDevice());
bool bChanged = rDoc.SetOptimalHeight(aCxt, nStartRow, nEndRow, nTab);
@@ -3358,7 +3358,7 @@ static sal_uInt16 lcl_GetOptimalColWidth( ScDocShell& rDocShell, SCCOL nCol, SCT
double nPPTY = aProv.GetPPTY();
ScDocument& rDoc = rDocShell.GetDocument();
- boost::rational<long> aOne(1,1);
+ boost::rational<sal_Int64> aOne(1,1);
sal_uInt16 nTwips = rDoc.GetOptimalColWidth( nCol, nTab, pDev, nPPTX, nPPTY, aOne, aOne,
bFormula, NULL );
@@ -3451,7 +3451,7 @@ bool ScDocFunc::SetWidthOrHeight(
}
ScSizeDeviceProvider aProv( &rDocShell );
- boost::rational<long> aOne(1,1);
+ boost::rational<sal_Int64> aOne(1,1);
sc::RowHeightContext aCxt(aProv.GetPPTX(), aProv.GetPPTY(), aOne, aOne, aProv.GetDevice());
aCxt.setForceAutoSize(bAll);
rDoc.SetOptimalHeight(aCxt, nStartNo, nEndNo, nTab);
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 6b25a783e6fe..dd8f30091732 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -1457,7 +1457,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
CalcOutputFactor();
if ( bRet && (bSetColWidths || bSetRowHeights) )
{ // Adjust column width/row height; base 100% zoom
- boost::rational<long> aZoom( 1, 1 );
+ boost::rational<sal_Int64> aZoom( 1, 1 );
double nPPTX = ScGlobal::nScreenPPTX * boost::rational_cast<double>(aZoom) / GetOutputFactor(); // Factor is printer display ratio
double nPPTY = ScGlobal::nScreenPPTY * boost::rational_cast<double>(aZoom);
VirtualDevice aVirtDev;
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 88fc80417e9f..ff42c00eac26 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -368,7 +368,7 @@ void ScDocShell::CancelAutoDBRange()
bool ScDocShell::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab )
{
ScSizeDeviceProvider aProv(this);
- boost::rational<long> aZoom(1,1);
+ boost::rational<sal_Int64> aZoom(1,1);
sc::RowHeightContext aCxt(aProv.GetPPTX(), aProv.GetPPTY(), aZoom, aZoom, aProv.GetDevice());
bool bChange = aDocument.SetOptimalHeight(aCxt, nStartRow,nEndRow, nTab);
@@ -383,7 +383,7 @@ void ScDocShell::UpdateAllRowHeights( const ScMarkData* pTabMark )
// update automatic row heights
ScSizeDeviceProvider aProv(this);
- boost::rational<long> aZoom(1,1);
+ boost::rational<sal_Int64> aZoom(1,1);
sc::RowHeightContext aCxt(aProv.GetPPTX(), aProv.GetPPTY(), aZoom, aZoom, aProv.GetDevice());
aDocument.UpdateAllRowHeights(aCxt, pTabMark);
}
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index f8e5dfc35da5..51e34793bf55 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -131,7 +131,7 @@ static void lcl_InsertGraphic( const Graphic& rGraphic,
MapMode aDestMap( MAP_100TH_MM );
if ( aSourceMap.GetMapUnit() == MAP_PIXEL && pDrawView )
{
- boost::rational<long> aScaleX, aScaleY;
+ boost::rational<sal_Int64> aScaleX, aScaleY;
pDrawView->CalcNormScale( aScaleX, aScaleY );
aDestMap.SetScaleX(aScaleX);
aDestMap.SetScaleY(aScaleY);
diff --git a/sc/source/ui/inc/dpcontrol.hxx b/sc/source/ui/inc/dpcontrol.hxx
index 461c1100fca8..d92d02548b34 100644
--- a/sc/source/ui/inc/dpcontrol.hxx
+++ b/sc/source/ui/inc/dpcontrol.hxx
@@ -37,7 +37,7 @@ class ScDocument;
class ScDPFieldButton
{
public:
- ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pStyle, const boost::rational<long>* pZoomX = NULL, const boost::rational<long>* pZoomY = NULL,
+ ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pStyle, const boost::rational<sal_Int64>* pZoomX = NULL, const boost::rational<sal_Int64>* pZoomY = NULL,
ScDocument* pDoc = NULL);
~ScDPFieldButton();
@@ -59,8 +59,8 @@ private:
Point maPos;
Size maSize;
OUString maText;
- boost::rational<long> maZoomX;
- boost::rational<long> maZoomY;
+ boost::rational<sal_Int64> maZoomX;
+ boost::rational<sal_Int64> maZoomY;
ScDocument* mpDoc;
OutputDevice* mpOutDev;
const StyleSettings* mpStyle;
diff --git a/sc/source/ui/inc/drawutil.hxx b/sc/source/ui/inc/drawutil.hxx
index 15ef550ee0db..b981373ff8c3 100644
--- a/sc/source/ui/inc/drawutil.hxx
+++ b/sc/source/ui/inc/drawutil.hxx
@@ -32,9 +32,9 @@ class ScDrawUtil
public:
static void CalcScale( ScDocument* pDoc, SCTAB nTab,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
- OutputDevice* pDev, const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY,
+ OutputDevice* pDev, const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY,
double nPPTX, double nPPTY,
- boost::rational<long>& rScaleX, boost::rational<long>& rScaleY );
+ boost::rational<sal_Int64>& rScaleX, boost::rational<sal_Int64>& rScaleY );
};
#endif
diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx
index 923af0f9a0fd..5f4f5e7ba315 100644
--- a/sc/source/ui/inc/drawview.hxx
+++ b/sc/source/ui/inc/drawview.hxx
@@ -37,8 +37,8 @@ class ScDrawView: public FmFormView
OutputDevice* pDev; //! needed ?
ScDocument* pDoc;
SCTAB nTab;
- boost::rational<long> aScaleX; // Factor for Drawing-MapMode
- boost::rational<long> aScaleY;
+ boost::rational<sal_Int64> aScaleX; // Factor for Drawing-MapMode
+ boost::rational<sal_Int64> aScaleY;
SdrDropMarkerOverlay* pDropMarker;
SdrObject* pDropMarkObj;
bool bInConstruct;
@@ -94,12 +94,12 @@ public:
void DoCut();
void DoCopy();
- void GetScale( boost::rational<long>& rFractX, boost::rational<long>& rFractY ) const;
+ void GetScale( boost::rational<sal_Int64>& rFractX, boost::rational<sal_Int64>& rFractY ) const;
void RecalcScale();
void UpdateWorkArea();
SCTAB GetTab() const { return nTab; }
- void CalcNormScale( boost::rational<long>& rFractX, boost::rational<long>& rFractY ) const;
+ void CalcNormScale( boost::rational<sal_Int64>& rFractX, boost::rational<sal_Int64>& rFractY ) const;
void SetPageAnchored();
void SetCellAnchored();
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index dd8752a5c52d..ea2375036fb0 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -102,8 +102,8 @@ private:
sal_uLong nValidation;
SvxCellHorJustify eAttrAdjust;
- boost::rational<long> aScaleX; // for ref MapMode
- boost::rational<long> aScaleY;
+ boost::rational<sal_Int64> aScaleX; // for ref MapMode
+ boost::rational<sal_Int64> aScaleY;
ScTabViewShell* pRefViewSh;
ScTabViewShell* pActiveViewSh;
@@ -209,7 +209,7 @@ public:
void ShowTip( const OUString& rText ); // at Cursor
void ShowTipBelow( const OUString& rText );
- void SetRefScale( const boost::rational<long>& rX, const boost::rational<long>& rY );
+ void SetRefScale( const boost::rational<sal_Int64>& rX, const boost::rational<sal_Int64>& rY );
void UpdateRefDevice();
EditView* GetActiveView();
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index dd42cd8fe737..8ecdfd29a0d3 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -164,8 +164,8 @@ private:
ScOutputType eType; // Screen/Printer ...
double mnPPTX; // Pixel per Twips
double mnPPTY;
- boost::rational<long> aZoomX;
- boost::rational<long> aZoomY;
+ boost::rational<sal_Int64> aZoomX;
+ boost::rational<sal_Int64> aZoomY;
SdrObject* pEditObj; // Omit when painting
@@ -262,8 +262,8 @@ public:
SCTAB nNewTab, long nNewScrX, long nNewScrY,
SCCOL nNewX1, SCROW nNewY1, SCCOL nNewX2, SCROW nNewY2,
double nPixelPerTwipsX, double nPixelPerTwipsY,
- const boost::rational<long>* pZoomX = NULL,
- const boost::rational<long>* pZoomY = NULL );
+ const boost::rational<sal_Int64>* pZoomX = NULL,
+ const boost::rational<sal_Int64>* pZoomY = NULL );
~ScOutputData();
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 1cbb87afec6a..d3e29b3e98b9 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -298,7 +298,7 @@ public:
* @param bSameTabButMoved true if the same sheet as before is activated.
*/
void TabChanged( bool bSameTabButMoved = false );
- void SetZoom( const boost::rational<long>& rNewX, const boost::rational<long>& rNewY, bool bAll );
+ void SetZoom( const boost::rational<sal_Int64>& rNewX, const boost::rational<sal_Int64>& rNewY, bool bAll );
SC_DLLPUBLIC void RefreshZoom();
void SetPagebreakMode( bool bSet );
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 053a1e9053e6..d7eb2a8a728f 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -208,7 +208,7 @@ protected:
virtual void InnerResizePixel( const Point &rOfs, const Size &rSize ) SAL_OVERRIDE; // neu
virtual void OuterResizePixel( const Point &rOfs, const Size &rSize ) SAL_OVERRIDE;
- virtual void SetZoomFactor( const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY ) SAL_OVERRIDE;
+ virtual void SetZoomFactor( const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY ) SAL_OVERRIDE;
virtual void QueryObjAreaPixel( Rectangle& rRect ) const SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index 1505f4dd0ab8..85d5946a5836 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -109,10 +109,10 @@ class ScViewDataTable // per-sheet data
friend class ScViewData;
private:
SvxZoomType eZoomType; // selected zoom type (normal view)
- boost::rational<long> aZoomX; // selected zoom X
- boost::rational<long> aZoomY; // selected zoom Y (displayed)
- boost::rational<long> aPageZoomX; // zoom in page break preview mode
- boost::rational<long> aPageZoomY;
+ boost::rational<sal_Int64> aZoomX; // selected zoom X
+ boost::rational<sal_Int64> aZoomY; // selected zoom Y (displayed)
+ boost::rational<sal_Int64> aPageZoomX; // zoom in page break preview mode
+ boost::rational<sal_Int64> aPageZoomY;
long nTPosX[2]; // MapMode - Offset (Twips)
long nTPosY[2];
@@ -174,10 +174,10 @@ private:
MapMode aLogicMode; // skalierter 1/100mm-MapMode
SvxZoomType eDefZoomType; // default zoom and type for missing TabData
- boost::rational<long> aDefZoomX;
- boost::rational<long> aDefZoomY;
- boost::rational<long> aDefPageZoomX; // zoom in page break preview mode
- boost::rational<long> aDefPageZoomY;
+ boost::rational<sal_Int64> aDefZoomX;
+ boost::rational<sal_Int64> aDefZoomY;
+ boost::rational<sal_Int64> aDefPageZoomX; // zoom in page break preview mode
+ boost::rational<sal_Int64> aDefPageZoomY;
ScRefType eRefType;
@@ -305,15 +305,15 @@ public:
void SetZoomType( SvxZoomType eNew, bool bAll );
void SetZoomType( SvxZoomType eNew, std::vector< SCTAB >& tabs );
- void SetZoom( const boost::rational<long>& rNewX, const boost::rational<long>& rNewY, std::vector< SCTAB >& tabs );
- void SetZoom( const boost::rational<long>& rNewX, const boost::rational<long>& rNewY, bool bAll );
+ void SetZoom( const boost::rational<sal_Int64>& rNewX, const boost::rational<sal_Int64>& rNewY, std::vector< SCTAB >& tabs );
+ void SetZoom( const boost::rational<sal_Int64>& rNewX, const boost::rational<sal_Int64>& rNewY, bool bAll );
void RefreshZoom();
void SetSelCtrlMouseClick( bool bTmp ) { bSelCtrlMouseClick = bTmp; }
SvxZoomType GetZoomType() const { return pThisTab->eZoomType; }
- const boost::rational<long>& GetZoomX() const { return bPagebreak ? pThisTab->aPageZoomX : pThisTab->aZoomX; }
- const boost::rational<long>& GetZoomY() const { return bPagebreak ? pThisTab->aPageZoomY : pThisTab->aZoomY; }
+ const boost::rational<sal_Int64>& GetZoomX() const { return bPagebreak ? pThisTab->aPageZoomX : pThisTab->aZoomX; }
+ const boost::rational<sal_Int64>& GetZoomY() const { return bPagebreak ? pThisTab->aPageZoomY : pThisTab->aZoomY; }
void SetShowGrid( bool bShow );
bool GetShowGrid() const { return pThisTab->bShowGrid; }
@@ -446,7 +446,7 @@ public:
void SetScreen( const Rectangle& rVisArea );
void SetScreenPos( const Point& rVisAreaStart );
- void UpdateScreenZoom( const boost::rational<long>& rNewX, const boost::rational<long>& rNewY );
+ void UpdateScreenZoom( const boost::rational<sal_Int64>& rNewX, const boost::rational<sal_Int64>& rNewY );
Size GetScrSize() const { return aScrSize; }
diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx
index 23bb99345fda..ec0f98366b0d 100644
--- a/sc/source/ui/undo/undobase.cxx
+++ b/sc/source/ui/undo/undobase.cxx
@@ -258,8 +258,8 @@ bool ScBlockUndo::AdjustHeight()
ScDocument& rDoc = pDocShell->GetDocument();
VirtualDevice aVirtDev;
- boost::rational<long> aZoomX( 1, 1 );
- boost::rational<long> aZoomY = aZoomX;
+ boost::rational<sal_Int64> aZoomX( 1, 1 );
+ boost::rational<sal_Int64> aZoomY = aZoomX;
double nPPTX, nPPTY;
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
@@ -356,8 +356,8 @@ void ScMultiBlockUndo::AdjustHeight()
ScDocument& rDoc = pDocShell->GetDocument();
VirtualDevice aVirtDev;
- boost::rational<long> aZoomX( 1, 1 );
- boost::rational<long> aZoomY = aZoomX;
+ boost::rational<sal_Int64> aZoomX( 1, 1 );
+ boost::rational<sal_Int64> aZoomY = aZoomX;
double nPPTX, nPPTY;
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 661b43495c61..f172f0015c89 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -842,8 +842,8 @@ void ScUndoAutoFormat::Redo()
if (bSize)
{
VirtualDevice aVirtDev;
- boost::rational<long> aZoomX(1,1);
- boost::rational<long> aZoomY = aZoomX;
+ boost::rational<sal_Int64> aZoomX(1,1);
+ boost::rational<sal_Int64> aZoomY = aZoomX;
double nPPTX,nPPTY;
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx
index 01bfc89a1705..d0693deb84d0 100644
--- a/sc/source/ui/undo/undostyl.cxx
+++ b/sc/source/ui/undo/undostyl.cxx
@@ -110,7 +110,7 @@ static void lcl_DocStyleChanged( ScDocument* pDoc, SfxStyleSheetBase* pStyle, bo
Point aLogic = aVDev.LogicToPixel( Point(1000,1000), MAP_TWIP );
double nPPTX = aLogic.X() / 1000.0;
double nPPTY = aLogic.Y() / 1000.0;
- boost::rational<long> aZoom(1,1);
+ boost::rational<sal_Int64> aZoom(1,1);
pDoc->StyleSheetChanged( pStyle, bRemoved, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
ScInputHandler* pHdl = SC_MOD()->GetInputHdl();
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 314dddb7ef79..69fea9aeb38a 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1283,8 +1283,8 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
// Scale and move the target rectangle from aLocationMM to aLocationPixel,
// to get the target rectangle in pixels.
- boost::rational<long> aScaleX( aLocationPixel.GetWidth(), aLocationMM.GetWidth() );
- boost::rational<long> aScaleY( aLocationPixel.GetHeight(), aLocationMM.GetHeight() );
+ boost::rational<sal_Int64> aScaleX( aLocationPixel.GetWidth(), aLocationMM.GetWidth() );
+ boost::rational<sal_Int64> aScaleY( aLocationPixel.GetHeight(), aLocationMM.GetHeight() );
long nX1 = aLocationPixel.Left() + boost::rational_cast<long>( (aTargetRect.Left() - aLocationMM.Left()) * aScaleX );
long nX2 = aLocationPixel.Left() + boost::rational_cast<long>( (aTargetRect.Right() - aLocationMM.Left()) * aScaleX );
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 0817ec8ae23a..ee4288c9e00d 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -758,7 +758,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const OUString& aName )
Point aLogic = aVDev.LogicToPixel( Point(1000,1000), MAP_TWIP );
double nPPTX = aLogic.X() / 1000.0;
double nPPTY = aLogic.Y() / 1000.0;
- boost::rational<long> aZoom(1,1);
+ boost::rational<sal_Int64> aZoom(1,1);
rDoc.StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT );
pDocShell->SetDocumentModified();
@@ -1100,7 +1100,7 @@ void SAL_CALL ScStyleObj::setParentStyle( const OUString& rParentStyle )
Point aLogic = aVDev.LogicToPixel( Point(1000,1000), MAP_TWIP );
double nPPTX = aLogic.X() / 1000.0;
double nPPTY = aLogic.Y() / 1000.0;
- boost::rational<long> aZoom(1,1);
+ boost::rational<sal_Int64> aZoom(1,1);
rDoc.StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT );
@@ -1464,7 +1464,7 @@ void SAL_CALL ScStyleObj::setAllPropertiesToDefault()
Point aLogic = aVDev.LogicToPixel( Point(1000,1000), MAP_TWIP );
double nPPTX = aLogic.X() / 1000.0;
double nPPTY = aLogic.Y() / 1000.0;
- boost::rational<long> aZoom(1,1);
+ boost::rational<sal_Int64> aZoom(1,1);
rDoc.StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT );
@@ -1843,7 +1843,7 @@ void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxIt
Point aLogic = aVDev.LogicToPixel( Point(1000,1000), MAP_TWIP );
double nPPTX = aLogic.X() / 1000.0;
double nPPTY = aLogic.Y() / 1000.0;
- boost::rational<long> aZoom(1,1);
+ boost::rational<sal_Int64> aZoom(1,1);
rDoc.StyleSheetChanged( pStyle, false, &aVDev, nPPTX, nPPTY, aZoom, aZoom );
pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID|PAINT_LEFT );
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index dfd80686a17b..bd90b6c5c184 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -1446,7 +1446,7 @@ sal_Int16 ScTabViewObj::GetZoom(void) const
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
{
- const boost::rational<long>& rZoomY = pViewSh->GetViewData().GetZoomY(); // Y wird angezeigt
+ const boost::rational<sal_Int64>& rZoomY = pViewSh->GetViewData().GetZoomY(); // Y wird angezeigt
return (sal_Int16)(( rZoomY.numerator() * 100 ) / rZoomY.denominator());
}
return 0;
@@ -1468,7 +1468,7 @@ void ScTabViewObj::SetZoom(sal_Int16 nZoom)
pScMod->SetAppOptions( aNewOpt );
}
}
- boost::rational<long> aFract( nZoom, 100 );
+ boost::rational<sal_Int64> aFract( nZoom, 100 );
pViewSh->SetZoom( aFract, aFract, true );
pViewSh->PaintGrid();
pViewSh->PaintTop();
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index 3771b6fcd3c9..6e76bfb47930 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -97,7 +97,7 @@ getUnoSheetModuleObj( const uno::Reference< table::XCellRange >& xRange ) throw
void implSetZoom( const uno::Reference< frame::XModel >& xModel, sal_Int16 nZoom, std::vector< SCTAB >& nTabs )
{
ScTabViewShell* pViewSh = excel::getBestViewShell( xModel );
- boost::rational<long> aFract( nZoom, 100 );
+ boost::rational<sal_Int64> aFract( nZoom, 100 );
pViewSh->GetViewData().SetZoom( aFract, aFract, nTabs );
pViewSh->RefreshZoom();
}
diff --git a/sc/source/ui/view/drawutil.cxx b/sc/source/ui/view/drawutil.cxx
index 21840f50ffaf..ff6bacbb85f8 100644
--- a/sc/source/ui/view/drawutil.cxx
+++ b/sc/source/ui/view/drawutil.cxx
@@ -27,9 +27,9 @@
void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
OutputDevice* pDev,
- const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY,
+ const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY,
double nPPTX, double nPPTY,
- boost::rational<long>& rScaleX, boost::rational<long>& rScaleY )
+ boost::rational<sal_Int64>& rScaleX, boost::rational<sal_Int64>& rScaleY )
{
long nPixelX = 0;
long nTwipsX = 0;
@@ -69,7 +69,7 @@ void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab,
((double)HMM_PER_TWIPS) /
((double)rZoomX.denominator()) );
else
- rScaleX = boost::rational<long>( 1, 1 );
+ rScaleX = boost::rational<sal_Int64>( 1, 1 );
if ( aPixelLog.Y() && nTwipsY )
rScaleY = rational_FromDouble( ((double)aPixelLog.Y()) *
@@ -78,7 +78,7 @@ void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab,
((double)HMM_PER_TWIPS) /
((double)rZoomY.denominator()) );
else
- rScaleY = boost::rational<long>( 1, 1 );
+ rScaleY = boost::rational<sal_Int64>( 1, 1 );
// 25 bits of accuracy are needed to always hit the right part of
// cells in the last rows (was 17 before 1M rows).
diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index 6a8add5ccc4e..178d8b92e5a5 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -437,7 +437,7 @@ uno::Reference<datatransfer::XTransferable> ScDrawView::CopyToTransferable()
// Korrektur fuer 100% berechnen, unabhaengig von momentanen Einstellungen
-void ScDrawView::CalcNormScale( boost::rational<long>& rFractX, boost::rational<long>& rFractY ) const
+void ScDrawView::CalcNormScale( boost::rational<sal_Int64>& rFractX, boost::rational<sal_Int64>& rFractY ) const
{
double nPPTX = ScGlobal::nScreenPPTX;
double nPPTY = ScGlobal::nScreenPPTY;
@@ -453,7 +453,7 @@ void ScDrawView::CalcNormScale( boost::rational<long>& rFractX, boost::rational<
if (nEndRow<20)
nEndRow = 1000;
- boost::rational<long> aZoom(1,1);
+ boost::rational<sal_Int64> aZoom(1,1);
ScDrawUtil::CalcScale( pDoc, nTab, 0,0, nEndCol,nEndRow, pDev, aZoom,aZoom,
nPPTX, nPPTY, rFractX,rFractY );
}
@@ -513,7 +513,7 @@ void ScDrawView::SetMarkedOriginalSize()
{
// Pixel-Korrektur beruecksichtigen, damit Bitmap auf dem Bildschirm stimmt
- boost::rational<long> aNormScaleX, aNormScaleY;
+ boost::rational<sal_Int64> aNormScaleX, aNormScaleY;
CalcNormScale( aNormScaleX, aNormScaleY );
aDestMap.SetScaleX(aNormScaleX);
aDestMap.SetScaleY(aNormScaleY);
@@ -535,8 +535,8 @@ void ScDrawView::SetMarkedOriginalSize()
Rectangle aDrawRect = pObj->GetLogicRect();
pUndoGroup->AddAction( new SdrUndoGeoObj( *pObj ) );
- pObj->Resize( aDrawRect.TopLeft(), boost::rational<long>( aOriginalSize.Width(), aDrawRect.GetWidth() ),
- boost::rational<long>( aOriginalSize.Height(), aDrawRect.GetHeight() ) );
+ pObj->Resize( aDrawRect.TopLeft(), boost::rational<sal_Int64>( aOriginalSize.Width(), aDrawRect.GetWidth() ),
+ boost::rational<sal_Int64>( aOriginalSize.Height(), aDrawRect.GetHeight() ) );
++nDone;
}
}
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 00e31a2910d0..e6d6762714e8 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -286,7 +286,7 @@ void ScDrawView::DoCut()
EndUndo();
}
-void ScDrawView::GetScale( boost::rational<long>& rFractX, boost::rational<long>& rFractY ) const
+void ScDrawView::GetScale( boost::rational<sal_Int64>& rFractX, boost::rational<sal_Int64>& rFractY ) const
{
rFractX = aScaleX;
rFractY = aScaleY;
@@ -296,8 +296,8 @@ void ScDrawView::RecalcScale()
{
double nPPTX;
double nPPTY;
- boost::rational<long> aZoomX(1,1);
- boost::rational<long> aZoomY(1,1);
+ boost::rational<sal_Int64> aZoomX(1,1);
+ boost::rational<sal_Int64> aZoomY(1,1);
if (pViewData)
{
@@ -614,8 +614,8 @@ void ScDrawView::UpdateUserViewOptions()
SetSnapEnabled( rGrid.GetUseGridSnap() );
SetGridSnap( rGrid.GetUseGridSnap() );
- boost::rational<long> aFractX( rGrid.GetFldDrawX(), rGrid.GetFldDivisionX() + 1 );
- boost::rational<long> aFractY( rGrid.GetFldDrawY(), rGrid.GetFldDivisionY() + 1 );
+ boost::rational<sal_Int64> aFractX( rGrid.GetFldDrawX(), rGrid.GetFldDivisionX() + 1 );
+ boost::rational<sal_Int64> aFractY( rGrid.GetFldDrawY(), rGrid.GetFldDivisionY() + 1 );
SetSnapGridWidth( aFractX, aFractY );
SetGridCoarse( Size( rGrid.GetFldDrawX(), rGrid.GetFldDrawY() ) );
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 7fd9bdec0ab5..1072cdcc8fc3 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -4625,8 +4625,8 @@ void ScGridWindow::UpdateFormulas()
ScTableInfo aTabInfo;
rDoc.FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nTab, nPPTX, nPPTY, false, false );
- boost::rational<long> aZoomX = pViewData->GetZoomX();
- boost::rational<long> aZoomY = pViewData->GetZoomY();
+ boost::rational<sal_Int64> aZoomX = pViewData->GetZoomX();
+ boost::rational<sal_Int64> aZoomY = pViewData->GetZoomY();
ScOutputData aOutputData( this, OUTTYPE_WINDOW, aTabInfo, &rDoc, nTab,
nScrX, nScrY, nX1, nY1, nX2, nY2, nPPTX, nPPTY,
&aZoomX, &aZoomY );
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index 9cbaa2a9139b..ff197ac94417 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -247,8 +247,8 @@ MapMode ScGridWindow::GetDrawMapMode( bool bForce )
ScDrawView* pDrView = pViewData->GetView()->GetScDrawView();
if ( pDrView || bForce )
{
- boost::rational<long> aScaleX;
- boost::rational<long> aScaleY;
+ boost::rational<sal_Int64> aScaleX;
+ boost::rational<sal_Int64> aScaleY;
if (pDrView)
pDrView->GetScale( aScaleX, aScaleY );
else
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 56f35ecb4496..8ef8b7f21ed1 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -77,7 +77,7 @@ static void lcl_LimitRect( Rectangle& rRect, const Rectangle& rVisible )
static void lcl_DrawOneFrame( OutputDevice* pDev, const Rectangle& rInnerPixel,
const OUString& rTitle, const Color& rColor, bool bTextBelow,
- double nPPTX, double nPPTY, const boost::rational<long>& rZoomY,
+ double nPPTX, double nPPTY, const boost::rational<sal_Int64>& rZoomY,
ScDocument* pDoc, ScViewData* pButtonViewData, bool bLayoutRTL )
{
// pButtonViewData wird nur benutzt, um die Button-Groesse zu setzen,
@@ -470,8 +470,8 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
nPPTX, nPPTY, false, bFormulaMode,
&pViewData->GetMarkData() );
- boost::rational<long> aZoomX = pViewData->GetZoomX();
- boost::rational<long> aZoomY = pViewData->GetZoomY();
+ boost::rational<sal_Int64> aZoomX = pViewData->GetZoomX();
+ boost::rational<sal_Int64> aZoomY = pViewData->GetZoomY();
ScOutputData aOutputData( this, OUTTYPE_WINDOW, aTabInfo, &rDoc, nTab,
nScrX, nScrY, nX1, nY1, nX2, nY2, nPPTX, nPPTY,
&aZoomX, &aZoomY );
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 617288e69ef2..09b6cca4c03b 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -145,7 +145,7 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType,
SCTAB nNewTab, long nNewScrX, long nNewScrY,
SCCOL nNewX1, SCROW nNewY1, SCCOL nNewX2, SCROW nNewY2,
double nPixelPerTwipsX, double nPixelPerTwipsY,
- const boost::rational<long>* pZoomX, const boost::rational<long>* pZoomY ) :
+ const boost::rational<sal_Int64>* pZoomX, const boost::rational<sal_Int64>* pZoomY ) :
mpDev( pNewDev ),
mpRefDevice( pNewDev ), // default is output device
pFmtDevice( pNewDev ), // default is output device
@@ -193,11 +193,11 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType,
if (pZoomX)
aZoomX = *pZoomX;
else
- aZoomX = boost::rational<long>(1,1);
+ aZoomX = boost::rational<sal_Int64>(1,1);
if (pZoomY)
aZoomY = *pZoomY;
else
- aZoomY = boost::rational<long>(1,1);
+ aZoomY = boost::rational<sal_Int64>(1,1);
nVisX1 = nX1;
nVisY1 = nY1;
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index a5a9af577aae..2e0004692f62 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -231,7 +231,7 @@ void ScDrawStringsVars::SetShrinkScale( long nScale, sal_uInt8 nScript )
// call GetFont with a modified fraction, use only the height
- boost::rational<long> aFraction( nScale, 100 );
+ boost::rational<sal_Int64> aFraction( nScale, 100 );
if ( !bPixelToLogic )
aFraction *= pOutput->aZoomY;
vcl::Font aTmpFont;
@@ -2787,7 +2787,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
// #i85342# screen display and formatting for printer,
// use same GetEditArea call as in ScViewData::SetEditEngine
- boost::rational<long> aFract(1,1);
+ boost::rational<sal_Int64> aFract(1,1);
Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice,
HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( rParam.mpPattern, false );
aLogicSize.Width() = aUtilRect.GetWidth();
@@ -3809,7 +3809,7 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam)
// #i85342# screen display and formatting for printer,
// use same GetEditArea call as in ScViewData::SetEditEngine
- boost::rational<long> aFract(1,1);
+ boost::rational<sal_Int64> aFract(1,1);
Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice,
HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( rParam.mpPattern, false );
aLogicSize.Width() = aUtilRect.GetWidth();
@@ -4165,7 +4165,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
// #i85342# screen display and formatting for printer,
// use same GetEditArea call as in ScViewData::SetEditEngine
- boost::rational<long> aFract(1,1);
+ boost::rational<sal_Int64> aFract(1,1);
Rectangle aUtilRect = ScEditUtil( mpDoc, rParam.mnCellX, rParam.mnCellY, nTab, Point(0,0), pFmtDevice,
HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( rParam.mpPattern, false );
aLogicSize.Width() = aUtilRect.GetWidth();
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index ab843eec4a89..b56323ab60ff 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -344,8 +344,8 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
UpdateDrawView(); // Spreedsheet eventually changes
}
- boost::rational<long> aPreviewZoom( nZoom, 100 );
- boost::rational<long> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
+ boost::rational<sal_Int64> aPreviewZoom( nZoom, 100 );
+ boost::rational<sal_Int64> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
bool bDoPrint = ( pFillLocation == NULL );
@@ -732,8 +732,8 @@ void ScPreview::SetZoom(sal_uInt16 nNewZoom)
// apply new MapMode and call UpdateScrollBars to update aOffset
- boost::rational<long> aPreviewZoom( nZoom, 100 );
- boost::rational<long> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
+ boost::rational<sal_Int64> aPreviewZoom( nZoom, 100 );
+ boost::rational<sal_Int64> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
SetMapMode( aMMMode );
@@ -961,8 +961,8 @@ void ScPreview::DataChanged( const DataChangedEvent& rDCEvt )
void ScPreview::MouseButtonDown( const MouseEvent& rMEvt )
{
- boost::rational<long> aPreviewZoom( nZoom, 100 );
- boost::rational<long> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
+ boost::rational<sal_Int64> aPreviewZoom( nZoom, 100 );
+ boost::rational<sal_Int64> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
aButtonDownChangePoint = PixelToLogic( rMEvt.GetPosPixel(),aMMMode );
@@ -1044,8 +1044,8 @@ void ScPreview::MouseButtonDown( const MouseEvent& rMEvt )
void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
{
- boost::rational<long> aPreviewZoom( nZoom, 100 );
- boost::rational<long> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
+ boost::rational<sal_Int64> aPreviewZoom( nZoom, 100 );
+ boost::rational<sal_Int64> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
aButtonUpPt = PixelToLogic( rMEvt.GetPosPixel(),aMMMode );
@@ -1294,8 +1294,8 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
void ScPreview::MouseMove( const MouseEvent& rMEvt )
{
- boost::rational<long> aPreviewZoom( nZoom, 100 );
- boost::rational<long> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
+ boost::rational<sal_Int64> aPreviewZoom( nZoom, 100 );
+ boost::rational<sal_Int64> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
Point aMouseMovePoint = PixelToLogic( rMEvt.GetPosPixel(), aMMMode );
@@ -1540,8 +1540,8 @@ void ScPreview::SwitchView()
void ScPreview::DragMove( long nDragMovePos, sal_uInt16 nFlags )
{
- boost::rational<long> aPreviewZoom( nZoom, 100 );
- boost::rational<long> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
+ boost::rational<sal_Int64> aPreviewZoom( nZoom, 100 );
+ boost::rational<sal_Int64> aHorPrevZoom( long( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
SetMapMode( aMMMode );
long nPos = nDragMovePos;
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 0e2bda3c4421..046e2a82cb86 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1593,7 +1593,7 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
if ( !pPrinter )
{
OutputDevice* pRefDev = pDoc->GetPrinter(); // use the printer also for Preview
- boost::rational<long> aPrintFrac( nZoom, 100 ); // without nManualZoom
+ boost::rational<sal_Int64> aPrintFrac( nZoom, 100 ); // without nManualZoom
// MapMode, as it would arrive at the printer:
pRefDev->SetMapMode( MapMode( MAP_100TH_MM, Point(), aPrintFrac, aPrintFrac ) );
@@ -2543,13 +2543,13 @@ void ScPrintFunc::InitModes() // set MapModes from nZoom etc.
long nEffZoom = nZoom * (long) nManualZoom;
nScaleX = nScaleY = HMM_PER_TWIPS; // output in 1/100 mm
- boost::rational<long> aZoomFract( nEffZoom,10000 );
- boost::rational<long> aHorFract = aZoomFract;
+ boost::rational<sal_Int64> aZoomFract( nEffZoom,10000 );
+ boost::rational<sal_Int64> aHorFract = aZoomFract;
if ( !pPrinter && !bIsRender ) // adjust scale for preview
{
double nFact = pDocShell->GetOutputFactor();
- aHorFract = boost::rational<long>( long( nEffZoom / nFact ), 10000 );
+ aHorFract = boost::rational<sal_Int64>( long( nEffZoom / nFact ), 10000 );
}
aLogicMode = MapMode( MAP_100TH_MM, Point(), aHorFract, aZoomFract );
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 6802dd0e7bf7..b2cf9b1d2c76 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -697,11 +697,11 @@ void ScTabView::UpdateVarZoom()
if ( eZoomType != SVX_ZOOM_PERCENT && !bInZoomUpdate )
{
bInZoomUpdate = true;
- const boost::rational<long>& rOldX = GetViewData().GetZoomX();
- const boost::rational<long>& rOldY = GetViewData().GetZoomY();
+ const boost::rational<sal_Int64>& rOldX = GetViewData().GetZoomX();
+ const boost::rational<sal_Int64>& rOldY = GetViewData().GetZoomY();
long nOldPercent = ( rOldY.numerator() * 100 ) / rOldY.denominator();
sal_uInt16 nNewZoom = CalcZoom( eZoomType, (sal_uInt16)nOldPercent );
- boost::rational<long> aNew( nNewZoom, 100 );
+ boost::rational<sal_Int64> aNew( nNewZoom, 100 );
if ( aNew != rOldX || aNew != rOldY )
{
@@ -924,7 +924,7 @@ bool ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos )
// for ole inplace editing, the scale is defined by the visarea and client size
// and can't be changed directly
- const boost::rational<long>& rOldY = aViewData.GetZoomY();
+ const boost::rational<sal_Int64>& rOldY = aViewData.GetZoomY();
long nOld = long(( rOldY.numerator() * 100 ) / rOldY.denominator());
long nNew = nOld;
if ( pData->GetMode() == COMMAND_WHEEL_ZOOM_SCALE )
@@ -943,7 +943,7 @@ bool ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos )
bool bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom();
SetZoomType( SVX_ZOOM_PERCENT, bSyncZoom );
- boost::rational<long> aFract( nNew, 100 );
+ boost::rational<sal_Int64> aFract( nNew, 100 );
SetZoom( aFract, aFract, bSyncZoom );
PaintGrid();
PaintTop();
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index e19348adeed2..ee78d61c09b3 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -1111,7 +1111,7 @@ static bool lcl_FitsInWindow( double fScaleX, double fScaleY, sal_uInt16 nZoom,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
SCCOL nFixPosX, SCROW nFixPosY )
{
- double fZoomFactor = boost::rational_cast<double>(boost::rational<long>(nZoom, 100));
+ double fZoomFactor = boost::rational_cast<double>(boost::rational<sal_Int64>(nZoom, 100));
fScaleX *= fZoomFactor;
fScaleY *= fZoomFactor;
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 749f542747d4..af47a938379a 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -2337,8 +2337,8 @@ void ScTabView::RecalcPPT()
// call view SetZoom (including draw scale, split update etc)
// and paint only if values changed
- boost::rational<long> aZoomX = aViewData.GetZoomX();
- boost::rational<long> aZoomY = aViewData.GetZoomY();
+ boost::rational<sal_Int64> aZoomX = aViewData.GetZoomX();
+ boost::rational<sal_Int64> aZoomY = aViewData.GetZoomY();
SetZoom( aZoomX, aZoomY, false );
PaintGrid();
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index 65f6d072323f..ea7950b5f08d 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -370,7 +370,7 @@ void ScTabView::SetZoomType( SvxZoomType eNew, bool bAll )
aViewData.SetZoomType( eNew, bAll );
}
-void ScTabView::SetZoom( const boost::rational<long>& rNewX, const boost::rational<long>& rNewY, bool bAll )
+void ScTabView::SetZoom( const boost::rational<sal_Int64>& rNewX, const boost::rational<sal_Int64>& rNewY, bool bAll )
{
aViewData.SetZoom( rNewX, rNewY, bAll );
if (pDrawView)
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index ded17ef4177e..a3e1defa6d7c 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -627,7 +627,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
bool bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom();
SvxZoomType eOldZoomType = GetZoomType();
SvxZoomType eNewZoomType = eOldZoomType;
- const boost::rational<long>& rOldY = GetViewData().GetZoomY(); // Y wird angezeigt
+ const boost::rational<sal_Int64>& rOldY = GetViewData().GetZoomY(); // Y wird angezeigt
sal_uInt16 nOldZoom = (sal_uInt16)(( rOldY.numerator() * 100 )
/ rOldY.denominator());
sal_uInt16 nZoom = nOldZoom;
@@ -720,7 +720,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
aNewOpt.SetZoomType( GetZoomType() );
pScMod->SetAppOptions( aNewOpt );
}
- boost::rational<long> aFract( nZoom, 100 );
+ boost::rational<sal_Int64> aFract( nZoom, 100 );
SetZoom( aFract, aFract, bSyncZoom );
PaintGrid();
PaintTop();
@@ -749,7 +749,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
aNewOpt.SetZoomType( GetZoomType() );
pScMod->SetAppOptions( aNewOpt );
}
- boost::rational<long> aFract( nCurrentZoom,100 );
+ boost::rational<sal_Int64> aFract( nCurrentZoom,100 );
SetZoom( aFract, aFract, bSyncZoom );
PaintGrid();
PaintTop();
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index ee241c451ae3..2b5e3ba25c44 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -333,8 +333,8 @@ void ScTabViewShell::UpdateOleZoom()
{
vcl::Window* pWin = GetActiveWin();
Size aWinHMM = pWin->PixelToLogic( pWin->GetOutputSizePixel(), MAP_100TH_MM );
- SetZoomFactor( boost::rational<long>( aWinHMM.Width(),aObjSize.Width() ),
- boost::rational<long>( aWinHMM.Height(),aObjSize.Height() ) );
+ SetZoomFactor( boost::rational<sal_Int64>( aWinHMM.Width(),aObjSize.Width() ),
+ boost::rational<sal_Int64>( aWinHMM.Height(),aObjSize.Height() ) );
}
}
}
@@ -362,8 +362,8 @@ void ScTabViewShell::InnerResizePixel( const Point &rOfs, const Size &rSize )
if ( aObjSize.Width() > 0 && aObjSize.Height() > 0 )
{
Size aLogicSize = GetWindow()->PixelToLogic( aSize, MAP_100TH_MM );
- SfxViewShell::SetZoomFactor( boost::rational<long>( aLogicSize.Width(),aObjSize.Width() ),
- boost::rational<long>( aLogicSize.Height(),aObjSize.Height() ) );
+ SfxViewShell::SetZoomFactor( boost::rational<sal_Int64>( aLogicSize.Width(),aObjSize.Width() ),
+ boost::rational<sal_Int64>( aLogicSize.Height(),aObjSize.Height() ) );
}
Point aPos( rOfs );
@@ -401,19 +401,19 @@ void ScTabViewShell::OuterResizePixel( const Point &rOfs, const Size &rSize )
ForceMove();
}
-void ScTabViewShell::SetZoomFactor( const boost::rational<long>& rZoomX, const boost::rational<long>& rZoomY )
+void ScTabViewShell::SetZoomFactor( const boost::rational<sal_Int64>& rZoomX, const boost::rational<sal_Int64>& rZoomY )
{
// fuer OLE...
- boost::rational<long> aFrac20( 1,5 );
- boost::rational<long> aFrac400( 4,1 );
+ boost::rational<sal_Int64> aFrac20( 1,5 );
+ boost::rational<sal_Int64> aFrac400( 4,1 );
- boost::rational<long> aNewX( rZoomX );
+ boost::rational<sal_Int64> aNewX( rZoomX );
if ( aNewX < aFrac20 )
aNewX = aFrac20;
if ( aNewX > aFrac400 )
aNewX = aFrac400;
- boost::rational<long> aNewY( rZoomY );
+ boost::rational<sal_Int64> aNewY( rZoomY );
if ( aNewY < aFrac20 )
aNewY = aFrac20;
if ( aNewY > aFrac400 )
@@ -1727,7 +1727,7 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame,
}
else
{
- boost::rational<long> aFract( rAppOpt.GetZoom(), 100 );
+ boost::rational<sal_Int64> aFract( rAppOpt.GetZoom(), 100 );
SetZoom( aFract, aFract, true );
SetZoomType( rAppOpt.GetZoomType(), true );
}
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 5c2727a50667..bf4bc434633d 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -287,7 +287,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
rSet.DisableItem( nWhich );
else
{
- const boost::rational<long>& rOldY = GetViewData().GetZoomY();
+ const boost::rational<sal_Int64>& rOldY = GetViewData().GetZoomY();
sal_uInt16 nZoom = (sal_uInt16)(( rOldY.numerator() * 100 ) / rOldY.denominator());
rSet.Put( SvxZoomItem( SVX_ZOOM_PERCENT, nZoom, nWhich ) );
}
@@ -299,7 +299,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
rSet.DisableItem( nWhich );
else
{
- const boost::rational<long>& rOldY = GetViewData().GetZoomY();
+ const boost::rational<sal_Int64>& rOldY = GetViewData().GetZoomY();
sal_uInt16 nCurrentZoom = (sal_uInt16)(( rOldY.numerator() * 100 ) / rOldY.denominator());
if( nCurrentZoom )
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 5b422dfb15c5..f40aa45dcc3b 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -85,8 +85,8 @@ void ScTabViewShell::ConnectObject( SdrOle2Obj* pObj )
Size aOleSize = pObj->GetOrigObjSize();
- boost::rational<long> aScaleWidth (aDrawSize.Width(), aOleSize.Width() );
- boost::rational<long> aScaleHeight(aDrawSize.Height(), aOleSize.Height() );
+ boost::rational<sal_Int64> aScaleWidth (aDrawSize.Width(), aOleSize.Width() );
+ boost::rational<sal_Int64> aScaleHeight(aDrawSize.Height(), aOleSize.Height() );
rational_ReduceInaccurate(aScaleWidth, 10); // kompatibel zum SdrOle2Obj
rational_ReduceInaccurate(aScaleHeight, 10);
pClient->SetSizeScale(aScaleWidth,aScaleHeight);
@@ -145,15 +145,15 @@ bool ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb )
awt::Size aSz( aOleSize.Width(), aOleSize.Height() );
xObj->setVisualAreaSize( pClient->GetAspect(), aSz );
}
- boost::rational<long> aOne( 1, 1 );
+ boost::rational<sal_Int64> aOne( 1, 1 );
pClient->SetSizeScale( aOne, aOne );
}
else
{
// calculate scale from client and VisArea size
- boost::rational<long> aScaleWidth (aDrawSize.Width(), aOleSize.Width() );
- boost::rational<long> aScaleHeight(aDrawSize.Height(), aOleSize.Height() );
+ boost::rational<sal_Int64> aScaleWidth (aDrawSize.Width(), aOleSize.Width() );
+ boost::rational<sal_Int64> aScaleHeight(aDrawSize.Height(), aOleSize.Height() );
rational_ReduceInaccurate(aScaleWidth, 10); // kompatibel zum SdrOle2Obj
rational_ReduceInaccurate(aScaleHeight, 10);
pClient->SetSizeScale(aScaleWidth,aScaleHeight);
diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx
index 46503dae69a7..641998930843 100644
--- a/sc/source/ui/view/tabvwshh.cxx
+++ b/sc/source/ui/view/tabvwshh.cxx
@@ -121,12 +121,12 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq )
pDrView->MoveMarkedObj( Size( 0, nNewVal - aRect.Top() ) );
else if ( nSlotId == SID_OBJECT_WIDTH )
pDrView->ResizeMarkedObj( aRect.TopLeft(),
- boost::rational<long>( nNewVal, aRect.GetWidth() ),
- boost::rational<long>( 1, 1 ) );
+ boost::rational<sal_Int64>( nNewVal, aRect.GetWidth() ),
+ boost::rational<sal_Int64>( 1, 1 ) );
else // if ( nSlotId == SID_OBJECT_HEIGHT )
pDrView->ResizeMarkedObj( aRect.TopLeft(),
- boost::rational<long>( 1, 1 ),
- boost::rational<long>( nNewVal, aRect.GetHeight() ) );
+ boost::rational<sal_Int64>( 1, 1 ),
+ boost::rational<sal_Int64>( nNewVal, aRect.GetHeight() ) );
bDone = true;
}
}
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 1dd2d255a0d7..7006abc09eb7 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -248,14 +248,14 @@ void ScViewDataTable::ReadUserDataSequence(const uno::Sequence <beans::PropertyV
else if (sName.equalsAscii(SC_ZOOMVALUE) )
{
aSettings[i].Value >>= nTemp32;
- boost::rational<long> aZoom(nTemp32, 100);
+ boost::rational<sal_Int64> aZoom(nTemp32, 100);
aZoomX = aZoomY = aZoom;
rHasZoom = true;
}
else if (sName.equalsAscii(SC_PAGEVIEWZOOMVALUE) )
{
aSettings[i].Value >>= nTemp32;
- boost::rational<long> aZoom(nTemp32, 100);
+ boost::rational<sal_Int64> aZoom(nTemp32, 100);
aPageZoomX = aPageZoomY = aZoom;
rHasZoom = true;
}
@@ -616,21 +616,21 @@ void ScViewData::SetZoomType( SvxZoomType eNew, bool bAll )
SetZoomType( eNew, vTabs );
}
-void ScViewData::SetZoom( const boost::rational<long>& rNewX, const boost::rational<long>& rNewY, std::vector< SCTAB >& tabs )
+void ScViewData::SetZoom( const boost::rational<sal_Int64>& rNewX, const boost::rational<sal_Int64>& rNewY, std::vector< SCTAB >& tabs )
{
bool bAll = ( tabs.empty() );
if ( !bAll ) // create associated table data
CreateTabData( tabs );
- boost::rational<long> aFrac20( 1,5 );
- boost::rational<long> aFrac400( 4,1 );
+ boost::rational<sal_Int64> aFrac20( 1,5 );
+ boost::rational<sal_Int64> aFrac400( 4,1 );
- boost::rational<long> aValidX = rNewX;
+ boost::rational<sal_Int64> aValidX = rNewX;
if (aValidX<aFrac20)
aValidX = aFrac20;
if (aValidX>aFrac400)
aValidX = aFrac400;
- boost::rational<long> aValidY = rNewY;
+ boost::rational<sal_Int64> aValidY = rNewY;
if (aValidY<aFrac20)
aValidY = aFrac20;
if (aValidY>aFrac400)
@@ -690,7 +690,7 @@ void ScViewData::SetZoom( const boost::rational<long>& rNewX, const boost::ratio
RefreshZoom();
}
-void ScViewData::SetZoom( const boost::rational<long>& rNewX, const boost::rational<long>& rNewY, bool bAll )
+void ScViewData::SetZoom( const boost::rational<sal_Int64>& rNewX, const boost::rational<sal_Int64>& rNewY, bool bAll )
{
std::vector< SCTAB > vTabs;
if ( !bAll ) // get selected tabs
@@ -1033,7 +1033,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
// if text is formatted for printer, use the exact same paper width
// (and same line breaks) as for output.
- boost::rational<long> aFract(1,1);
+ boost::rational<sal_Int64> aFract(1,1);
Rectangle aUtilRect = ScEditUtil( pDoc,nNewX,nNewY,nTabNo, Point(0,0), pWin,
HMM_PER_TWIPS, HMM_PER_TWIPS, aFract, aFract ).GetEditArea( pPattern, false );
aPaperSize.Width() = aUtilRect.GetWidth();
@@ -2120,18 +2120,18 @@ bool ScViewData::IsMinimized()
return pView->IsMinimized();
}
-void ScViewData::UpdateScreenZoom( const boost::rational<long>& rNewX, const boost::rational<long>& rNewY )
+void ScViewData::UpdateScreenZoom( const boost::rational<sal_Int64>& rNewX, const boost::rational<sal_Int64>& rNewY )
{
- boost::rational<long> aOldX = GetZoomX();
- boost::rational<long> aOldY = GetZoomY();
+ boost::rational<sal_Int64> aOldX = GetZoomX();
+ boost::rational<sal_Int64> aOldY = GetZoomY();
SetZoom( rNewX, rNewY, false );
- boost::rational<long> aWidth = GetZoomX();
+ boost::rational<sal_Int64> aWidth = GetZoomX();
aWidth *= aScrSize.Width();
aWidth /= aOldX;
- boost::rational<long> aHeight = GetZoomY();
+ boost::rational<sal_Int64> aHeight = GetZoomY();
aHeight *= aScrSize.Height();
aHeight /= aOldY;
@@ -2259,15 +2259,15 @@ void ScViewData::ReadUserData(const OUString& rData)
// nicht pro Tabelle:
SCTAB nTabStart = 2;
- boost::rational<long> aZoomX, aZoomY, aPageZoomX, aPageZoomY; // evaluate (all sheets?)
+ boost::rational<sal_Int64> aZoomX, aZoomY, aPageZoomX, aPageZoomY; // evaluate (all sheets?)
OUString aZoomStr = rData.getToken(0, ';'); // Zoom/PageZoom/Modus
sal_uInt16 nNormZoom = sal::static_int_cast<sal_uInt16>(aZoomStr.getToken(0,'/').toInt32());
if ( nNormZoom >= MINZOOM && nNormZoom <= MAXZOOM )
- aZoomX = aZoomY = boost::rational<long>( nNormZoom, 100 ); // "normal" zoom (always)
+ aZoomX = aZoomY = boost::rational<sal_Int64>( nNormZoom, 100 ); // "normal" zoom (always)
sal_uInt16 nPageZoom = sal::static_int_cast<sal_uInt16>(aZoomStr.getToken(1,'/').toInt32());
if ( nPageZoom >= MINZOOM && nPageZoom <= MAXZOOM )
- aPageZoomX = aPageZoomY = boost::rational<long>( nPageZoom, 100 ); // Pagebreak-zoom, if set
+ aPageZoomX = aPageZoomY = boost::rational<sal_Int64>( nPageZoom, 100 ); // Pagebreak-zoom, if set
sal_Unicode cMode = aZoomStr.getToken(2,'/')[0]; // 0 or "0"/"1"
SetPagebreakMode( cMode == '1' );
// SetPagebreakMode muss immer gerufen werden wegen CalcPPT / RecalcPixPos()
@@ -2579,9 +2579,9 @@ void ScViewData::ReadExtOptions( const ScExtDocOptions& rDocOpt )
// zoom for each sheet
if( rTabSett.mnNormalZoom )
- rViewTab.aZoomX = rViewTab.aZoomY = boost::rational<long>( rTabSett.mnNormalZoom, 100L );
+ rViewTab.aZoomX = rViewTab.aZoomY = boost::rational<sal_Int64>( rTabSett.mnNormalZoom, 100L );
if( rTabSett.mnPageZoom )
- rViewTab.aPageZoomX = rViewTab.aPageZoomY = boost::rational<long>( rTabSett.mnPageZoom, 100L );
+ rViewTab.aPageZoomX = rViewTab.aPageZoomY = boost::rational<sal_Int64>( rTabSett.mnPageZoom, 100L );
rViewTab.bShowGrid = rTabSett.mbShowGrid;
@@ -2599,9 +2599,9 @@ void ScViewData::ReadExtOptions( const ScExtDocOptions& rDocOpt )
// view mode and default zoom (for new sheets) from current sheet
if( rTabSett.mnNormalZoom )
- aDefZoomX = aDefZoomY = boost::rational<long>( rTabSett.mnNormalZoom, 100L );
+ aDefZoomX = aDefZoomY = boost::rational<sal_Int64>( rTabSett.mnNormalZoom, 100L );
if( rTabSett.mnPageZoom )
- aDefPageZoomX = aDefPageZoomY = boost::rational<long>( rTabSett.mnPageZoom, 100L );
+ aDefPageZoomX = aDefPageZoomY = boost::rational<sal_Int64>( rTabSett.mnPageZoom, 100L );
/* #i46820# set pagebreak mode via SetPagebreakMode(), this will
update map modes that are needed to draw text correctly. */
SetPagebreakMode( rTabSett.mbPageMode );
@@ -2787,7 +2787,7 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
{
if (rSettings[i].Value >>= nTemp32)
{
- boost::rational<long> aZoom(nTemp32, 100);
+ boost::rational<sal_Int64> aZoom(nTemp32, 100);
aDefZoomX = aDefZoomY = aZoom;
}
}
@@ -2795,7 +2795,7 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
{
if (rSettings[i].Value >>= nTemp32)
{
- boost::rational<long> aZoom(nTemp32, 100);
+ boost::rational<sal_Int64> aZoom(nTemp32, 100);
aDefPageZoomX = aDefPageZoomY = aZoom;
}
}
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index bd0fb122e88a..5fb567ccb3bf 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -114,15 +114,15 @@ bool ScViewFunc::AdjustBlockHeight( bool bPaint, ScMarkData* pMarkData )
double nPPTX = GetViewData().GetPPTX();
double nPPTY = GetViewData().GetPPTY();
- boost::rational<long> aZoomX = GetViewData().GetZoomX();
- boost::rational<long> aZoomY = GetViewData().GetZoomY();
+ boost::rational<sal_Int64> aZoomX = GetViewData().GetZoomX();
+ boost::rational<sal_Int64> aZoomY = GetViewData().GetZoomY();
ScSizeDeviceProvider aProv(pDocSh);
if (aProv.IsPrinter())
{
nPPTX = aProv.GetPPTX();
nPPTY = aProv.GetPPTY();
- aZoomX = aZoomY = boost::rational<long>( 1, 1 );
+ aZoomX = aZoomY = boost::rational<sal_Int64>( 1, 1 );
}
sc::RowHeightContext aCxt(nPPTX, nPPTY, aZoomX, aZoomY, aProv.GetDevice());
@@ -163,8 +163,8 @@ bool ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, bool bPaint )
SCTAB nTab = GetViewData().GetTabNo();
double nPPTX = GetViewData().GetPPTX();
double nPPTY = GetViewData().GetPPTY();
- boost::rational<long> aZoomX = GetViewData().GetZoomX();
- boost::rational<long> aZoomY = GetViewData().GetZoomY();
+ boost::rational<sal_Int64> aZoomX = GetViewData().GetZoomX();
+ boost::rational<sal_Int64> aZoomY = GetViewData().GetZoomY();
sal_uInt16 nOldPixel = 0;
if (nStartRow == nEndRow)
nOldPixel = (sal_uInt16) (rDoc.GetRowHeight(nStartRow,nTab) * nPPTY);
@@ -174,7 +174,7 @@ bool ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, bool bPaint )
{
nPPTX = aProv.GetPPTX();
nPPTY = aProv.GetPPTY();
- aZoomX = aZoomY = boost::rational<long>( 1, 1 );
+ aZoomX = aZoomY = boost::rational<sal_Int64>( 1, 1 );
}
sc::RowHeightContext aCxt(nPPTX, nPPTY, aZoomX, aZoomY, aProv.GetDevice());
bool bChanged = rDoc.SetOptimalHeight(aCxt, nStartRow, nEndRow, nTab);
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index 1e27dd1e9be1..68c6dbbb58e8 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -420,7 +420,7 @@ bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
if (aSourceMap.GetMapUnit() == MAP_PIXEL)
{
// consider pixel correction, so bitmap fits to screen
- boost::rational<long> aScaleX, aScaleY;
+ boost::rational<sal_Int64> aScaleX, aScaleY;
pScDrawView->CalcNormScale( aScaleX, aScaleY );
aDestMap.SetScaleX(aScaleX);
aDestMap.SetScaleY(aScaleY);
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 4f89e13103e9..f834e65d14f6 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -228,15 +228,15 @@ sal_uInt16 ScViewFunc::GetOptimalColWidth( SCCOL nCol, SCTAB nTab, bool bFormula
double nPPTX = GetViewData().GetPPTX();
double nPPTY = GetViewData().GetPPTY();
- boost::rational<long> aZoomX = GetViewData().GetZoomX();
- boost::rational<long> aZoomY = GetViewData().GetZoomY();
+ boost::rational<sal_Int64> aZoomX = GetViewData().GetZoomX();
+ boost::rational<sal_Int64> aZoomY = GetViewData().GetZoomY();
ScSizeDeviceProvider aProv(pDocSh);
if (aProv.IsPrinter())
{
nPPTX = aProv.GetPPTX();
nPPTY = aProv.GetPPTY();
- aZoomX = aZoomY = boost::rational<long>( 1, 1 );
+ aZoomX = aZoomY = boost::rational<sal_Int64>( 1, 1 );
}
sal_uInt16 nTwips = rDoc.GetOptimalColWidth( nCol, nTab, aProv.GetDevice(),
@@ -1960,15 +1960,15 @@ void ScViewFunc::SetWidthOrHeight(
double nPPTX = GetViewData().GetPPTX();
double nPPTY = GetViewData().GetPPTY();
- boost::rational<long> aZoomX = GetViewData().GetZoomX();
- boost::rational<long> aZoomY = GetViewData().GetZoomY();
+ boost::rational<sal_Int64> aZoomX = GetViewData().GetZoomX();
+ boost::rational<sal_Int64> aZoomY = GetViewData().GetZoomY();
ScSizeDeviceProvider aProv(pDocSh);
if (aProv.IsPrinter())
{
nPPTX = aProv.GetPPTX();
nPPTY = aProv.GetPPTY();
- aZoomX = aZoomY = boost::rational<long>( 1, 1 );
+ aZoomX = aZoomY = boost::rational<sal_Int64>( 1, 1 );
}
sc::RowHeightContext aCxt(nPPTX, nPPTY, aZoomX, aZoomY, aProv.GetDevice());
@@ -2194,15 +2194,15 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, bool bOptimal )
{
double nPPTX = GetViewData().GetPPTX();
double nPPTY = GetViewData().GetPPTY();
- boost::rational<long> aZoomX = GetViewData().GetZoomX();
- boost::rational<long> aZoomY = GetViewData().GetZoomY();
+ boost::rational<sal_Int64> aZoomX = GetViewData().GetZoomX();
+ boost::rational<sal_Int64> aZoomY = GetViewData().GetZoomY();
ScSizeDeviceProvider aProv(pDocSh);
if (aProv.IsPrinter())
{
nPPTX = aProv.GetPPTX();
nPPTY = aProv.GetPPTY();
- aZoomX = aZoomY = boost::rational<long>( 1, 1 );
+ aZoomX = aZoomY = boost::rational<sal_Int64>( 1, 1 );
}
long nPixel = rDoc.GetNeededSize( nCol, nRow, nTab, aProv.GetDevice(),