diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-07-12 18:12:34 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-07-12 20:57:58 +0200 |
commit | 2cca46d54846b0cd7769b9287f17632a4258256d (patch) | |
tree | d0a6fa638d4e4afdbb93ee83c9afd46723f467e1 /sc/source | |
parent | 5e28f6e9d3021171b12a7827cd5c93cfda1fcd90 (diff) |
PCH for more libraries
Change-Id: I6f9a1969605e0016b11157ddb5754ac77fd3966b
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/filter/oox/commentsbuffer.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/oox/drawingbase.cxx | 11 | ||||
-rw-r--r-- | sc/source/filter/oox/drawingmanager.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/oox/pivotcachebuffer.cxx | 18 | ||||
-rw-r--r-- | sc/source/filter/oox/unitconverter.cxx | 14 | ||||
-rw-r--r-- | sc/source/filter/oox/viewsettings.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/oox/workbooksettings.cxx | 10 |
7 files changed, 34 insertions, 37 deletions
diff --git a/sc/source/filter/oox/commentsbuffer.cxx b/sc/source/filter/oox/commentsbuffer.cxx index d70a5b9bcfe2..f9d39e96c6da 100644 --- a/sc/source/filter/oox/commentsbuffer.cxx +++ b/sc/source/filter/oox/commentsbuffer.cxx @@ -40,8 +40,6 @@ using ::com::sun::star::text::XText; using ::com::sun::star::text::XTextRange; -using ::com::sun::star::awt::Size; -using ::com::sun::star::awt::Point; namespace oox { namespace xls { @@ -175,8 +173,8 @@ void Comment::finalizeImport() aCommentPr.setProperty( PROP_TextVerticalAdjust, lcl_ToVertAlign( maModel.mnTVA ) ); if( maModel.maAnchor.Width > 0 && maModel.maAnchor.Height > 0 ) { - xAnnoShape->setPosition( Point( maModel.maAnchor.X, maModel.maAnchor.Y ) ); - xAnnoShape->setSize( Size( maModel.maAnchor.Width, maModel.maAnchor.Height ) ); + xAnnoShape->setPosition( css::awt::Point( maModel.maAnchor.X, maModel.maAnchor.Y ) ); + xAnnoShape->setSize( css::awt::Size( maModel.maAnchor.Width, maModel.maAnchor.Height ) ); } // convert shape formatting and visibility diff --git a/sc/source/filter/oox/drawingbase.cxx b/sc/source/filter/oox/drawingbase.cxx index b112a4fd8f36..bbfd7537ccfa 100644 --- a/sc/source/filter/oox/drawingbase.cxx +++ b/sc/source/filter/oox/drawingbase.cxx @@ -31,7 +31,6 @@ namespace xls { // ============================================================================ -using namespace ::com::sun::star::awt; using namespace ::com::sun::star::table; using namespace ::oox::drawingml; @@ -181,7 +180,7 @@ void ShapeAnchor::importVmlAnchor( const OUString& rAnchor ) } } -EmuRectangle ShapeAnchor::calcAnchorRectEmu( const Size& rPageSizeHmm ) const +EmuRectangle ShapeAnchor::calcAnchorRectEmu( const css::awt::Size& rPageSizeHmm ) const { AddressConverter& rAddrConv = getAddressConverter(); EmuSize aPageSize( lclHmmToEmu( rPageSizeHmm.Width ), lclHmmToEmu( rPageSizeHmm.Height ) ); @@ -259,16 +258,16 @@ EmuRectangle ShapeAnchor::calcAnchorRectEmu( const Size& rPageSizeHmm ) const return aAnchorRect; } -Rectangle ShapeAnchor::calcAnchorRectHmm( const Size& rPageSizeHmm ) const +css::awt::Rectangle ShapeAnchor::calcAnchorRectHmm( const css::awt::Size& rPageSizeHmm ) const { EmuRectangle aAnchorRect = calcAnchorRectEmu( rPageSizeHmm ); - return Rectangle( lclEmuToHmm( aAnchorRect.X ), lclEmuToHmm( aAnchorRect.Y ), lclEmuToHmm( aAnchorRect.Width ), lclEmuToHmm( aAnchorRect.Height ) ); + return css::awt::Rectangle( lclEmuToHmm( aAnchorRect.X ), lclEmuToHmm( aAnchorRect.Y ), lclEmuToHmm( aAnchorRect.Width ), lclEmuToHmm( aAnchorRect.Height ) ); } EmuPoint ShapeAnchor::calcCellAnchorEmu( const CellAnchorModel& rModel ) const { // calculate position of top-left edge of the cell - Point aPoint = getCellPosition( rModel.mnCol, rModel.mnRow ); + css::awt::Point aPoint = getCellPosition( rModel.mnCol, rModel.mnRow ); EmuPoint aEmuPoint( lclHmmToEmu( aPoint.X ), lclHmmToEmu( aPoint.Y ) ); // add the offset inside the cell @@ -289,7 +288,7 @@ EmuPoint ShapeAnchor::calcCellAnchorEmu( const CellAnchorModel& rModel ) const case CELLANCHOR_COLROW: { - Size aCellSize = getCellSize( rModel.mnCol, rModel.mnRow ); + css::awt::Size aCellSize = getCellSize( rModel.mnCol, rModel.mnRow ); EmuSize aEmuSize( lclHmmToEmu( aCellSize.Width ), lclHmmToEmu( aCellSize.Height ) ); // X offset is given in 1/1024 of column width aEmuPoint.X += static_cast< sal_Int64 >( aEmuSize.Width * getLimitedValue< double >( static_cast< double >( rModel.mnColOffset ) / 1024.0, 0.0, 1.0 ) + 0.5 ); diff --git a/sc/source/filter/oox/drawingmanager.cxx b/sc/source/filter/oox/drawingmanager.cxx index f56665809a99..6311583cb689 100644 --- a/sc/source/filter/oox/drawingmanager.cxx +++ b/sc/source/filter/oox/drawingmanager.cxx @@ -209,7 +209,7 @@ BiffDrawingObjectContainer::BiffDrawingObjectContainer() { } -void BiffDrawingObjectContainer::convertAndInsert( BiffDrawingBase& rDrawing, const Reference< XShapes >& rxShapes, const Rectangle* pParentRect ) const +void BiffDrawingObjectContainer::convertAndInsert( BiffDrawingBase& rDrawing, const Reference< XShapes >& rxShapes, const css::awt::Rectangle* pParentRect ) const { maObjects.forEachMem( &BiffDrawingObjectBase::convertAndInsert, ::boost::ref( rDrawing ), ::boost::cref( rxShapes ), pParentRect ); } @@ -237,14 +237,14 @@ BiffDrawingObjectBase::~BiffDrawingObjectBase() } Reference< XShape > BiffDrawingObjectBase::convertAndInsert( BiffDrawingBase& rDrawing, - const Reference< XShapes >& rxShapes, const Rectangle* pParentRect ) const + const Reference< XShapes >& rxShapes, const css::awt::Rectangle* pParentRect ) const { Reference< XShape > xShape; if( rxShapes.is() && mbProcessShape && !mbHidden ) // TODO: support for hidden objects? { // base class 'ShapeAnchor' calculates the shape rectangle in 1/100 mm // in BIFF3-BIFF5, all shapes have absolute anchor (also children of group shapes) - Rectangle aShapeRect = maAnchor.calcAnchorRectHmm( getDrawPageSize() ); + css::awt::Rectangle aShapeRect = maAnchor.calcAnchorRectHmm( getDrawPageSize() ); // convert the shape, if the calculated rectangle is not empty bool bHasWidth = aShapeRect.Width > 0; @@ -495,7 +495,7 @@ BiffSheetDrawing::BiffSheetDrawing( const WorksheetHelper& rHelper ) : { } -void BiffSheetDrawing::notifyShapeInserted( const Reference< XShape >& /*rxShape*/, const Rectangle& rShapeRect ) +void BiffSheetDrawing::notifyShapeInserted( const Reference< XShape >& /*rxShape*/, const css::awt::Rectangle& rShapeRect ) { // collect all shape positions in the WorksheetHelper base class extendShapeBoundingBox( rShapeRect ); diff --git a/sc/source/filter/oox/pivotcachebuffer.cxx b/sc/source/filter/oox/pivotcachebuffer.cxx index 08160c5540d0..c2639a29e702 100644 --- a/sc/source/filter/oox/pivotcachebuffer.cxx +++ b/sc/source/filter/oox/pivotcachebuffer.cxx @@ -145,7 +145,7 @@ const sal_uInt16 BIFF_PCDEFINITION_ENABLEREFRESH = 0x0020; 1900-Jan-00. Nothing has to be done when the workbook is stored in 1904 date mode (dates before 1904-Jan-01 will not occur in this case). */ -void lclAdjustBinDateTime( DateTime& orDateTime ) +void lclAdjustBinDateTime( css::util::DateTime& orDateTime ) { if( (orDateTime.Year == 1900) && (orDateTime.Month <= 2) ) { @@ -182,7 +182,7 @@ void PivotCacheItem::readNumeric( const AttributeList& rAttribs ) void PivotCacheItem::readDate( const AttributeList& rAttribs ) { - maValue <<= rAttribs.getDateTime( XML_v, DateTime() ); + maValue <<= rAttribs.getDateTime( XML_v, css::util::DateTime() ); mnType = XML_d; } @@ -218,7 +218,7 @@ void PivotCacheItem::readDouble( SequenceInputStream& rStrm ) void PivotCacheItem::readDate( SequenceInputStream& rStrm ) { - DateTime aDateTime; + css::util::DateTime aDateTime; aDateTime.Year = rStrm.readuInt16(); aDateTime.Month = rStrm.readuInt16(); aDateTime.Day = rStrm.readuInt8(); @@ -268,7 +268,7 @@ void PivotCacheItem::readInteger( BiffInputStream& rStrm ) void PivotCacheItem::readDate( BiffInputStream& rStrm ) { - DateTime aDateTime; + css::util::DateTime aDateTime; aDateTime.Year = rStrm.readuInt16(); aDateTime.Month = rStrm.readuInt16(); aDateTime.Day = rStrm.readuInt8(); @@ -541,8 +541,8 @@ void PivotCacheField::importFieldGroup( const AttributeList& rAttribs ) void PivotCacheField::importRangePr( const AttributeList& rAttribs ) { - maFieldGroupModel.maStartDate = rAttribs.getDateTime( XML_startDate, DateTime() ); - maFieldGroupModel.maEndDate = rAttribs.getDateTime( XML_endDate, DateTime() ); + maFieldGroupModel.maStartDate = rAttribs.getDateTime( XML_startDate, css::util::DateTime() ); + maFieldGroupModel.maEndDate = rAttribs.getDateTime( XML_endDate, css::util::DateTime() ); maFieldGroupModel.mfStartValue = rAttribs.getDouble( XML_startNum, 0.0 ); maFieldGroupModel.mfEndValue = rAttribs.getDouble( XML_endNum, 0.0 ); maFieldGroupModel.mfInterval = rAttribs.getDouble( XML_groupInterval, 1.0 ); @@ -723,8 +723,8 @@ void PivotCacheField::importPCDFRangePr( BiffInputStream& rStrm ) OSL_ENSURE( bHasTypes, "PivotCacheField::importPCDFRangePr - wrong data types in grouping items" ); if( bHasTypes ) { - maFieldGroupModel.maStartDate = pStartValue->getValue().get< DateTime >(); - maFieldGroupModel.maEndDate = pEndValue->getValue().get< DateTime >(); + maFieldGroupModel.maStartDate = pStartValue->getValue().get< css::util::DateTime >(); + maFieldGroupModel.maEndDate = pEndValue->getValue().get< css::util::DateTime >(); maFieldGroupModel.mfInterval = pInterval->getValue().get< sal_Int16 >(); } } @@ -1023,7 +1023,7 @@ void PivotCacheField::writeItemToSourceDataCell( WorksheetHelper& rSheetHelper, case XML_s: rSheetData.setStringCell( aModel, rItem.getValue().get< OUString >() ); break; case XML_n: rSheetData.setValueCell( aModel, rItem.getValue().get< double >() ); break; case XML_i: rSheetData.setValueCell( aModel, rItem.getValue().get< sal_Int16 >() ); break; - case XML_d: rSheetData.setDateTimeCell( aModel, rItem.getValue().get< DateTime >() ); break; + case XML_d: rSheetData.setDateTimeCell( aModel, rItem.getValue().get< css::util::DateTime >() ); break; case XML_b: rSheetData.setBooleanCell( aModel, rItem.getValue().get< bool >() ); break; case XML_e: rSheetData.setErrorCell( aModel, static_cast< sal_uInt8 >( rItem.getValue().get< sal_Int32 >() ) ); break; default: OSL_FAIL( "PivotCacheField::writeItemToSourceDataCell - unexpected item data type" ); diff --git a/sc/source/filter/oox/unitconverter.cxx b/sc/source/filter/oox/unitconverter.cxx index 20d9c487258c..780168c9760e 100644 --- a/sc/source/filter/oox/unitconverter.cxx +++ b/sc/source/filter/oox/unitconverter.cxx @@ -67,7 +67,7 @@ void lclSkipYearBlock( sal_Int32& ornDays, sal_Int16& ornYear, sal_Int32 nDaysIn /** Returns the number of days before the passed date, starting from the null date 0000-Jan-01, using standard leap year conventions. */ -sal_Int32 lclGetDays( const Date& rDate ) +sal_Int32 lclGetDays( const css::util::Date& rDate ) { // number of days in all full years before passed date including all leap days sal_Int32 nDays = rDate.Year * 365 + ((rDate.Year + 3) / 4) - ((rDate.Year + 99) / 100) + ((rDate.Year + 399) / 400); @@ -98,7 +98,7 @@ sal_Int32 lclGetDays( const Date& rDate ) UnitConverter::UnitConverter( const WorkbookHelper& rHelper ) : WorkbookHelper( rHelper ), maCoeffs( UNIT_ENUM_SIZE, 1.0 ), - mnNullDate( lclGetDays( Date( 30, 12, 1899 ) ) ) + mnNullDate( lclGetDays( css::util::Date( 30, 12, 1899 ) ) ) { // initialize constant and default coefficients const DeviceInfo& rDeviceInfo = getBaseFilter().getGraphicHelper().getDeviceInfo(); @@ -157,7 +157,7 @@ void UnitConverter::finalizeImport() } } -void UnitConverter::finalizeNullDate( const Date& rNullDate ) +void UnitConverter::finalizeNullDate( const css::util::Date& rNullDate ) { // convert the nulldate to number of days since 0000-Jan-01 mnNullDate = lclGetDays( rNullDate ); @@ -180,17 +180,17 @@ double UnitConverter::scaleFromMm100( sal_Int32 nMm100, Unit eUnit ) const return static_cast< double >( nMm100 ) / getCoefficient( eUnit ); } -double UnitConverter::calcSerialFromDateTime( const DateTime& rDateTime ) const +double UnitConverter::calcSerialFromDateTime( const css::util::DateTime& rDateTime ) const { - sal_Int32 nDays = lclGetDays( Date( rDateTime.Day, rDateTime.Month, rDateTime.Year ) ) - mnNullDate; + sal_Int32 nDays = lclGetDays( css::util::Date( rDateTime.Day, rDateTime.Month, rDateTime.Year ) ) - mnNullDate; OSL_ENSURE( nDays >= 0, "UnitConverter::calcDateTimeSerial - invalid date" ); OSL_ENSURE( (rDateTime.Hours <= 23) && (rDateTime.Minutes <= 59) && (rDateTime.Seconds <= 59), "UnitConverter::calcDateTimeSerial - invalid time" ); return nDays + rDateTime.Hours / 24.0 + rDateTime.Minutes / 1440.0 + rDateTime.Seconds / 86400.0; } -DateTime UnitConverter::calcDateTimeFromSerial( double fSerial ) const +css::util::DateTime UnitConverter::calcDateTimeFromSerial( double fSerial ) const { - DateTime aDateTime( 0, 0, 0, 0, 1, 1, 0 ); + css::util::DateTime aDateTime( 0, 0, 0, 0, 1, 1, 0 ); double fDays = 0.0; double fTime = modf( fSerial, &fDays ); diff --git a/sc/source/filter/oox/viewsettings.cxx b/sc/source/filter/oox/viewsettings.cxx index 960708329f9e..bb4a0c05a949 100644 --- a/sc/source/filter/oox/viewsettings.cxx +++ b/sc/source/filter/oox/viewsettings.cxx @@ -633,8 +633,8 @@ void ViewSettings::finalizeImport() { // calculate the visible area in units of 1/100 mm PropertySet aRangeProp( getCellRangeFromDoc( *pVisibleArea ) ); - Point aPos; - Size aSize; + css::awt::Point aPos; + css::awt::Size aSize; if( aRangeProp.getProperty( aPos, PROP_Position ) && aRangeProp.getProperty( aSize, PROP_Size ) ) { // set the visible area as sequence of long at the media descriptor diff --git a/sc/source/filter/oox/workbooksettings.cxx b/sc/source/filter/oox/workbooksettings.cxx index a46a3fa40414..363184799fe9 100644 --- a/sc/source/filter/oox/workbooksettings.cxx +++ b/sc/source/filter/oox/workbooksettings.cxx @@ -214,7 +214,7 @@ void WorkbookSettings::finalizeImport() } // calculation settings - Date aNullDate = getNullDate(); + css::util::Date aNullDate = getNullDate(); aPropSet.setProperty( PROP_NullDate, aNullDate ); aPropSet.setProperty( PROP_IsIterationEnabled, maCalcSettings.mbIterate ); @@ -250,11 +250,11 @@ sal_Int16 WorkbookSettings::getApiShowObjectMode() const return API_SHOWMODE_SHOW; } -Date WorkbookSettings::getNullDate() const +css::util::Date WorkbookSettings::getNullDate() const { - static const Date saDate1900 ( 30, 12, 1899 ); - static const Date saDate1904 ( 1, 1, 1904 ); - static const Date saDateBackCompatibility1900( 31, 12, 1899 ); + static const css::util::Date saDate1900 ( 30, 12, 1899 ); + static const css::util::Date saDate1904 ( 1, 1, 1904 ); + static const css::util::Date saDateBackCompatibility1900( 31, 12, 1899 ); if( getOoxFilter().getVersion() == oox::core::ISOIEC_29500_2008 ) { |