To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=35579
------- Additional comments from [email protected] Wed May 6 07:30:23 +0000 2009 ------- TBE->LVYUE,MAOYG: This patch looks really nice. I did some testing and everything works fine. I only have some minor remarks to your code, please see below. Before we can integrate your patch we unfortunately have to wait until the childworkspace (CWS) calc49 is integrated, because this CWS also changes the filter dialog. After that it's necessary that you adjust your patch, that means that you remove the duplicate and conflicting changes to the filter dialog from your patch. After the CWS calc49 is integrated it's also necessary that you update the specification for this feature with the new screenshots (FilterFeatureSpecificationDocument.odt, see attachment from January 7, 2008). Finally some code has to be written for the OOXML filter, but I propose that this will be done by Daniel. ================================================================================ offapi/com/sun/star/sheet/FilterOperator2.idl ================================================================================ > +/** specifies the type of a single condition in a filter descriptor. > + <p>This constants group extends the <type>FilterOperator</type> enum by > + additional filter operators.</p> > + @since OOo 3.0 > + */ For readability please add an empty line before and after the paragraph starting with <p> and ending with </p>. Please update the @since tag to OOo 3.2. And in addition please indent the end of the comment '*/' as in all other lines. ================================================================================ offapi/com/sun/star/sheet/TableFilterField2.idl ================================================================================ > +/** describes a single condition in a filter descriptor. > + <p>This struct has the <type>FilterOperator2</type> constants group as > + member, whereas the <type>TableFilterField</type> struct uses the > + <type>FilterOperator</type> enum.</p> > + @see com::sun::star::sheet::SheetFilterDescriptor > + @since OOo 3.0 > + */ As in the previous comment please add some empty lines and change the position of the '*/'. Please update the @since tag to OOo 3.2. ================================================================================ offapi/com/sun/star/sheet/XSheetFilterDescriptor2.idl ================================================================================ > +/** provides access to a collection of filter conditions (filter fields). > +<p>This interface uses the <type>TableFilterField2</type> struct, > + whereas the <type>XSheetFilterDescriptor</type> interface uses the > + <type>TableFilterField</type> struct.</p> > + @see com::sun::star::sheet::SheetFilterDescriptor > + @since OOo 3.0 > + */ As in the previous comment please add some empty lines and change the position of the '*/'. Please update the @since tag to OOo 3.2. ================================================================================ sc/inc/datauno.hxx ================================================================================ > @@ -340,7 +341,8 @@ > > // to uno, all three look the same > > -class ScFilterDescriptorBase : public cppu::WeakImplHelper3< > +class ScFilterDescriptorBase : public cppu::WeakImplHelper4< > + com::sun::star::sheet::XSheetFilterDescriptor2, > > com::sun::star::sheet::XSheetFilterDescriptor, > > com::sun::star::beans::XPropertySet, > > com::sun::star::lang::XServiceInfo >, I would add XSheetFilterDescriptor2 after XSheetFilterDescriptor, but that's only a matter of taste. > @@ -367,6 +369,11 @@ > virtual void SAL_CALL setFilterFields( const > ::com::sun::star::uno::Sequence< > > ::com::sun::star::sheet::TableFilterField >& aFilterFields ) > > throw(::com::sun::star::uno::RuntimeException); > + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::TableFilterField2 > SAL_CALL > + getFilterFields2() throw(::com::sun::star::uno::RuntimeException); > + virtual void SAL_CALL setFilterFields2( const ::com::sun::star::uno::Sequence< > + ::com::sun::star::sheet::TableFilterField2 >& aFilterFields ) > + throw(::com::sun::star::uno::RuntimeException); Please add a comment '// XSheetFilterDescriptor2' here. ================================================================================ sc/source/filter/xml/xmldrani.cxx ================================================================================ > @@ -60,6 +60,7 @@ > #include <com/sun/star/sheet/XDatabaseRanges.hpp> > #include <com/sun/star/sheet/XDatabaseRange.hpp> > #include <com/sun/star/table/CellRangeAddress.hpp> > +#include <com/sun/star/sheet/TableFilterField.hpp> Is this include really necessary? > @@ -382,9 +383,10 @@ > > pDBData->SetSortParam(aSortParam); > } > uno::Reference > <sheet::XSheetFilterDescriptor> xSheetFilterDescriptor(xDatabaseRange->getFilterDescriptor()); > - if > (xSheetFilterDescriptor.is()) > + uno::Reference< sheet::XSheetFilterDescriptor2 > xSheetFilterDescriptor2( xSheetFilterDescriptor, uno::UNO_QUERY ); > + if > (xSheetFilterDescriptor2.is()) > { > - uno::Reference > <beans::XPropertySet> xFilterPropertySet (xSheetFilterDescriptor, uno::UNO_QUERY); > + uno::Reference > <beans::XPropertySet> xFilterPropertySet (xSheetFilterDescriptor2, uno::UNO_QUERY); The first lines can be combined to uno::Reference< sheet::XSheetFilterDescriptor2 > xSheetFilterDescriptor2( xDatabaseRange->getFilterDescriptor(), uno::UNO_QUERY ); After that the variable xSheetFilterDescriptor2 can be renamed to xSheetFilterDescriptor. > @@ -396,7 +398,8 @@ > xFilterPropertySet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_USEREGEX)), uno::makeAny(bFilterUseRegularExpressions)); > xFilterPropertySet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_OUTPOS)), uno::makeAny(aFilterOutputPosition)); > } > - > xSheetFilterDescriptor->setFilterFields(aFilterFields); > + if ( xSheetFilterDescriptor2.is() ) > + xSheetFilterDescriptor2->setFilterFields2(aFilterFields); The second check xSheetFilterDescriptor2.is() can be removed. ================================================================================ sc/source/filter/xml/XMLExportDatabaseRanges.cxx ================================================================================ > @@ -55,6 +55,7 @@ > #include <com/sun/star/sheet/XDatabaseRanges.hpp> > #include <com/sun/star/sheet/XDatabaseRange.hpp> > #include <com/sun/star/table/TableOrientation.hpp> > +#include <com/sun/star/sheet/XSheetFilterDescriptor.hpp> I think this iinclude can be removed. > @@ -632,11 +645,13 @@ > if (::cppu::any2bool(xPropertySetDatabaseRange->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_STRIPDAT))))) > > rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_HAS_PERSISTENT_DATA, XML_FALSE); > } > - uno::Reference > <sheet::XSheetFilterDescriptor> xSheetFilterDescriptor(xDatabaseRange->getFilterDescriptor()); > + > + uno::Reference <sheet::XSheetFilterDescriptor> xSheetFilterDescriptor(xDatabaseRange->getFilterDescriptor()); > + uno::Reference< sheet::XSheetFilterDescriptor2 > xSheetFilterDescriptor2( xSheetFilterDescriptor, uno::UNO_QUERY ); The last two lines can be combined to uno::Reference< sheet::XSheetFilterDescriptor2 > xSheetFilterDescriptor2( xDatabaseRange->getFilterDescriptor(), uno::UNO_QUERY ); because the xSheetFilterDescriptor variable is not needed anymore. Then in the ScXMLExportDatabaseRanges::WriteDatabaseRanges() method the xSheetFilterDescriptor2 variable can be renamed to xSheetFilterDescriptor. ================================================================================ sc/source/filter/xml/xmlfilti.hxx ================================================================================ > @@ -36,7 +36,8 @@ > #include <com/sun/star/table/CellAddress.hpp> > #include <com/sun/star/table/CellRangeAddress.hpp> > #include <com/sun/star/sheet/FilterOperator.hpp> > -#include <com/sun/star/sheet/TableFilterField.hpp> > +#include <com/sun/star/sheet/FilterOperator2.hpp> > +#include <com/sun/star/sheet/TableFilterField2.hpp> Must TableFilterField.hpp still be included? ================================================================================ sc/source/ui/vba/vbarange.cxx ================================================================================ > @@ -77,7 +77,11 @@ > #include <com/sun/star/sheet/XCellRangeMovement.hpp> > #include <com/sun/star/sheet/XCellRangeData.hpp> > #include <com/sun/star/sheet/FormulaResult.hpp> > +#include <com/sun/star/sheet/FilterOperator2.hpp> > #include <com/sun/star/sheet/TableFilterField.hpp> > +#include <com/sun/star/sheet/TableFilterField2.hpp> > +#include <com/sun/star/sheet/XSheetFilterDescriptor.hpp> > +#include <com/sun/star/sheet/XSheetFilterDescriptor2.hpp> I think the XSheetFilterDescriptor.hpp include is not necessary. > @@ -4213,13 +4217,16 @@ > bool bAll = false;; > if ( ( Field >>= nField ) ) > { > - uno::Sequence< sheet::TableFilterField > sTabFilts; > - uno::Reference< sheet::XSheetFilterDescriptor > xDesc = xDataBaseRange->getFilterDescriptor(); > - uno::Reference< beans::XPropertySet > xDescProps( xDesc, uno::UNO_QUERY_THROW ); > + uno::Reference< sheet::XSheetFilterDescriptor > xDesc = xDataBaseRange->getFilterDescriptor(); > + uno::Reference< sheet::XSheetFilterDescriptor2 > xDesc2( xDesc, uno::UNO_QUERY ); > + if ( xDesc2.is() ) > + { > + uno::Sequence< sheet::TableFilterField2 > sTabFilts; > + uno::Reference< beans::XPropertySet > xDescProps( xDesc2, uno::UNO_QUERY_THROW ); The first lines can be combined to uno::Reference< sheet::XSheetFilterDescriptor2 > xDesc2( xDatabaseRange->getFilterDescriptor(), uno::UNO_QUERY ); After that the variable xDesc2 can be renamed to xDesc. > if ( Criteria1.hasValue() ) > { > sTabFilts.realloc( 1 ); > - sTabFilts[0].Operator = sheet::FilterOperator_EQUAL;// > sensible default > + sTabFilts[0].Operator = sheet::FilterOperator2::EQUAL;// sensible default The indentation of those lines and all the following is wrong. > @@ -4333,7 +4341,10 @@ > lcl_SetAllQueryForField( pShell, > rEntry.nField, nSheet ); > } > // remove exising filters > - xDataBaseRange->getFilterDescriptor()->setFilterFields( > uno::Sequence< sheet::TableFilterField >() ); > + uno::Reference <sheet::XSheetFilterDescriptor> xSheetFilterDescriptor( xDataBaseRange->getFilterDescriptor() ); > + uno::Reference< sheet::XSheetFilterDescriptor2 > xSheetFilterDescriptor2( xSheetFilterDescriptor, uno::UNO_QUERY ); > + if( xSheetFilterDescriptor2.is() ) > + xSheetFilterDescriptor2->setFilterFields2( > uno::Sequence< sheet::TableFilterField2 >() ); The first lines can be combined to uno::Reference< sheet::XSheetFilterDescriptor2 > xSheetFilterDescriptor2( xDatabaseRange->getFilterDescriptor(), uno::UNO_QUERY ); After that the variable xSheetFilterDescriptor2 can be renamed to xSheetFilterDescriptor. ================================================================================ xmloff/source/core/xmltoken.cxx ================================================================================ > @@ -2976,6 +2976,12 @@ > TOKEN( "near-origin", XML_NEAR_ORIGIN ), > TOKEN( "dependency", XML_DEPENDENCY ), > TOKEN( "nav-order", XML_NAV_ORDER ), > + TOKEN( "contains", XML_CONTAINS ), > + TOKEN( "does-not-contain", > XML_DOES_NOT_CONTAIN ), > + TOKEN( "begins-with", XML_BEGINS_WITH > ), > + TOKEN( "does-not-begin-with", > XML_DOES_NOT_BEGIN_WITH ), > + TOKEN( "ends-with", XML_ENDS_WITH ), > + TOKEN( "does-not-end-with", > XML_DOES_NOT_END_WITH ), Please indent the last column with spaces instead of tabls. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
