[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 3 commits - oox/source sc/source
Fridrich Strba
fridrich at kemper.freedesktop.org
Mon Jun 11 03:04:55 PDT 2012
oox/source/xls/sheetdatabuffer.cxx | 2 --
oox/source/xls/worksheethelper.cxx | 30 +++---------------------------
sc/source/ui/unoobj/docuno.cxx | 4 ----
sc/source/ui/view/drawutil.cxx | 12 ------------
sc/source/ui/view/drawvie4.cxx | 2 +-
sc/source/ui/view/drawview.cxx | 2 +-
sc/source/ui/view/gridwin3.cxx | 2 +-
7 files changed, 6 insertions(+), 48 deletions(-)
New commits:
commit d712d16d9adf9a711ce78e5ead8c55f7bf3ee1a6
Author: Noel Power <noel.power at novell.com>
Date: Fri Jun 8 11:05:57 2012 +0100
better import xlsx heights
don't call UpdateAllRowHeights when IsAdjustHeightEnabled property is set an
d additionally set manual heights for *all* imported row heights ( same afaics x
ls import does ) - certainly this improves import ( also see documents attached
in i#94028, i#93609 )
Change-Id: I19d46753cf692bc9768512a2267e03a7a75a0f6e
Signed-off-by: Fridrich Å trba <fridrich.strba at bluewin.ch>
diff --git a/oox/source/xls/sheetdatabuffer.cxx b/oox/source/xls/sheetdatabuffer.cxx
index 0839b9d..5b314ac 100644
--- a/oox/source/xls/sheetdatabuffer.cxx
+++ b/oox/source/xls/sheetdatabuffer.cxx
@@ -921,8 +921,6 @@ void SheetDataBuffer::finalizeMergedRange( const CellRangeAddress& rRange )
Reference< XText > xText( xTopLeft, UNO_QUERY );
bTextWrap = xText.is() && (xText->getString().indexOf( '\x0A' ) >= 0);
}
- if( bTextWrap )
- setManualRowHeight( rRange.StartRow );
}
}
catch( Exception& )
diff --git a/oox/source/xls/worksheethelper.cxx b/oox/source/xls/worksheethelper.cxx
index e8a2972..bdf6754 100644
--- a/oox/source/xls/worksheethelper.cxx
+++ b/oox/source/xls/worksheethelper.cxx
@@ -335,8 +335,6 @@ public:
@descr Row default formatting is converted directly, other settings
are cached and converted in the finalizeImport() call. */
void setRowModel( const RowModel& rModel );
- /** Specifies that the passed row needs to set its height manually. */
- void setManualRowHeight( sal_Int32 nRow );
/** Initial conversion before importing the worksheet. */
void initializeWorksheetImport();
@@ -394,7 +392,6 @@ private:
RowModelRangeMap maRowModels; /// Ranges of rows sorted by first row index.
HyperlinkModelList maHyperlinks; /// Cell ranges containing hyperlinks.
ValidationModelList maValidations; /// Cell ranges containing data validation settings.
- ValueRangeSet maManualRowHeights; /// Rows that need manual height independent from own settings.
SheetDataBuffer maSheetData; /// Buffer for cell contents and cell formatting.
CondFormatBuffer maCondFormats; /// Buffer for conditional formatting.
CommentsBuffer maComments; /// Buffer for all cell comments in this sheet.
@@ -930,11 +927,6 @@ void WorksheetGlobals::setRowModel( const RowModel& rModel )
lclUpdateProgressBar( mxRowProgress, maUsedArea, nRow );
}
-void WorksheetGlobals::setManualRowHeight( sal_Int32 nRow )
-{
- maManualRowHeights.insert( nRow );
-}
-
void WorksheetGlobals::initializeWorksheetImport()
{
// set default cell style for unused cells
@@ -1223,20 +1215,9 @@ void WorksheetGlobals::convertRows( OutlineLevelVec& orRowLevels,
sal_Int32 nHeight = getUnitConverter().scaleToMm100( fHeight, UNIT_POINT );
if( nHeight > 0 )
{
- /* Get all rows that have custom height inside the passed row model.
- If the model has the custom height flag set, all its rows have
- custom height, otherwise get all rows specified in the class member
- maManualRowHeights that are inside the passed row model. */
- ValueRangeVector aManualRows;
- if( rModel.mbCustomHeight )
- aManualRows.push_back( rRowRange );
- else
- aManualRows = maManualRowHeights.getIntersection( rRowRange );
- for( ValueRangeVector::const_iterator aIt = aManualRows.begin(), aEnd = aManualRows.end(); aIt != aEnd; ++aIt )
- {
- PropertySet aPropSet( getRows( *aIt ) );
- aPropSet.setProperty( PROP_Height, nHeight );
- }
+ /* always import the row height, ensures better layout */
+ PropertySet aPropSet( getRows( rRowRange ) );
+ aPropSet.setProperty( PROP_Height, nHeight );
}
// hidden rows: TODO: #108683# hide rows later?
@@ -1645,11 +1626,6 @@ void WorksheetHelper::setRowModel( const RowModel& rModel )
mrSheetGlob.setRowModel( rModel );
}
-void WorksheetHelper::setManualRowHeight( sal_Int32 nRow )
-{
- mrSheetGlob.setManualRowHeight( nRow );
-}
-
void WorksheetHelper::putValue( const CellAddress& rAddress, double fValue ) const
{
Reference< XCell > xCell = getCell( rAddress );
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index b9be493..125f4a9 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1689,11 +1689,7 @@ void SAL_CALL ScModelObj::setPropertyValue(
bool bOldAdjustHeightEnabled = pDoc->IsAdjustHeightEnabled();
bool bAdjustHeightEnabled = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if( bOldAdjustHeightEnabled != bAdjustHeightEnabled )
- {
pDoc->EnableAdjustHeight( bAdjustHeightEnabled );
- if( bAdjustHeightEnabled )
- pDocShell->UpdateAllRowHeights();
- }
}
else if ( aString.EqualsAscii( SC_UNO_ISEXECUTELINKENABLED ) )
{
commit 3967331f9f61639ee78ceb9793377e615fc3afcd
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 11 12:00:43 2012 +0200
Revert "Fixed #i116848# Shapes are at wrong position"
This reverts commit 31012ab9d7035f942486c87ecc1a79b4d6579975.
Signed-off-by: Fridrich Å trba <fridrich.strba at bluewin.ch>
diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index 56e0ec4..2bf5be3 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -243,7 +243,7 @@ void ScDrawView::CalcNormScale( Fraction& rFractX, Fraction& rFractY ) const
if (nEndCol<20)
nEndCol = 20;
if (nEndRow<20)
- nEndRow = 20;
+ nEndRow = 1000;
Fraction aZoom(1,1);
ScDrawUtil::CalcScale( pDoc, nTab, 0,0, nEndCol,nEndRow, pDev, aZoom,aZoom,
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 2243e75..2e8028b 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -329,7 +329,7 @@ void ScDrawView::RecalcScale()
if (nEndCol<20)
nEndCol = 20;
if (nEndRow<20)
- nEndRow = 20; // #i116848# instead of a large row number for an empty sheet, heights are multiplied in CalcScale
+ nEndRow = 1000;
ScDrawUtil::CalcScale( pDoc, nTab, 0,0, nEndCol,nEndRow, pDev,aZoomX,aZoomY,nPPTX,nPPTY,
aScaleX,aScaleY );
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index a071561..228bdd3 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -264,7 +264,7 @@ MapMode ScGridWindow::GetDrawMapMode( bool bForce )
SCROW nEndRow = 0;
pDoc->GetTableArea( nTab, nEndCol, nEndRow );
if (nEndCol<20) nEndCol = 20;
- if (nEndRow<20) nEndRow = 20;
+ if (nEndRow<20) nEndRow = 1000;
ScDrawUtil::CalcScale( pDoc, nTab, 0,0, nEndCol,nEndRow, this,
pViewData->GetZoomX(),pViewData->GetZoomY(),
pViewData->GetPPTX(),pViewData->GetPPTY(),
commit 51980fc809da7a4b6fdfa4a4102c3f269c4d1039
Author: Eike Rathke <erack at redhat.com>
Date: Fri Nov 25 00:04:53 2011 +0100
Revert "calc69: #i118068# handle all-hidden case in ScDrawUtil::CalcScale"
This reverts commit 8a838b9fbf46ece9680824cd3a044ab7338bf306.
Signed-off-by: Fridrich Å trba <fridrich.strba at bluewin.ch>
diff --git a/sc/source/ui/view/drawutil.cxx b/sc/source/ui/view/drawutil.cxx
index bebde55..c4112ae 100644
--- a/sc/source/ui/view/drawutil.cxx
+++ b/sc/source/ui/view/drawutil.cxx
@@ -80,18 +80,6 @@ void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab,
nPixelY += ScViewData::ToPixel(nHeight, nPPTY);
}
- // #i116848# To get a large-enough number for PixelToLogic, multiply the integer values
- // instead of using a larger number of rows
- if ( nTwipsY )
- {
- long nMultiply = 2000000 / nTwipsY;
- if ( nMultiply > 1 )
- {
- nTwipsY *= nMultiply;
- nPixelY *= nMultiply;
- }
- }
-
MapMode aHMMMode( MAP_100TH_MM, Point(), rZoomX, rZoomY );
Point aPixelLog = pDev->PixelToLogic( Point( nPixelX,nPixelY ), aHMMMode );
More information about the Libreoffice-commits
mailing list