Tag: cws_src680_reportdesign02 User: oj Date: 2007-12-20 07:48:46+0000 Modified: dba/reportdesign/java/com/sun/star/report/pentaho/layoutprocessor/ImageElementLayoutController.java dba/reportdesign/prj/build.lst dba/reportdesign/source/core/api/ReportEngineJFree.cxx dba/reportdesign/source/filter/xml/xmlExport.cxx dba/reportdesign/source/ui/dlg/Navigator.cxx dba/reportdesign/source/ui/report/ReportController.cxx dba/reportdesign/source/ui/report/ReportSection.cxx dba/reportdesign/source/ui/report/ReportWindow.cxx dba/reportdesign/source/ui/report/ViewsWindow.cxx dba/reportdesign/util/makefile.mk
Log: RESYNC: (1.2-1.3); FILE MERGED File Changes: Directory: /dba/reportdesign/java/com/sun/star/report/pentaho/layoutprocessor/ ============================================================================== File [changed]: ImageElementLayoutController.java Url: http://dba.openoffice.org/source/browse/dba/reportdesign/java/com/sun/star/report/pentaho/layoutprocessor/ImageElementLayoutController.java?r1=1.2.44.1&r2=1.2.44.2 Delta lines: +13 -7 -------------------- --- ImageElementLayoutController.java 2007-11-06 14:22:43+0000 1.2.44.1 +++ ImageElementLayoutController.java 2007-12-20 07:48:02+0000 1.2.44.2 @@ -141,7 +141,7 @@ final int rowSpan = TextUtilities.parseInt ((String) tableCell.getAttribute(OfficeNamespaces.TABLE_NS, "number-rows-spanned"), 1); final int colSpan = TextUtilities.parseInt - ((String) tableCell.getAttribute(OfficeNamespaces.TABLE_NS, "number-cols-spanned"), 1); + ((String) tableCell.getAttribute(OfficeNamespaces.TABLE_NS, "number-columns-spanned"), 1); if (rowSpan < 1 || colSpan < 1) { Log.warn("Rowspan or colspan for image-size calculation was invalid."); @@ -158,7 +158,7 @@ // we are now making the assumption, that the row is a section, that contains the table-cell. // This breaks the ability to return nodes or to construct reports on the fly, but the OO-report format // is weird anyway and wont support such advanced techniques for the next few centuries .. - final int columnPos = findNodeInSection(tableRow, tableCell); + final int columnPos = findNodeInSection(tableRow, tableCell,"covered-table-cell"); if (columnPos == -1) { Log.warn("Table-Cell is not a direct child of the table-row. Unable to calculate the image-size."); @@ -212,7 +212,7 @@ } // finally search the styles for the row now. - final int rowPos = findNodeInSection(table, tableRow); + final int rowPos = findNodeInSection(table, tableRow,null); if (rowPos == -1) { Log.warn("Table-Cell is not a direct child of the table-row. Unable to calculate the image-size."); @@ -249,7 +249,8 @@ } private int findNodeInSection(final Section tableRow, - final Element tableCell) + final Element tableCell, + final String secondType) { int retval = 0; final Node[] nodes = tableRow.getNodeArray(); @@ -263,9 +264,14 @@ continue; } final Element child = (Element) node; +/* if (! "covered-table-cell".equals(child.getType()) && (ObjectUtilities.equal(child.getNamespace(), namespace) == false || ObjectUtilities.equal(child.getType(), type) == false)) +*/ + if (ObjectUtilities.equal(child.getNamespace(), namespace) == false || + (ObjectUtilities.equal(child.getType(), type) == false + && (secondType == null || ObjectUtilities.equal(child.getType(), secondType) == false)) ) { continue; } Directory: /dba/reportdesign/prj/ ================================= File [changed]: build.lst Url: http://dba.openoffice.org/source/browse/dba/reportdesign/prj/build.lst?r1=1.4.36.1&r2=1.4.36.2 Delta lines: +1 -1 ------------------- --- build.lst 2007-11-01 11:18:14+0000 1.4.36.1 +++ build.lst 2007-12-20 07:48:05+0000 1.4.36.2 @@ -1,4 +1,4 @@ -rd reportdesign : boost jfreereport comphelper dbaccess NULL +rd reportdesign : boost JFREEREPORT:jfreereport comphelper dbaccess readlicense_oo NULL rd reportdesign usr1 - all rd_mkout NULL rd reportdesign\inc nmake - all rd_inc NULL rd reportdesign\java nmake - all rd_java NULL Directory: /dba/reportdesign/source/core/api/ ============================================= File [changed]: ReportEngineJFree.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/api/ReportEngineJFree.cxx?r1=1.4.36.1&r2=1.4.36.2 Delta lines: +44 -13 --------------------- --- ReportEngineJFree.cxx 2007-10-26 10:42:11+0000 1.4.36.1 +++ ReportEngineJFree.cxx 2007-12-20 07:48:13+0000 1.4.36.2 @@ -68,6 +68,11 @@ #ifndef _COM_SUN_STAR_SDB_XCOMPLETEDEXECUTION_HPP_ #include <com/sun/star/sdb/XCompletedExecution.hpp> #endif +#include <com/sun/star/sdb/XSingleSelectQueryAnalyzer.hpp> +#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp> +#include <com/sun/star/sdb/CommandType.hpp> +#include <connectivity/statementcomposer.hxx> + #include <com/sun/star/task/XInteractionHandler.hpp> #ifndef _COM_SUN_STAR_TASK_XJOB_HPP_ #include <com/sun/star/task/XJob.hpp> @@ -238,7 +243,7 @@ uno::Reference< beans::XPropertySet> xStorageProp(xTemp,uno::UNO_QUERY); if ( xStorageProp.is() ) { - static const ::rtl::OUString sPropName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")); + static const ::rtl::OUString sPropName(RTL_CONSTASCII_USTRINGPARAM("MediaType")); xStorageProp->setPropertyValue( sPropName, uno::makeAny(m_xReport->getMimeType())); } m_xReport->storeToStorage(xTemp,aEmpty); // store to temp file because it may contain information which aren't in the database yet. @@ -258,7 +263,7 @@ //! TODO: has to be changed into a temp storage later on const static String s_sExt = String::CreateFromAscii(".rpt"); String sName = m_xReport->getName(); - ::utl::TempFile aFile(sName,&s_sExt); + ::utl::TempFile aFile(sName,sal_False,&s_sExt); uno::Reference< embed::XStorage > xOut = OStorageHelper::GetStorageFromURL(aFile.GetURL(),embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE,uno::Reference< lang::XMultiServiceFactory >(m_xContext->getServiceManager(),uno::UNO_QUERY)); utl::DisposableComponent aOut(xOut); xStorageProp.set(xOut,uno::UNO_QUERY); @@ -289,10 +294,36 @@ ::rtl::OUString sOrder = getOrderStatement(); if (sOrder.getLength() > 0) { - xRowSetProp->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Order")),uno::makeAny(sOrder)); + sal_Int32 nCommandType = 0; + xRowSetProp->getPropertyValue(PROPERTY_COMMANDTYPE) >>= nCommandType; + if (nCommandType != sdb::CommandType::TABLE) + { + rtl::OUString sOldCommand; + xRowSetProp->getPropertyValue(PROPERTY_COMMAND) >>= sOldCommand; + dbtools::StatementComposer aComposer(m_xActiveConnection, sOldCommand, nCommandType, sal_True ); + + uno::Reference< sdb::XSingleSelectQueryComposer > xComposer( aComposer.getComposer() ); + if ( xComposer.is() ) + { + rtl::OUString sCurrentSQL = xComposer->getQuery(); + // Magic here, read the nice documentation out of the IDL. + xComposer->setQuery(sCurrentSQL); + rtl::OUString sOldOrder = xComposer->getOrder(); + if (sOldOrder.getLength() > 0) + { + sOrder += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); + sOrder += sOldOrder; + xComposer->setOrder(rtl::OUString()); + rtl::OUString sQuery = xComposer->getQuery(); + xRowSetProp->setPropertyValue(PROPERTY_COMMAND, uno::makeAny(sQuery)); + xRowSetProp->setPropertyValue(PROPERTY_COMMANDTYPE, uno::makeAny(sdb::CommandType::COMMAND)); + } + } + } } - if ( m_xReport->getFilter().getLength() ) - xRowSetProp->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ApplyFilter")),uno::makeAny(sal_True)); + // we have to set the order everytime, at least we clear the old one. + xRowSetProp->setPropertyValue(PROPERTY_ORDER,uno::makeAny(sOrder)); + xRowSetProp->setPropertyValue(PROPERTY_APPLYFILTER,uno::makeAny(m_xReport->getFilter().getLength() != 0)); uno::Reference<sdb::XCompletedExecution> xExecute( m_xRowSet, uno::UNO_QUERY ); if ( xExecute.is() ) Directory: /dba/reportdesign/source/filter/xml/ =============================================== File [changed]: xmlExport.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/filter/xml/xmlExport.cxx?r1=1.5.36.1&r2=1.5.36.2 Delta lines: +33 -16 --------------------- --- xmlExport.cxx 2007-10-30 14:37:45+0000 1.5.36.1 +++ xmlExport.cxx 2007-12-20 07:48:16+0000 1.5.36.2 @@ -994,6 +994,7 @@ { Reference<XReportControlModel> xReportElement(xElement,uno::UNO_QUERY); Reference<XReportDefinition> xReportDefinition(xElement,uno::UNO_QUERY); + Reference< XImageControl > xImage(xElement,uno::UNO_QUERY); Reference<XSection> xSection(xElement,uno::UNO_QUERY); XMLTokenEnum eToken = XML_SECTION; @@ -1010,15 +1011,14 @@ else if ( xElement->supportsService(SERVICE_IMAGECONTROL) ) { eToken = XML_IMAGE; - Reference< XImageControl > xProp(xElement,uno::UNO_QUERY); - ::rtl::OUString sTargetLocation = xProp->getImageURL(); + ::rtl::OUString sTargetLocation = xImage->getImageURL(); if ( sTargetLocation.getLength() ) { sTargetLocation = GetRelativeReference(sTargetLocation); AddAttribute(XML_NAMESPACE_FORM, XML_IMAGE_DATA,sTargetLocation); } bExportData = sal_True; - if ( xProp->getScaleImage() ) + if ( xImage->getScaleImage() ) AddAttribute(XML_NAMESPACE_REPORT, XML_SCALE, XML_TRUE ); } else if ( xReportDefinition.is() ) @@ -1078,7 +1078,7 @@ } } else if ( eToken == XML_IMAGE ) - AddAttribute(XML_NAMESPACE_REPORT, XML_PRESERVE_IRI, XML_TRUE ); + AddAttribute(XML_NAMESPACE_REPORT, XML_PRESERVE_IRI, xImage->getPreserveIRI() ? XML_TRUE : XML_FALSE ); } if ( !bPageSet ) @@ -1095,6 +1095,12 @@ else if ( eToken == XML_SUB_DOCUMENT ) { exportMasterDetailFields(xReportDefinition); + SvXMLElementExport aOfficeElement( *this, XML_NAMESPACE_OFFICE, XML_BODY,sal_True, sal_True ); + SvXMLElementExport aElem( *this, sal_True, + XML_NAMESPACE_OFFICE, XML_REPORT, + sal_True, sal_True ); + + exportReportAttributes(xReportDefinition); exportReport(xReportDefinition); } else if ( xSection.is() ) @@ -1160,6 +1166,8 @@ ::rtl::OUString ORptExport::convertFormula(const ::rtl::OUString& _sFormula) { ::rtl::OUString sFormula = _sFormula; + if ( _sFormula.equalsAsciiL("rpt:",4) ) + sFormula = ::rtl::OUString(); //sal_Int32 nLength = _sFormula.getLength(); //if ( nLength ) //{ @@ -1180,7 +1188,7 @@ // ----------------------------------------------------------------------------- bool ORptExport::exportFormula(enum ::xmloff::token::XMLTokenEnum eName,const ::rtl::OUString& _sFormula) { - ::rtl::OUString sFieldData = convertFormula(_sFormula); + const ::rtl::OUString sFieldData = convertFormula(_sFormula); static const ::rtl::OUString s_sPageNumber(RTL_CONSTASCII_USTRINGPARAM("PageNumber()")); static const ::rtl::OUString s_sPageCount(RTL_CONSTASCII_USTRINGPARAM("PageCount()")); sal_Int32 nPageNumberIndex = sFieldData.indexOf(s_sPageNumber); @@ -1434,30 +1442,38 @@ void ORptExport::SetBodyAttributes() { Reference<XReportDefinition> xProp(getReportDefinition()); - if ( xProp.is() ) + exportReportAttributes(xProp); +} +// ----------------------------------------------------------------------------- +void ORptExport::exportReportAttributes(const Reference<XReportDefinition>& _xReport) +{ + if ( _xReport.is() ) { ::rtl::OUStringBuffer sValue; const SvXMLEnumMapEntry* aXML_CommnadTypeEnumMap = OXMLHelper::GetCommandTypeOptions(); - if ( SvXMLUnitConverter::convertEnum( sValue, static_cast<sal_uInt16>(xProp->getCommandType()),aXML_CommnadTypeEnumMap ) ) + if ( SvXMLUnitConverter::convertEnum( sValue, static_cast<sal_uInt16>(_xReport->getCommandType()),aXML_CommnadTypeEnumMap ) ) AddAttribute(XML_NAMESPACE_REPORT, XML_COMMAND_TYPE,sValue.makeStringAndClear()); - ::rtl::OUString sComamnd = xProp->getCommand(); + ::rtl::OUString sComamnd = _xReport->getCommand(); if ( sComamnd.getLength() ) AddAttribute(XML_NAMESPACE_REPORT, XML_COMMAND, sComamnd); - ::rtl::OUString sFilter( xProp->getFilter() ); + ::rtl::OUString sFilter( _xReport->getFilter() ); if ( sFilter.getLength() ) AddAttribute( XML_NAMESPACE_REPORT, XML_FILTER, sFilter ); - AddAttribute(XML_NAMESPACE_OFFICE, XML_MIMETYPE,xProp->getMimeType()); + AddAttribute(XML_NAMESPACE_OFFICE, XML_MIMETYPE,_xReport->getMimeType()); - sal_Bool bEscapeProcessing( xProp->getEscapeProcessing() ); + sal_Bool bEscapeProcessing( _xReport->getEscapeProcessing() ); if ( !bEscapeProcessing ) AddAttribute( XML_NAMESPACE_REPORT, XML_ESCAPE_PROCESSING, ::xmloff::token::GetXMLToken( XML_FALSE ) ); - ::rtl::OUString sName = xProp->getCaption(); + ::rtl::OUString sName = _xReport->getCaption(); if ( sName.getLength() ) AddAttribute(XML_NAMESPACE_OFFICE, XML_CAPTION,sName); + sName = _xReport->getName(); + if ( sName.getLength() ) + AddAttribute(XML_NAMESPACE_DRAW, XML_NAME,sName); } } // ----------------------------------------------------------------------------- @@ -1665,6 +1681,7 @@ void ORptExport::exportShapes(const Reference< XSection>& _xSection,bool _bAddParagraph) { UniReference< XMLShapeExport > xShapeExport = GetShapeExport(); + xShapeExport->seekShapes(_xSection.get()); const sal_Int32 nCount = _xSection->getCount(); awt::Point aRefPoint; ::std::auto_ptr<SvXMLElementExport> pParagraphContent; Directory: /dba/reportdesign/source/ui/dlg/ =========================================== File [changed]: Navigator.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/dlg/Navigator.cxx?r1=1.3.36.1&r2=1.3.36.2 Delta lines: +54 -35 --------------------- --- Navigator.cxx 2007-10-30 06:56:28+0000 1.3.36.1 +++ Navigator.cxx 2007-12-20 07:48:19+0000 1.3.36.2 @@ -140,10 +140,12 @@ return nId; } // ----------------------------------------------------------------------------- -::rtl::OUString lcl_getName(const uno::Reference< report::XReportComponent>& _xElement) +::rtl::OUString lcl_getName(const uno::Reference< beans::XPropertySet>& _xElement) { OSL_ENSURE(_xElement.is(),"Found report element which is NULL!"); - ::rtl::OUStringBuffer sName = _xElement->getName(); + ::rtl::OUString sTempName; + _xElement->getPropertyValue(PROPERTY_NAME) >>= sTempName; + ::rtl::OUStringBuffer sName = sTempName; uno::Reference< report::XFixedText> xFixedText(_xElement,uno::UNO_QUERY); uno::Reference< report::XReportControlModel> xReportModel(_xElement,uno::UNO_QUERY); if ( xFixedText.is() ) @@ -151,7 +153,7 @@ sName.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" : "))); sName.append(xFixedText->getLabel()); } - else if ( xReportModel->getPropertySetInfo()->hasPropertyByName(PROPERTY_DATAFIELD) ) + else if ( xReportModel.is() && _xElement->getPropertySetInfo()->hasPropertyByName(PROPERTY_DATAFIELD) ) { ReportFormula aFormula( xReportModel->getDataField() ); if ( aFormula.isValid() ) @@ -226,7 +228,6 @@ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& _rEvt ); // OSelectionChangeListener - virtual void _selectionChanged( const lang::EventObject& aEvent ) throw (uno::RuntimeException); virtual void _disposing(const lang::EventObject& _rSource) throw( uno::RuntimeException); // OPropertyChangeListener @@ -244,6 +245,8 @@ DECL_LINK(OnEntrySelDesel, NavigatorTree*); DECL_LINK( OnDropActionTimer, void* ); + virtual void _selectionChanged( const lang::EventObject& aEvent ) throw (uno::RuntimeException); + // ITraverseReport virtual void traverseReport(const uno::Reference< report::XReportDefinition>& _xReport); virtual void traverseReportFunctions(const uno::Reference< report::XFunctions>& _xFunctions); @@ -594,7 +597,7 @@ { uno::Reference< report::XReportComponent> xElement(_xSection->getByIndex(i),uno::UNO_QUERY_THROW); OSL_ENSURE(xElement.is(),"Found report element which is NULL!"); - insertEntry(lcl_getName(xElement),pSection,lcl_getImageId(xElement),LIST_APPEND,new UserData(this,xElement)); + insertEntry(lcl_getName(xElement.get()),pSection,lcl_getImageId(xElement),LIST_APPEND,new UserData(this,xElement)); uno::Reference< report::XReportDefinition> xSubReport(xElement,uno::UNO_QUERY); if ( xSubReport.is() ) { @@ -767,9 +770,9 @@ else { uno::Reference< report::XReportComponent> xElement(xProp,uno::UNO_QUERY); - if ( xElement.is() ) - sName = lcl_getName(xElement); - insertEntry(sName,pEntry,lcl_getImageId(xElement),LIST_APPEND,new UserData(this,xProp)); + if ( xProp.is() ) + sName = lcl_getName(xProp); + insertEntry(sName,pEntry,(!xElement.is() ? USHORT(SID_RPT_NEW_FUNCTION) : lcl_getImageId(xElement)),LIST_APPEND,new UserData(this,xProp)); } if ( !IsExpanded(pEntry) ) Expand(pEntry); @@ -844,6 +847,10 @@ m_pListener->addProperty(PROPERTY_NAME); else if ( xInfo->hasPropertyByName(PROPERTY_EXPRESSION) ) m_pListener->addProperty(PROPERTY_EXPRESSION); + if ( xInfo->hasPropertyByName(PROPERTY_DATAFIELD) ) + m_pListener->addProperty(PROPERTY_DATAFIELD); + if ( xInfo->hasPropertyByName(PROPERTY_LABEL) ) + m_pListener->addProperty(PROPERTY_LABEL); if ( xInfo->hasPropertyByName(PROPERTY_HEADERON) ) m_pListener->addProperty(PROPERTY_HEADERON); if ( xInfo->hasPropertyByName(PROPERTY_FOOTERON) ) @@ -872,6 +879,8 @@ SvLBoxEntry* pEntry = m_pTree->find(_rEvent.Source); OSL_ENSURE(pEntry,"No entry could be found! Why not!"); const bool bFooterOn = (PROPERTY_FOOTERON == _rEvent.PropertyName); + try + { if ( bFooterOn || PROPERTY_HEADERON == _rEvent.PropertyName ) { sal_Int32 nPos = 1; @@ -895,12 +904,20 @@ //else // m_pTree->removeEntry(m_pTree->GetEntry(pEntry,nPos)); } - else if ( PROPERTY_NAME == _rEvent.PropertyName || PROPERTY_EXPRESSION == _rEvent.PropertyName) + else if ( PROPERTY_EXPRESSION == _rEvent.PropertyName) { ::rtl::OUString sNewName; _rEvent.NewValue >>= sNewName; m_pTree->SetEntryText(pEntry,sNewName); } + else if ( PROPERTY_DATAFIELD == _rEvent.PropertyName || PROPERTY_LABEL == _rEvent.PropertyName || PROPERTY_NAME == _rEvent.PropertyName ) + { + uno::Reference<beans::XPropertySet> xProp(_rEvent.Source,uno::UNO_QUERY); + m_pTree->SetEntryText(pEntry,lcl_getName(xProp)); + } + } + catch(uno::Exception) + {} } // ----------------------------------------------------------------------------- void NavigatorTree::UserData::_elementInserted( const container::ContainerEvent& _rEvent ) throw(uno::RuntimeException) @@ -946,6 +963,8 @@ reportdesign::OReportVisitor aVisitor(m_pNavigatorTree.get()); aVisitor.start(m_xReport); m_pNavigatorTree->Expand(m_pNavigatorTree->find(m_xReport)); + lang::EventObject aEvent(*m_pController); + m_pNavigatorTree->_selectionChanged(aEvent); } //------------------------------------------------------------------------ ONavigatorImpl::~ONavigatorImpl() Directory: /dba/reportdesign/source/ui/report/ ============================================== File [changed]: ReportController.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ReportController.cxx?r1=1.4.36.4&r2=1.4.36.5 Delta lines: +75 -41 --------------------- --- ReportController.cxx 2007-11-07 08:55:03+0000 1.4.36.4 +++ ReportController.cxx 2007-12-20 07:48:23+0000 1.4.36.5 @@ -2605,9 +2605,8 @@ { SvxPageItem aPageItem(RPTUI_ID_PAGE); aPageItem.SetDescName(xPageStyle->getName()); - - //style::PageStyleLayout ePageStyleLayout = getStyleProperty<style::PageStyleLayout>(m_xReportDefinition,PROPERTY_PAGESTYLELAYOUT); - aPageItem.SetPageUsage(SVX_PAGE_ALL); + uno::Reference<beans::XPropertySet> xProp(xPageStyle,uno::UNO_QUERY_THROW); + aPageItem.PutValue(xProp->getPropertyValue(PROPERTY_PAGESTYLELAYOUT),MID_PAGE_LAYOUT); aPageItem.SetLandscape(getStyleProperty<sal_Bool>(m_xReportDefinition,PROPERTY_ISLANDSCAPE)); aPageItem.SetNumType((SvxNumType)getStyleProperty<sal_Int16>(m_xReportDefinition,PROPERTY_NUMBERINGTYPE)); pDescriptor->Put(aPageItem); @@ -2631,6 +2630,7 @@ } else { + uno::Reference< beans::XPropertySet> xProp(getUsedStyle(m_xReportDefinition),uno::UNO_QUERY_THROW); const String sUndoAction(ModuleRes(RID_STR_UNDO_CHANGEPAGE)); UndoManagerListAction aListAction(m_aUndoManager,sUndoAction); const SfxPoolItem* pItem = NULL; @@ -2639,30 +2639,35 @@ const Size aPaperSize = static_cast<const SvxSizeItem*>(pItem)->GetSize(); //view::PaperFormat eUnoPaperFormat = lcl_convertPaperFormat(SvxPaperInfo::GetSvxPaper(aPaperSize,MAP_100TH_MM,TRUE)); //m_xReportDefinition->setPaperFormat(eUnoPaperFormat); - setStyleProperty(m_xReportDefinition,PROPERTY_PAPERSIZE,AWTSize(aPaperSize)); + uno::Any aValue; + static_cast<const SvxSizeItem*>(pItem)->QueryValue(aValue,MID_SIZE_SIZE); + xProp->setPropertyValue(PROPERTY_PAPERSIZE,aValue); } if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_LRSPACE,sal_True,&pItem)) { - setStyleProperty(m_xReportDefinition,PROPERTY_LEFTMARGIN,static_cast<const SvxLRSpaceItem*>(pItem)->GetLeft()); - setStyleProperty(m_xReportDefinition,PROPERTY_RIGHTMARGIN,static_cast<const SvxLRSpaceItem*>(pItem)->GetRight()); + xProp->setPropertyValue(PROPERTY_LEFTMARGIN,uno::makeAny(static_cast<const SvxLRSpaceItem*>(pItem)->GetLeft())); + xProp->setPropertyValue(PROPERTY_RIGHTMARGIN,uno::makeAny(static_cast<const SvxLRSpaceItem*>(pItem)->GetRight())); } if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_ULSPACE,sal_True,&pItem)) { - setStyleProperty(m_xReportDefinition,PROPERTY_TOPMARGIN,static_cast<const SvxULSpaceItem*>(pItem)->GetUpper()); - setStyleProperty(m_xReportDefinition,PROPERTY_BOTTOMMARGIN,static_cast<const SvxULSpaceItem*>(pItem)->GetLower()); + xProp->setPropertyValue(PROPERTY_TOPMARGIN,uno::makeAny(static_cast<const SvxULSpaceItem*>(pItem)->GetUpper())); + xProp->setPropertyValue(PROPERTY_BOTTOMMARGIN,uno::makeAny(static_cast<const SvxULSpaceItem*>(pItem)->GetLower())); } if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_PAGE,sal_True,&pItem)) { const SvxPageItem* pPageItem = static_cast<const SvxPageItem*>(pItem); - setStyleProperty(m_xReportDefinition,PROPERTY_ISLANDSCAPE,static_cast<sal_Bool>(pPageItem->IsLandscape())); - setStyleProperty(m_xReportDefinition,PROPERTY_NUMBERINGTYPE,static_cast<sal_Int16>(pPageItem->GetNumType())); + xProp->setPropertyValue(PROPERTY_ISLANDSCAPE,uno::makeAny(static_cast<sal_Bool>(pPageItem->IsLandscape()))); + xProp->setPropertyValue(PROPERTY_NUMBERINGTYPE,uno::makeAny(static_cast<sal_Int16>(pPageItem->GetNumType()))); + uno::Any aValue; + pPageItem->QueryValue(aValue,MID_PAGE_LAYOUT); + xProp->setPropertyValue(PROPERTY_PAGESTYLELAYOUT,aValue); } if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_BRUSH,sal_True,&pItem)) { ::Color aBackColor = static_cast<const SvxBrushItem*>(pItem)->GetColor(); - setStyleProperty(m_xReportDefinition,PROPERTY_BACKTRANSPARENT,aBackColor == COL_TRANSPARENT); - setStyleProperty(m_xReportDefinition,PROPERTY_BACKCOLOR,aBackColor.GetColor()); + xProp->setPropertyValue(PROPERTY_BACKTRANSPARENT,uno::makeAny(aBackColor == COL_TRANSPARENT)); + xProp->setPropertyValue(PROPERTY_BACKCOLOR,uno::makeAny(aBackColor.GetColor())); } } } @@ -2989,7 +2994,7 @@ uno::Reference< beans::XPropertySet> xRowSetProp( xRowSet, uno::UNO_QUERY_THROW ); xRowSetProp->setPropertyValue( PROPERTY_ACTIVECONNECTION, uno::makeAny( getConnection() ) ); - xRowSetProp->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ApplyFilter" ) ), uno::makeAny( sal_True ) ); + xRowSetProp->setPropertyValue( PROPERTY_APPLYFILTER, uno::makeAny( sal_True ) ); TPropertyNamePair aPropertyMediation; aPropertyMediation.insert( TPropertyNamePair::value_type( PROPERTY_COMMAND, PROPERTY_COMMAND ) ); @@ -3020,14 +3025,18 @@ uno::Reference< ui::dialogs::XFilePickerControlAccess > xController(aDialog.GetFilePicker(), UNO_QUERY_THROW); xController->setValue(ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0, ::cppu::bool2any(sal_True)); - xController->enableControl(ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, sal_False); - xController->setValue( ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, ::cppu::bool2any( sal_True ) ); + xController->enableControl(ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, sal_False/*sal_True*/); + sal_Bool bLink = sal_True; + xController->setValue( ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, ::cppu::bool2any( bLink ) ); if ( ERRCODE_NONE == aDialog.Execute() ) { - uno::Sequence<beans::PropertyValue> aArgs(1); + xController->getValue( ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, 0) >>= bLink; + uno::Sequence<beans::PropertyValue> aArgs(2); aArgs[0].Name = PROPERTY_IMAGEURL; aArgs[0].Value <<= ::rtl::OUString(aDialog.GetPath()); + aArgs[1].Name = PROPERTY_PRESERVEIRI; + aArgs[1].Value <<= bLink; createControl(aArgs,xSection,::rtl::OUString(),OBJ_DLG_IMAGECONTROL); } } @@ -3211,7 +3220,10 @@ } } - const sal_Int32 nShapeWidth = xShapeProp->getWidth(); + const sal_Int32 nShapeWidth = aMap.getUnpackedValueOrDefault(PROPERTY_WIDTH,xShapeProp->getWidth()); + if ( nShapeWidth != xShapeProp->getWidth() ) + xShapeProp->setWidth( nShapeWidth ); + const bool bChangedPos = (aPos.X + nShapeWidth) > nPaperWidth; if ( bChangedPos ) aPos.X = nPaperWidth - nShapeWidth; @@ -3459,8 +3471,8 @@ for(i = 0; i < sizeof(pControl)/sizeof(pControl[0]);++i) { pObjs[i] = dynamic_cast<OUnoObject*>(pControl[i]); - uno::Reference<beans::XPropertySet> xUnoProp(pObjs[i]->GetUnoControlModel(),uno::UNO_QUERY); - uno::Reference< report::XReportComponent> xShapeProp(pObjs[i]->getUnoShape(),uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xUnoProp(pObjs[i]->GetUnoControlModel(),uno::UNO_QUERY_THROW); + uno::Reference< report::XReportComponent> xShapeProp(pObjs[i]->getUnoShape(),uno::UNO_QUERY_THROW); xUnoProp->setPropertyValue(PROPERTY_NAME,xShapeProp->getPropertyValue(PROPERTY_NAME)); uno::Reference<beans::XPropertySetInfo> xInfo = xUnoProp->getPropertySetInfo(); @@ -3500,8 +3512,8 @@ { // we have two different Views, so set the position x new. // pSectionViews[1].position.x = pSectionViews[0].position.x - uno::Reference< report::XReportComponent> xShapePropLabel(pObjs[0]->getUnoShape(),uno::UNO_QUERY); - uno::Reference< report::XReportComponent> xShapePropTextField(pObjs[1]->getUnoShape(),uno::UNO_QUERY); + uno::Reference< report::XReportComponent> xShapePropLabel(pObjs[0]->getUnoShape(),uno::UNO_QUERY_THROW); + uno::Reference< report::XReportComponent> xShapePropTextField(pObjs[1]->getUnoShape(),uno::UNO_QUERY_THROW); awt::Point aPosLabel = xShapePropLabel->getPosition(); awt::Point aPosTextField = xShapePropTextField->getPosition(); aPosTextField.X = aPosLabel.X; @@ -3509,11 +3521,8 @@ if (bLabelAboveTextField) { // move the label down near the splitter - uno::Reference<report::XSection> xLabelSection = pReportSection[1]->getSection(); - sal_Int32 nSectionHeight = xLabelSection->getHeight(); - sal_Int32 nLabelHeight = xShapePropLabel->getHeight(); - sal_Int32 nNewYPosition = nSectionHeight - nLabelHeight /* - 1 */; - aPosLabel.Y = nNewYPosition; + const uno::Reference<report::XSection> xLabelSection = pReportSection[1]->getSection(); + aPosLabel.Y = xLabelSection->getHeight() - xShapePropLabel->getHeight(); } else { @@ -3523,11 +3532,33 @@ xShapePropLabel->setPosition(aPosLabel); } OUnoObject* pObj = dynamic_cast<OUnoObject*>(pControl[0]); - uno::Reference< report::XReportComponent> xShapeProp(pObj->getUnoShape(),uno::UNO_QUERY); + uno::Reference< report::XReportComponent> xShapeProp(pObj->getUnoShape(),uno::UNO_QUERY_THROW); xShapeProp->setName(xShapeProp->getName() + sDefaultName ); for(i = 0; i < sizeof(pControl)/sizeof(pControl[0]);++i) correctOverlapping(pControl[i],pReportSection[1-i]); + + if (!bLabelAboveTextField ) + { + uno::Reference< report::XReportComponent> xComponent(pControl[1]->getUnoShape(),uno::UNO_QUERY_THROW); + sal_Int32 nY1 = xShapeProp->getPositionY(); + sal_Int32 nY2 = xComponent->getPositionY(); + while( nY1 != nY2 ) + { + size_t nWhich = 0; + if ( nY1 > nY2 ) + { + ++nWhich; + xComponent->setPositionY(nY1); + } + else + xShapeProp->setPositionY(nY2); + correctOverlapping(pControl[nWhich],pReportSection[1 - nWhich],false); + + nY1 = xShapeProp->getPositionY(); + nY2 = xComponent->getPositionY(); + } + } } } else @@ -3598,7 +3629,7 @@ const beans::Property* pIter = aSeq.getConstArray(); const beans::Property* pEnd = pIter + aSeq.getLength(); const ::rtl::OUString* pPropsBegin = &aProps[0]; - const ::rtl::OUString* pPropsEnd = pPropsBegin + (sizeof(aProps)/sizeof(aProps[0])) - 2; + const ::rtl::OUString* pPropsEnd = pPropsBegin + (sizeof(aProps)/sizeof(aProps[0])) - 3; for(;pIter != pEnd;++pIter) { if ( ::std::find(pPropsBegin,pPropsEnd,pIter->Name) == pPropsEnd ) @@ -3633,19 +3664,22 @@ } // for (sal_Int32 i=0;i<nCount ; ++i) if ( _bAdd ) + { m_pMyOwnView->addSection(m_xReportDefinition->getDetail(),DBDETAIL); - for (sal_Int32 i=0;i<nCount ; ++i) + for (sal_Int32 i=nCount;i > 0 ; --i) { - uno::Reference< report::XGroup > xGroup(xGroups->getByIndex(i),uno::UNO_QUERY); - if ( xGroup->getFooterOn() && _bAdd ) + uno::Reference< report::XGroup > xGroup(xGroups->getByIndex(i-1),uno::UNO_QUERY); + if ( xGroup->getFooterOn() ) m_pMyOwnView->addSection(xGroup->getFooter(),DBGROUPFOOTER); - } // for (sal_Int32 i=0;i<nCount ; ++i) - - if ( m_xReportDefinition->getReportFooterOn() && _bAdd ) + } + if ( m_xReportDefinition->getReportFooterOn() ) m_pMyOwnView->addSection(m_xReportDefinition->getReportFooter(),DBREPORTFOOTER); - if ( m_xReportDefinition->getPageFooterOn() && _bAdd ) + if ( m_xReportDefinition->getPageFooterOn()) m_pMyOwnView->addSection(m_xReportDefinition->getPageFooter(),DBPAGEFOOTER); + } + + _bAdd ? xGroups->addContainerListener(static_cast<XContainerListener*>(this)) : xGroups->removeContainerListener(static_cast<XContainerListener*>(this)); Directory: /dba/reportdesign/source/ui/report/ ============================================== File [changed]: ReportSection.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ReportSection.cxx?r1=1.5.18.2&r2=1.5.18.3 Delta lines: +4 -5 ------------------- --- ReportSection.cxx 2007-11-26 06:24:44+0000 1.5.18.2 +++ ReportSection.cxx 2007-12-20 07:48:26+0000 1.5.18.3 @@ -126,8 +126,7 @@ sal_Int32 lcl_getOverlappedControlColor(/*const uno::Reference <lang::XMultiServiceFactory> _rxFactory*/) { svtools::ExtendedColorConfig aConfig; - // sal_Int32 nColor = aConfig.GetColorValue(rtl::OUString::createFromAscii("ReportDesigner"), rtl::OUString::createFromAscii("OverlappedControl")).nColor; - sal_Int32 nColor = aConfig.GetColorValue(rtl::OUString::createFromAscii("ReportDesigner"), DBOVERLAPPEDCONTROL).nColor; + sal_Int32 nColor = aConfig.GetColorValue(CFG_REPORTDESIGNER, DBOVERLAPPEDCONTROL).getColor(); return nColor; } //------------------------------------------------------------------------------ Directory: /dba/reportdesign/source/ui/report/ ============================================== File [changed]: ReportWindow.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ReportWindow.cxx?r1=1.3.36.1&r2=1.3.36.2 Delta lines: +7 -3 ------------------- --- ReportWindow.cxx 2007-10-26 12:31:37+0000 1.3.36.1 +++ ReportWindow.cxx 2007-12-20 07:48:29+0000 1.3.36.2 @@ -102,6 +102,8 @@ #include "dlgedfac.hxx" #endif #include <boost/bind.hpp> +#include <toolkit/helper/vclunohelper.hxx> +#include <svtools/syslocale.hxx> #define SECTION_OFFSET 3 namespace rptui @@ -137,6 +139,8 @@ m_aHRuler.SetIndents(); m_aHRuler.SetMargin1(); m_aHRuler.SetMargin2(); + const MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum(); + m_aHRuler.SetUnit(MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH); m_pObjFac = new DlgEdFactory(); Directory: /dba/reportdesign/source/ui/report/ ============================================== File [changed]: ViewsWindow.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ViewsWindow.cxx?r1=1.5.10.5&r2=1.5.10.6 Delta lines: +5 -5 ------------------- --- ViewsWindow.cxx 2007-11-28 15:19:29+0000 1.5.10.5 +++ ViewsWindow.cxx 2007-12-20 07:48:32+0000 1.5.10.6 @@ -1085,10 +1085,10 @@ if ( pObjBase ) { if ( _nControlModification == ControlModification::WIDTH_SMALLEST || _nControlModification == ControlModification::WIDTH_GREATEST ) - pObjBase->getReportComponent()->setSize(awt::Size(nXMov,aObjRect.getWidth())); + pObjBase->getReportComponent()->setSize(awt::Size(nXMov,aObjRect.getHeight())); //pObj->Resize(aObjRect.TopLeft(),Fraction(nXMov,aObjRect.getWidth()),Fraction(1,1)); else if ( _nControlModification == ControlModification::HEIGHT_GREATEST || _nControlModification == ControlModification::HEIGHT_SMALLEST ) - pObjBase->getReportComponent()->setSize(awt::Size(nYMov,aObjRect.getHeight())); + pObjBase->getReportComponent()->setSize(awt::Size(aObjRect.getWidth(),nYMov)); //pObj->Resize(aObjRect.TopLeft(),Fraction(1,1),Fraction(nYMov,aObjRect.getHeight())); } } Directory: /dba/reportdesign/util/ ================================== File [changed]: makefile.mk Url: http://dba.openoffice.org/source/browse/dba/reportdesign/util/makefile.mk?r1=1.8.12.1&r2=1.8.12.2 Delta lines: +21 -8 -------------------- --- makefile.mk 2007-10-26 10:42:11+0000 1.8.12.1 +++ makefile.mk 2007-12-20 07:48:35+0000 1.8.12.2 @@ -215,6 +215,12 @@ XCU_FILES := $(ZIP1DIR)$/registry$/data$/org$/openoffice$/Office$/DataAccess.xcu \ $(ZIP1DIR)$/merge$/org$/openoffice$/Office$/DataAccess.xcu +.IF "$(WITH_LANG)"!="" +XCU_TMP := $(MISC)$/merge$/org$/openoffice$/Office$/DataAccess.xcu +.ELSE //"$(WITH_LANG)" != "" +XCU_TMP := $(MISC)$/registry$/data$/org$/openoffice$/Office$/DataAccess.xcu +.ENDIF //"$(WITH_LANG)" != "" + HTMLFILES := $(ZIP1DIR)$/THIRDPARTYREADMELICENSE.html \ $(ZIP1DIR)$/readme_en-US.html \ $(ZIP1DIR)$/readme_en-US.txt @@ -227,7 +233,7 @@ LICLINES:=$(foreach,i,$(TXTFILES) <license-text xlink:href="registration/$(i:f)" lang="$(subst,.txt, $(subst,license_, $(i:f)))" license-id="$(subst,.txt, $(subst,license_, $(i:f)))" />) .ENDIF # "$(GUI)"!="WNT" -REPRORTJARFILES := \ +REPORTJARFILES := \ $(ZIP1DIR)$/jcommon-1.0.10.jar \ $(ZIP1DIR)$/sac.jar \ $(ZIP1DIR)$/libxml-0.9.5.jar \ @@ -245,7 +251,7 @@ .INCLUDE : target.mk .IF "$(ZIP1TARGETN)"!="" -$(ZIP1TARGETN) : $(TXTFILES) $(XMLFILES) $(HTMLFILES) $(REPRORTJARFILES) +$(ZIP1TARGETN) : $(TXTFILES) $(XMLFILES) $(HTMLFILES) $(REPORTJARFILES) .ENDIF # "$(ZIP1TARGETN)"!=" $(MISC)$/update_report.flag : $(XCU_FILES) @@ -274,13 +280,20 @@ @@-$(MKDIRHIER) $(@:d) $(COPY) $< $@ -$(ZIP1DIR)$/merge$/org$/openoffice$/Office$/%.xcu : $(MISC)$/merge$/org$/openoffice$/Office$/%.xcu +$(ZIP1DIR)$/merge$/org$/openoffice$/Office$/%.xcu : $(XCU_TMP) @@-$(MKDIRHIER) $(@:d) + echo $(XCU_TMP) $(COPY) $< $@ +.IF "$(SYSTEM_JFREEREPORT)" == "YES" +$(ZIP1DIR)$/%.jar : $(JFREEREPORT_JAR:d:d)$/%.jar + @@-$(MKDIRHIER) $(@:d) + $(COPY) $< $@ +.ELSE $(ZIP1DIR)$/%.jar : $(SOLARBINDIR)$/%.jar @@-$(MKDIRHIER) $(@:d) $(COPY) $< $@ +.ENDIF $(ZIP1DIR)$/%.jar : $(CLASSDIR)$/%.jar @@-$(MKDIRHIER) $(@:d) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
