sc/qa/unit/data/xlsx/formats.xlsx |binary sc/qa/unit/subsequent_filters-test.cxx | 2 +- sc/source/filter/excel/xestyle.cxx | 8 +++----- 3 files changed, 4 insertions(+), 6 deletions(-)
New commits: commit 0251fdd0336e26cf391331a1fca1edb309b6dc92 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Sat Sep 22 22:00:36 2012 +0200 now we can also activate the cond format import test for xlsx Change-Id: Idb72bb2616c212439241d93ac28c9649457507a3 diff --git a/sc/qa/unit/data/xlsx/formats.xlsx b/sc/qa/unit/data/xlsx/formats.xlsx index 6eb216c..ddc828a 100644 Binary files a/sc/qa/unit/data/xlsx/formats.xlsx and b/sc/qa/unit/data/xlsx/formats.xlsx differ diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index b5d845c..d48c455 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -626,7 +626,7 @@ void testFormats_Impl(ScFiltersTest* pFiltersTest, ScDocument* pDoc, sal_Int32 n CPPUNIT_ASSERT_EQUAL_MESSAGE("cell content should be aligned block horizontally", SVX_HOR_JUSTIFY_BLOCK, eHorJustify); //test Sheet3 only for ods - if ( nFormat == ODS ) + if ( nFormat == ODS || nFormat == XLSX ) { rtl::OUString aCondString = getConditionalFormatString(pDoc, 3,0,2); pFiltersTest->createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("conditionalFormatting.")), aCSVFileName); commit b774fc9f90be8ebe4878ed84920f6f7afa4f12e4 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Sat Sep 22 22:00:02 2012 +0200 fix another problem in dxf export Change-Id: Ib6417b88b89a8960e73d6d4dc985223adb22be4d diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index da41b05..ebbe256 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -2877,7 +2877,6 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot ) (*mpKeywordTable)[ NF_KEY_NNNN ] = String( RTL_CONSTASCII_USTRINGPARAM( "DDDD" ) ); // Export the Thai T NatNum modifier. (*mpKeywordTable)[ NF_KEY_THAI_T ] = String( RTL_CONSTASCII_USTRINGPARAM( "T" ) ); - sal_Int32 nNumFmtIndex = 0; SCTAB nTables = rRoot.GetDoc().GetTableCount(); for(SCTAB nTab = 0; nTab < nTables; ++nTab) @@ -2949,9 +2948,8 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot ) if( rSet.GetItemState( ATTR_VALUE_FORMAT, sal_True, &pPoolItem ) == SFX_ITEM_SET ) { sal_uLong nScNumFmt = static_cast< sal_uInt32 >( static_cast< const SfxInt32Item* >(pPoolItem)->GetValue()); - sal_uInt16 nXclNumFmt = static_cast< sal_uInt16 >( EXC_FORMAT_OFFSET8 + nIndex ); + sal_Int32 nXclNumFmt = GetRoot().GetNumFmtBuffer().Insert(nScNumFmt); pNumFormat = new XclExpNumFmt( nScNumFmt, nXclNumFmt, GetNumberFormatCode( *this, nScNumFmt, mxFormatter.get(), mpKeywordTable.get() )); - ++nNumFmtIndex; } maDxf.push_back(new XclExpDxf( rRoot, pAlign, pBorder, pFont, pNumFormat, pCellProt, pColor )); commit 8deaaa66976569ebc5ba872cbcc09f8ccb45a2c4 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Sat Sep 22 05:28:44 2012 +0200 correctly export number formats in conditional format export to xlsx Change-Id: I2a4a65bd5e622d900c77704dfe198ffab0be6c42 diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 37faabb..da41b05 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -2938,7 +2938,7 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot ) XclExpFont* pFont = NULL; // check if non default font is set and only export then - if (rSet.GetItemState(rSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT ))>SFX_ITEM_DEFAULT ) + if (rSet.GetItemState(rSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT )) == SFX_ITEM_SET ) { Font aFont = XclExpFontHelper::GetFontFromItemSet( GetRoot(), rSet, com::sun::star::i18n::ScriptType::WEAK ); pFont = new XclExpFont( GetRoot(), XclFontData( aFont ), EXC_COLOR_CELLTEXT ); @@ -2946,7 +2946,7 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot ) XclExpNumFmt* pNumFormat = NULL; const SfxPoolItem *pPoolItem = NULL; - if( rSet.GetItemState( SID_ATTR_NUMBERFORMAT_VALUE, sal_True, &pPoolItem ) == SFX_ITEM_SET ) + if( rSet.GetItemState( ATTR_VALUE_FORMAT, sal_True, &pPoolItem ) == SFX_ITEM_SET ) { sal_uLong nScNumFmt = static_cast< sal_uInt32 >( static_cast< const SfxInt32Item* >(pPoolItem)->GetValue()); sal_uInt16 nXclNumFmt = static_cast< sal_uInt16 >( EXC_FORMAT_OFFSET8 + nIndex ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits