dev/null |binary sw/qa/extras/inc/swmodeltestbase.hxx | 14 -------------- sw/qa/extras/odfexport/odfexport.cxx | 11 ----------- sw/source/filter/xml/xmltble.cxx | 26 +------------------------- 4 files changed, 1 insertion(+), 50 deletions(-)
New commits: commit da5d3f0fc8edc38f3830644aee0507c7675b37b3 Author: jan iversen <j...@documentfoundation.org> Date: Fri Dec 25 12:53:34 2015 +0000 Revert "tdf#96412 Fix export text table cell UserDefinedAttributes to xml." This reverts commit d3e57ccf2e56a75bd4f004de53793f1742e34bc4. There is a problem with the test case, that breaks 2 tinderboxes. A simple test, detected more errors, open the document in LO 5.0.x and save it, then the test case has a problem on all platforms. Change-Id: If4d6a62ed5e7882e6e61e7d31ca0a29094df103c Reviewed-on: https://gerrit.libreoffice.org/20935 Reviewed-by: jan iversen <j...@documentfoundation.org> Tested-by: jan iversen <j...@documentfoundation.org> diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx index dc977f1..ce02b3e 100644 --- a/sw/qa/extras/inc/swmodeltestbase.hxx +++ b/sw/qa/extras/inc/swmodeltestbase.hxx @@ -11,7 +11,6 @@ #define INCLUDED_SW_QA_EXTRAS_INC_SWMODELTESTBASE_HXX #include <com/sun/star/container/XContentEnumerationAccess.hpp> -#include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/frame/Desktop.hpp> #include <com/sun/star/packages/zip/ZipFileAccess.hpp> #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> @@ -29,7 +28,6 @@ #include <com/sun/star/sdb/DatabaseContext.hpp> #include <com/sun/star/sdb/XDocumentDataSource.hpp> #include <com/sun/star/sdbc/XRowSet.hpp> -#include <com/sun/star/xml/AttributeData.hpp> #include <test/bootstrapfixture.hxx> #include <test/xmltesttools.hxx> @@ -435,18 +433,6 @@ protected: return properties->getPropertySetInfo()->hasPropertyByName(name); } - xml::AttributeData getUserDefineAttribute(const uno::Any& obj, const OUString& name, const OUString& rValue = OUString()) const - { - uno::Reference<container::XNameContainer> attrsCnt(getProperty<uno::Any>(obj, "UserDefinedAttributes"), uno::UNO_QUERY_THROW); - - xml::AttributeData aValue; - attrsCnt->getByName(name) >>= aValue; - if (!rValue.isEmpty()) - CPPUNIT_ASSERT_EQUAL_MESSAGE("attribtes of cell does not contain expected value", rValue, aValue.Value); - - return aValue; - } - /// Get number of paragraphs of the document. int getParagraphs() { diff --git a/sw/qa/extras/odfexport/data/userdefattr-tablecell.odt b/sw/qa/extras/odfexport/data/userdefattr-tablecell.odt deleted file mode 100644 index c8f6dcc..0000000 Binary files a/sw/qa/extras/odfexport/data/userdefattr-tablecell.odt and /dev/null differ diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 1226228..addf9c5 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -770,17 +770,6 @@ DECLARE_ODFEXPORT_TEST(testOdtBorderTypes, "border_types.odt") } while (xParaEnum->hasMoreElements()); } -DECLARE_ODFEXPORT_TEST(testCellUserDefineAttr, "userdefattr-tablecell.odt") -{ - uno::Reference<text::XTextTable> xTable(getParagraphOrTable(0), uno::UNO_QUERY); - uno::Reference<table::XCell> const xCellA1(xTable->getCellByName("A1"), uno::UNO_SET_THROW); - uno::Reference<table::XCell> const xCellB1(xTable->getCellByName("B1"), uno::UNO_SET_THROW); - uno::Reference<table::XCell> const xCellC1(xTable->getCellByName("C1"), uno::UNO_SET_THROW); - getUserDefineAttribute(uno::makeAny(xCellA1), "proName", "v1"); - getUserDefineAttribute(uno::makeAny(xCellB1), "proName", "v2"); - getUserDefineAttribute(uno::makeAny(xCellC1), "proName", "v3"); -} - #endif CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index 6b891a3..227ea83 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -29,7 +29,6 @@ #include <svl/zforlist.hxx> #include <editeng/brushitem.hxx> #include <editeng/boxitem.hxx> -#include <editeng/xmlcnitm.hxx> #include <fmtrowsplt.hxx> #include <editeng/frmdiritem.hxx> #include <list> @@ -313,7 +312,6 @@ bool SwXMLTableFrameFormatsSort_Impl::AddCell( SwFrameFormat& rFrameFormat, const SvxBoxItem *pBox = nullptr; const SwTableBoxNumFormat *pNumFormat = nullptr; const SvxFrameDirectionItem *pFrameDir = nullptr; - const SvXMLAttrContainerItem *pAttCnt = nullptr; const SfxItemSet& rItemSet = rFrameFormat.GetAttrSet(); const SfxPoolItem *pItem; @@ -333,12 +331,9 @@ bool SwXMLTableFrameFormatsSort_Impl::AddCell( SwFrameFormat& rFrameFormat, if ( SfxItemState::SET == rItemSet.GetItemState( RES_FRAMEDIR, false, &pItem ) ) pFrameDir = static_cast<const SvxFrameDirectionItem *>(pItem); - if ( SfxItemState::SET == rItemSet.GetItemState( RES_UNKNOWNATR_CONTAINER, - false, &pItem ) ) - pAttCnt = static_cast<const SvXMLAttrContainerItem *>(pItem); // empty styles have not to be exported - if( !pVertOrient && !pBrush && !pBox && !pNumFormat && !pFrameDir && !pAttCnt ) + if( !pVertOrient && !pBrush && !pBox && !pNumFormat && !pFrameDir ) return false; // order is: -/-/-/num, @@ -356,7 +351,6 @@ bool SwXMLTableFrameFormatsSort_Impl::AddCell( SwFrameFormat& rFrameFormat, const SvxBoxItem *pTestBox = nullptr; const SwTableBoxNumFormat *pTestNumFormat = nullptr; const SvxFrameDirectionItem *pTestFrameDir = nullptr; - const SvXMLAttrContainerItem *pTestAttCnt = nullptr; const SwFrameFormat* pTestFormat = *i; const SfxItemSet& rTestSet = pTestFormat->GetAttrSet(); if( SfxItemState::SET == rTestSet.GetItemState( RES_VERT_ORIENT, false, @@ -430,21 +424,6 @@ bool SwXMLTableFrameFormatsSort_Impl::AddCell( SwFrameFormat& rFrameFormat, } - if ( SfxItemState::SET == rTestSet.GetItemState( RES_UNKNOWNATR_CONTAINER, - false, &pItem ) ) - { - if( !pAttCnt ) - break; - - pTestAttCnt = static_cast<const SvXMLAttrContainerItem *>(pItem); - } - else - { - if ( pAttCnt ) - continue; - - } - if( pVertOrient && pVertOrient->GetVertOrient() != pTestVertOrient->GetVertOrient() ) continue; @@ -461,9 +440,6 @@ bool SwXMLTableFrameFormatsSort_Impl::AddCell( SwFrameFormat& rFrameFormat, if( pFrameDir && pFrameDir->GetValue() != pTestFrameDir->GetValue() ) continue; - if( pAttCnt && ( *pAttCnt != *pTestAttCnt ) ) - continue; - // found! rFrameFormat.SetName( pTestFormat->GetName() ); bInsert = false; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits