diff options
291 files changed, 3298 insertions, 1597 deletions
diff --git a/chart2/inc/pch/precompiled_chart2.hxx b/chart2/inc/pch/precompiled_chart2.hxx index 0642237ab..06888d38d 100644 --- a/chart2/inc/pch/precompiled_chart2.hxx +++ b/chart2/inc/pch/precompiled_chart2.hxx @@ -222,22 +222,22 @@ #include "svl/urihelper.hxx" #include "svl/whiter.hxx" -#include "svx/brshitem.hxx" -#include "svx/crsditem.hxx" -#include "svx/eeitem.hxx" -#include "svx/fhgtitem.hxx" +#include "editeng/brshitem.hxx" +#include "editeng/crsditem.hxx" +#include "editeng/eeitem.hxx" +#include "editeng/fhgtitem.hxx" #include "svx/flagsdef.hxx" -#include "svx/flstitem.hxx" -#include "svx/forbiddencharacterstable.hxx" +#include "editeng/flstitem.hxx" +#include "editeng/forbiddencharacterstable.hxx" #include "svx/ofaitem.hxx" -#include "svx/postitem.hxx" +#include "editeng/postitem.hxx" #include "svx/svddef.hxx" #include "svx/svditer.hxx" #include "svx/svdtypes.hxx" -#include "svx/udlnitem.hxx" +#include "editeng/udlnitem.hxx" #include "svx/unomodel.hxx" -#include "svx/unoprnms.hxx" -#include "svx/wghtitem.hxx" +#include "editeng/unoprnms.hxx" +#include "editeng/wghtitem.hxx" #include "svx/xdef.hxx" #include "svx/xflbmtit.hxx" #include "svx/xflbstit.hxx" @@ -248,7 +248,7 @@ #include "svx/xgrscit.hxx" #include "svx/xlnclit.hxx" #include "svx/xlndsit.hxx" -#include "svx/xmlcnitm.hxx" +#include "editeng/xmlcnitm.hxx" #include "svx/xpoly.hxx" diff --git a/chart2/prj/build.lst b/chart2/prj/build.lst index 2fc7889b3..8a76f4a05 100644 --- a/chart2/prj/build.lst +++ b/chart2/prj/build.lst @@ -1,4 +1,4 @@ -ch chart2 : l10n comphelper cppu cppuhelper sal svtools svx tools vcl toolkit unotools sfx2 goodies NULL +ch chart2 : l10n comphelper cppu cppuhelper sal svtools svx tools vcl toolkit unotools sfx2 NULL ch chart2 usr1 - all ch_mkout NULL ch chart2\inc nmake - all ch_inc NULL ch chart2\source\inc get - all ch_source_inc NULL diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx index c0278b9d1..3d9a2f4d9 100644 --- a/chart2/source/controller/accessibility/AccessibleBase.cxx +++ b/chart2/source/controller/accessibility/AccessibleBase.cxx @@ -39,7 +39,7 @@ #include <com/sun/star/accessibility/AccessibleEventObject.hpp> #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <com/sun/star/accessibility/AccessibleRole.hpp> - +#include <comphelper/serviceinfohelper.hxx> #include <com/sun/star/drawing/LineStyle.hpp> #include <com/sun/star/drawing/FillStyle.hpp> #include <rtl/ustrbuf.hxx> @@ -48,8 +48,8 @@ #include <rtl/uuid.h> #include <cppuhelper/queryinterface.hxx> #include <svl/itemset.hxx> -#include <svx/unofdesc.hxx> -#include <svx/outliner.hxx> +#include <editeng/unofdesc.hxx> +#include <editeng/outliner.hxx> #include <svx/svdoutl.hxx> #include <svx/svdetc.hxx> #include <svx/unoshape.hxx> @@ -944,7 +944,7 @@ OUString SAL_CALL AccessibleBase::getImplementationName() sal_Bool SAL_CALL AccessibleBase::supportsService( const OUString& ServiceName ) throw (RuntimeException) { - return SvxServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); } uno::Sequence< OUString > SAL_CALL AccessibleBase::getSupportedServiceNames() diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx index 32fba2885..afe6f5525 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx @@ -43,12 +43,12 @@ #include <com/sun/star/graphic/XGraphicProvider.hpp> // for UNO_NAME_GRAPHOBJ_URLPREFIX -#include <svx/unoprnms.hxx> +#include <editeng/unoprnms.hxx> // for Graphic #include <vcl/graph.hxx> // for GraphicObject -#include <goodies/grfmgr.hxx> +#include <svtools/grfmgr.hxx> #include <vcl/outdev.hxx> #include <comphelper/processfactory.hxx> diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx index 5dbdb9299..0b01380e7 100644 --- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx @@ -73,7 +73,7 @@ #include <svx/svxgrahicitem.hxx> #include <svx/dialogs.hrc> -#include <svx/flstitem.hxx> +#include <editeng/flstitem.hxx> #include <svx/tabline.hxx> #include <svx/flagsdef.hxx> diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index 5fa463c45..b98172979 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -46,8 +46,8 @@ #include <svl/stritem.hxx> //SfxIntegerListItem #include <svl/ilstitem.hxx> -#include <svx/eeitem.hxx> -#include <svx/frmdiritem.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/frmdiritem.hxx> // header for define RET_OK #include <vcl/msgbox.hxx> diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx index 98ae1b932..06cec9121 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx @@ -38,7 +38,7 @@ #include "ChartTypeHelper.hxx" #include "ThreeDHelper.hxx" #include <rtl/math.hxx> -#include <svx/unoprnms.hxx> +#include <editeng/unoprnms.hxx> #include <com/sun/star/drawing/ProjectionMode.hpp> //............................................................................. diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx index 4e25a14ad..dfb768745 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx @@ -39,8 +39,8 @@ // header for SfxInt32Item #include <svl/intitem.hxx> -#include <svx/eeitem.hxx> -#include <svx/frmdiritem.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/frmdiritem.hxx> //............................................................................. namespace chart diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx index 039976099..709b3fc0f 100644 --- a/chart2/source/controller/dialogs/tp_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx @@ -34,8 +34,8 @@ #include "chartview/ChartSfxItemIds.hxx" #include "NoWarningThisInCTOR.hxx" #include <svx/chrtitem.hxx> -#include <svx/eeitem.hxx> -#include <svx/frmdiritem.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/frmdiritem.hxx> //............................................................................. namespace chart diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx index 1d58fd12d..9adbb66b2 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx @@ -33,8 +33,8 @@ #include "TabPages.hrc" #include "chartview/ChartSfxItemIds.hxx" #include "HelpIds.hrc" -#include <svx/eeitem.hxx> -#include <svx/frmdiritem.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/frmdiritem.hxx> // header for class SfxInt32Item #include <svl/intitem.hxx> diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx index 382d5dfd8..6332fcada 100644 --- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx +++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx @@ -43,7 +43,7 @@ #include <svx/svdoutl.hxx> // header for class SvxForbiddenCharactersTable -#include <svx/forbiddencharacterstable.hxx> +#include <editeng/forbiddencharacterstable.hxx> #ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> diff --git a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx index e7adbe0b1..6183703cc 100644 --- a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx @@ -32,13 +32,14 @@ #include "macros.hxx" #include "ItemPropertyMap.hxx" #include "RelativeSizeHelper.hxx" -#include <svx/eeitem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/fontitem.hxx> -#include <svx/crsditem.hxx> -#include <svx/postitem.hxx> -#include <svx/wghtitem.hxx> -#include <svx/fhgtitem.hxx> +#include <editeng/memberids.hrc> +#include <editeng/eeitem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/crsditem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/wghtitem.hxx> +#include <editeng/fhgtitem.hxx> #include <svl/stritem.hxx> #include <com/sun/star/beans/XPropertyState.hpp> diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx index 2960eb0cd..5cd14a472 100644 --- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx @@ -47,10 +47,10 @@ // header for class XFillColorItem #include <svx/xflclit.hxx> #include <svl/intitem.hxx> -#include <svx/sizeitem.hxx> +#include <editeng/sizeitem.hxx> // header for class SfxStringItem #include <svl/stritem.hxx> -#include <svx/brshitem.hxx> +#include <editeng/brshitem.hxx> //SfxIntegerListItem #include <svl/ilstitem.hxx> #define _SVSTDARR_ULONGS diff --git a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx index ffec51a33..837b7504f 100644 --- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx @@ -33,10 +33,7 @@ #include "ItemPropertyMap.hxx" #include "PropertyHelper.hxx" #include "CommonConverters.hxx" - -// #ifndef _SFXINTITEM_HXX -// #include <svl/intitem.hxx> -// #endif +#include <editeng/memberids.hrc> #include <svx/xflclit.hxx> #include <svx/xlnclit.hxx> #include <svx/xflbmtit.hxx> @@ -48,7 +45,7 @@ #include <svx/xflgrit.hxx> #include <svx/xfltrit.hxx> #include <svx/xlntrit.hxx> -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> // for SfxBoolItem #include <svl/eitem.hxx> // for XFillGradientStepCountItem diff --git a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx index d45a02647..d776b0101 100644 --- a/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx +++ b/chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx @@ -32,7 +32,7 @@ #endif #include <svx/xdef.hxx> #include <svx/svddef.hxx> -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include "chartview/ChartSfxItemIds.hxx" @@ -133,7 +133,7 @@ const USHORT nDataLabelWhichPairs[] = #define CHART_POINT_WHICHPAIRS \ XATTR_LINE_FIRST, XATTR_LINE_LAST, /* 1000 - 1016 svx/xdef.hxx */ \ XATTR_FILL_FIRST, XATTR_FILL_LAST, /* 1018 - 1046 svx/xdef.hxx */ \ - EE_ITEMS_START, EE_ITEMS_END, /* 3994 - 4037 svx/eeitem.hxx */ \ + EE_ITEMS_START, EE_ITEMS_END, /* 3994 - 4037 editeng/eeitem.hxx */ \ SID_CHAR_DLG_PREVIEW_STRING, SID_CHAR_DLG_PREVIEW_STRING, \ SCHATTR_DATADESCR_START, SCHATTR_DATADESCR_END, /* 1 - 2 sch/schattr.hxx*/ \ SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_INFO, /* 10585 - 10585 svx/svxids.hrc */ \ diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx index 6ff15012f..746873a9d 100644 --- a/chart2/source/controller/main/ChartController_TextEdit.cxx +++ b/chart2/source/controller/main/ChartController_TextEdit.cxx @@ -52,7 +52,7 @@ #include <vos/mutex.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <svl/stritem.hxx> -#include <svx/fontitem.hxx> +#include <editeng/fontitem.hxx> //............................................................................. namespace chart diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index de884dfc9..076bab0ae 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -78,7 +78,7 @@ #include <vcl/svapp.hxx> #include <vos/mutex.hxx> // for OutlinerView -#include <svx/outliner.hxx> +#include <editeng/outliner.hxx> using namespace ::com::sun::star; diff --git a/chart2/source/controller/makefile.mk b/chart2/source/controller/makefile.mk index ed0e91adf..b5a5975a2 100644 --- a/chart2/source/controller/makefile.mk +++ b/chart2/source/controller/makefile.mk @@ -76,12 +76,12 @@ SHL1LIBS= $(LIB1TARGET) SHL1STDLIBS= $(CHARTTOOLS) \ $(CHARTVIEW) \ + $(EDITENGLIB) \ $(CPPULIB) \ $(CPPUHELPERLIB) \ $(COMPHELPERLIB) \ $(BASEGFXLIB) \ $(DRAWINGLAYERLIB) \ - $(GOODIESLIB) \ $(BASEGFXLIB) \ $(SALLIB) \ $(SVLLIB) \ diff --git a/chart2/source/model/main/ChartModel.hxx b/chart2/source/model/main/ChartModel.hxx index fa9418de7..f893910f4 100644 --- a/chart2/source/model/main/ChartModel.hxx +++ b/chart2/source/model/main/ChartModel.hxx @@ -67,7 +67,7 @@ #endif #include <osl/mutex.hxx> #include <cppuhelper/interfacecontainer.hxx> -#include <goodies/grfmgr.hxx> +#include <svtools/grfmgr.hxx> // for auto_ptr #include <memory> diff --git a/chart2/source/model/makefile.mk b/chart2/source/model/makefile.mk index 1b1144d20..701f47fb9 100644 --- a/chart2/source/model/makefile.mk +++ b/chart2/source/model/makefile.mk @@ -78,7 +78,6 @@ SHL1STDLIBS= $(CHARTTOOLS) \ $(VCLLIB) \ $(SVLLIB) \ $(SVTOOLLIB) \ - $(GOODIESLIB) \ $(SALLIB) \ $(UCBHELPERLIB) diff --git a/chart2/source/tools/ThreeDHelper.cxx b/chart2/source/tools/ThreeDHelper.cxx index df71c2332..ac40ff6fb 100644 --- a/chart2/source/tools/ThreeDHelper.cxx +++ b/chart2/source/tools/ThreeDHelper.cxx @@ -34,7 +34,7 @@ #include "ChartTypeHelper.hxx" #include "BaseGFXHelper.hxx" #include "DataSeriesHelper.hxx" -#include <svx/unoprnms.hxx> +#include <editeng/unoprnms.hxx> #include <com/sun/star/beans/XPropertyState.hpp> #include <com/sun/star/chart2/XDiagram.hpp> #include <com/sun/star/drawing/LineStyle.hpp> diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index c28aa5309..ed4175ea9 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -47,7 +47,7 @@ #include <tools/debug.hxx> #include <com/sun/star/text/XText.hpp> #include <com/sun/star/text/WritingMode2.hpp> -#include <svx/unoprnms.hxx> +#include <editeng/unoprnms.hxx> #include <algorithm> #include <memory> diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx index b088812b8..8e17d38d4 100644 --- a/chart2/source/view/charttypes/AreaChart.cxx +++ b/chart2/source/view/charttypes/AreaChart.cxx @@ -48,7 +48,7 @@ #include <com/sun/star/chart/DataLabelPlacement.hpp> #include <com/sun/star/chart/MissingValueTreatment.hpp> #include <tools/debug.hxx> -#include <svx/unoprnms.hxx> +#include <editeng/unoprnms.hxx> #include <rtl/math.hxx> #include <com/sun/star/drawing/DoubleSequence.hpp> #include <com/sun/star/drawing/NormalsKind.hpp> diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx index ebf690fbe..1adb7f87a 100644 --- a/chart2/source/view/charttypes/BubbleChart.cxx +++ b/chart2/source/view/charttypes/BubbleChart.cxx @@ -43,7 +43,7 @@ #include <com/sun/star/chart2/Symbol.hpp> #include <com/sun/star/chart/DataLabelPlacement.hpp> #include <tools/debug.hxx> -#include <svx/unoprnms.hxx> +#include <editeng/unoprnms.hxx> #include <rtl/math.hxx> #include <com/sun/star/drawing/DoubleSequence.hpp> #include <com/sun/star/drawing/NormalsKind.hpp> diff --git a/chart2/source/view/charttypes/CandleStickChart.cxx b/chart2/source/view/charttypes/CandleStickChart.cxx index f55acffa9..777384aa2 100644 --- a/chart2/source/view/charttypes/CandleStickChart.cxx +++ b/chart2/source/view/charttypes/CandleStickChart.cxx @@ -42,7 +42,7 @@ #include "DataSeriesHelper.hxx" #include <tools/debug.hxx> #include <rtl/math.hxx> -#include <svx/unoprnms.hxx> +#include <editeng/unoprnms.hxx> //............................................................................. namespace chart diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx index d691e7260..6019cbb66 100644 --- a/chart2/source/view/charttypes/PieChart.cxx +++ b/chart2/source/view/charttypes/PieChart.cxx @@ -126,6 +126,8 @@ PieChart::PieChart( const uno::Reference<XChartType>& xChartTypeModel , m_pPosHelper( new PiePositionHelper( NormalAxis_Z, (m_nDimension==3)?0.0:90.0 ) ) , m_bUseRings(false) { + ::rtl::math::setNan(&m_fMaxOffset); + PlotterBase::m_pPosHelper = m_pPosHelper; VSeriesPlotter::m_pMainPosHelper = m_pPosHelper; m_pPosHelper->m_fRadiusOffset = 0.0; @@ -245,27 +247,31 @@ double PieChart::getMinimumX() { return 0.5; } -double PieChart::getMaxOffset() const +double PieChart::getMaxOffset() { - double fRet = 0.0; + if (!::rtl::math::isNan(m_fMaxOffset)) + // Value already cached. Use it. + return m_fMaxOffset; + + m_fMaxOffset = 0.0; if( m_aZSlots.size()<=0 ) - return fRet; + return m_fMaxOffset; if( m_aZSlots[0].size()<=0 ) - return fRet; + return m_fMaxOffset; const ::std::vector< VDataSeries* >& rSeriesList( m_aZSlots[0][0].m_aSeriesVector ); if( rSeriesList.size()<=0 ) - return fRet; + return m_fMaxOffset; VDataSeries* pSeries = rSeriesList[0]; uno::Reference< beans::XPropertySet > xSeriesProp( pSeries->getPropertiesOfSeries() ); if( !xSeriesProp.is() ) - return fRet; + return m_fMaxOffset; double fExplodePercentage=0.0; xSeriesProp->getPropertyValue( C2U( "Offset" )) >>= fExplodePercentage; - if(fExplodePercentage>fRet) - fRet=fExplodePercentage; + if(fExplodePercentage>m_fMaxOffset) + m_fMaxOffset=fExplodePercentage; uno::Sequence< sal_Int32 > aAttributedDataPointIndexList; if( xSeriesProp->getPropertyValue( C2U( "AttributedDataPoints" ) ) >>= aAttributedDataPointIndexList ) @@ -277,12 +283,12 @@ double PieChart::getMaxOffset() const { fExplodePercentage=0.0; xPointProp->getPropertyValue( C2U( "Offset" )) >>= fExplodePercentage; - if(fExplodePercentage>fRet) - fRet=fExplodePercentage; + if(fExplodePercentage>m_fMaxOffset) + m_fMaxOffset=fExplodePercentage; } } } - return fRet; + return m_fMaxOffset; } double PieChart::getMaximumX() { @@ -354,6 +360,7 @@ void PieChart::createShapes() nExplodeableSlot = m_aZSlots[0].size()-1; m_aLabelInfoList.clear(); + ::rtl::math::setNan(&m_fMaxOffset); //============================================================================= for( double fSlotX=0; aXSlotIter != aXSlotEnd && (m_bUseRings||fSlotX<0.5 ); aXSlotIter++, fSlotX+=1.0 ) diff --git a/chart2/source/view/charttypes/PieChart.hxx b/chart2/source/view/charttypes/PieChart.hxx index f54045a2f..c050a9925 100644 --- a/chart2/source/view/charttypes/PieChart.hxx +++ b/chart2/source/view/charttypes/PieChart.hxx @@ -102,7 +102,7 @@ private: //methods , double fLogicZ, double fDepth, double fExplodePercentage , tPropertyNameValueMap* pOverWritePropertiesMap ); - double getMaxOffset() const; + double getMaxOffset(); bool detectLabelOverlapsAndMove(const ::com::sun::star::awt::Size& rPageSize);//returns true when there might be more to do void resetLabelPositionsToPreviousState(); struct PieLabelInfo; @@ -134,6 +134,8 @@ private: //member }; ::std::vector< PieLabelInfo > m_aLabelInfoList; + + double m_fMaxOffset; /// cached max offset value (init'ed to NaN) }; //............................................................................. } //namespace chart diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index ab19e8125..eca0cf6b2 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -65,7 +65,7 @@ #include <com/sun/star/chart2/XRegressionCurveContainer.hpp> #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/chart2/RelativePosition.hpp> -#include <svx/unoprnms.hxx> +#include <editeng/unoprnms.hxx> #include <tools/color.hxx> // header for class OUStringBuffer #include <rtl/ustrbuf.hxx> diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx index 2a697d059..da2f21a2c 100644 --- a/chart2/source/view/diagram/VDiagram.cxx +++ b/chart2/source/view/diagram/VDiagram.cxx @@ -38,7 +38,7 @@ #include "CommonConverters.hxx" #include "ChartTypeHelper.hxx" #include "ThreeDHelper.hxx" -#include <svx/unoprnms.hxx> +#include <editeng/unoprnms.hxx> #include <tools/color.hxx> #include <tools/debug.hxx> #include <com/sun/star/drawing/FillStyle.hpp> diff --git a/chart2/source/view/main/ChartItemPool.cxx b/chart2/source/view/main/ChartItemPool.cxx index b15c09cce..3f355795e 100644 --- a/chart2/source/view/main/ChartItemPool.cxx +++ b/chart2/source/view/main/ChartItemPool.cxx @@ -34,14 +34,14 @@ #include "chartview/ChartSfxItemIds.hxx" #include <svx/chrtitem.hxx> #include <svl/intitem.hxx> -#include <svx/brshitem.hxx> -#include <svx/sizeitem.hxx> -// header for class SfxStringItem +#include <editeng/brshitem.hxx> +#include <editeng/sizeitem.hxx> #include <svl/stritem.hxx> -//SfxIntegerListItem #include <svl/ilstitem.hxx> #define _SVSTDARR_ULONGS #include <svl/svstdarr.hxx> +#include <editeng/editids.hrc> +#include <svx/svxids.hrc> namespace chart { diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx index 82bd7ef95..bbc5585bf 100644 --- a/chart2/source/view/main/DrawModelWrapper.cxx +++ b/chart2/source/view/main/DrawModelWrapper.cxx @@ -38,7 +38,7 @@ // header for class SfxBoolItem #include <svl/eitem.hxx> // header for define EE_PARA_HYPHENATE -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> // header for class Svx3DPercentDiagonalItem #include <svx/svx3ditems.hxx> // header for class SvtPathOptions @@ -54,7 +54,7 @@ // header for class SdrOutliner #include <svx/svdoutl.hxx> // header for class LinguMgr -#include <svx/unolingu.hxx> +#include <editeng/unolingu.hxx> // header for class Application #include <vcl/svapp.hxx> // header for class VirtualDevice diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index 18942f5b7..32564705d 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -52,7 +52,7 @@ #include <com/sun/star/uno/Any.hxx> -#include <svx/unoprnms.hxx> +#include <editeng/unoprnms.hxx> #include <tools/color.hxx> #include <tools/debug.hxx> #include <rtl/math.hxx> diff --git a/chart2/source/view/makefile.mk b/chart2/source/view/makefile.mk index a11bc5ed5..aa3c149a7 100644 --- a/chart2/source/view/makefile.mk +++ b/chart2/source/view/makefile.mk @@ -73,6 +73,7 @@ SHL1LIBS= $(LIB1TARGET) SHL1STDLIBS= $(CHARTTOOLS) \ $(CPPULIB) \ + $(EDITENGLIB) \ $(CPPUHELPERLIB) \ $(COMPHELPERLIB) \ $(SALLIB) \ diff --git a/chart2/workbench/addin/sampleaddin.cxx b/chart2/workbench/addin/sampleaddin.cxx index a520ca266..a7f7783e9 100644 --- a/chart2/workbench/addin/sampleaddin.cxx +++ b/chart2/workbench/addin/sampleaddin.cxx @@ -135,7 +135,7 @@ sal_Bool SampleAddIn::getLogicalPosition( uno::Reference< drawing::XShape >& xAx { try { - double fMin, fMax; + double fMin(0.0), fMax(0.0); uno::Any aAny = xProp->getPropertyValue( OUString::createFromAscii( "Min" )); aAny >>= fMin; aAny = xProp->getPropertyValue( OUString::createFromAscii( "Max" )); diff --git a/sc/inc/autoform.hxx b/sc/inc/autoform.hxx index 79b357c46..1fce4cbe3 100644 --- a/sc/inc/autoform.hxx +++ b/sc/inc/autoform.hxx @@ -47,22 +47,22 @@ JP 20.07.95: **************************************************************************/ #include "scitems.hxx" -#include <svx/adjitem.hxx> +#include <editeng/adjitem.hxx> #include <svx/algitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/brshitem.hxx> -#include <svx/cntritem.hxx> -#include <svx/colritem.hxx> -#include <svx/crsditem.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/fontitem.hxx> -#include <svx/postitem.hxx> -#include <svx/shdditem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/wghtitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/cntritem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/crsditem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/shdditem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/wghtitem.hxx> #include <svx/rotmodit.hxx> #include <svl/intitem.hxx> -#include <svx/bolnitem.hxx> +#include <editeng/bolnitem.hxx> #include "scdllapi.h" #include "collect.hxx" #include "global.hxx" diff --git a/sc/inc/chart2uno.hxx b/sc/inc/chart2uno.hxx index 42cc23a55..b7e189710 100644 --- a/sc/inc/chart2uno.hxx +++ b/sc/inc/chart2uno.hxx @@ -530,6 +530,14 @@ private: }; ::std::list<Item> m_aDataArray; + + /** + * Cached data for getData. We may also need to cache data for the + * numerical and textural data series if they turn out to be bottlenecks + * under certain scenarios. + */ + ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > m_aMixedDataCache; + ::com::sun::star::uno::Sequence<sal_Int32> m_aHiddenValues; // properties diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx index 654105d30..f41321fea 100644 --- a/sc/inc/chartlis.hxx +++ b/sc/inc/chartlis.hxx @@ -46,7 +46,7 @@ class ScChartUnoData; #include <com/sun/star/chart/XChartData.hpp> #include <com/sun/star/chart/XChartDataChangeEventListener.hpp> -class ScChartListener : public StrData, public SvtListener +class SC_DLLPUBLIC ScChartListener : public StrData, public SvtListener { public: class ExternalRefListener : public ScExternalRefManager::LinkListener @@ -183,7 +183,7 @@ public: const com::sun::star::uno::Reference< com::sun::star::chart::XChartData >& rSource ); void StartTimer(); void UpdateDirtyCharts(); - void SetDirty(); + void SC_DLLPUBLIC SetDirty(); void SetDiffDirty( const ScChartListenerCollection&, BOOL bSetChartRangeLists = FALSE ); diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index f77de29ec..aa2cd9cbb 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -111,7 +111,7 @@ private: friend class ScDocument; // fuer FillInfo friend class ScDocumentIterator; friend class ScValueIterator; -friend class ScQueryValueIterator; +friend class ScDBQueryDataIterator; friend class ScColumnIterator; friend class ScQueryCellIterator; friend class ScMarkedDataIter; diff --git a/sc/inc/datauno.hxx b/sc/inc/datauno.hxx index 1cb1f3c19..03d0edc1c 100644 --- a/sc/inc/datauno.hxx +++ b/sc/inc/datauno.hxx @@ -29,8 +29,8 @@ #define SC_DATAUNO_HXX #include "global.hxx" -#include <svl/itemprop.hxx> -#include <svl/lstner.hxx> +#include "queryparam.hxx" + #include <com/sun/star/sheet/TableFilterField.hpp> #include <com/sun/star/sheet/GeneralFunction.hpp> #include <com/sun/star/sheet/XCellRangeReferrer.hpp> @@ -53,6 +53,8 @@ #include <cppuhelper/implbase4.hxx> #include <cppuhelper/implbase5.hxx> #include <cppuhelper/implbase6.hxx> +#include "svl/itemprop.hxx" +#include "svl/lstner.hxx" class ScDBData; class ScDocShell; diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx index 4d9db4f63..749e6745b 100644 --- a/sc/inc/dociter.hxx +++ b/sc/inc/dociter.hxx @@ -32,6 +32,9 @@ #include <tools/solar.h> #include "global.hxx" #include "scdllapi.h" +#include "queryparam.hxx" + +#include <memory> class ScDocument; class ScBaseCell; @@ -124,34 +127,97 @@ public: } }; -class ScQueryValueIterator // alle Zahlenwerte in einem Bereich durchgehen +// ============================================================================ + +class ScDBQueryDataIterator { +public: + struct Value + { + ::rtl::OUString maString; + double mfValue; + sal_uInt16 mnError; + bool mbIsNumber; + + Value(); + }; + private: - ScQueryParam aParam; - ScDocument* pDoc; - const ScAttrArray* pAttrArray; - ULONG nNumFormat; // fuer CalcAsShown - ULONG nNumFmtIndex; - SCCOL nCol; - SCROW nRow; - SCSIZE nColRow; - SCROW nAttrEndRow; - SCTAB nTab; - short nNumFmtType; - BOOL bCalcAsShown; + static SCROW GetRowByColEntryIndex(ScDocument& rDoc, SCTAB nTab, SCCOL nCol, SCSIZE nColRow); + static ScBaseCell* GetCellByColEntryIndex(ScDocument& rDoc, SCTAB nTab, SCCOL nCol, SCSIZE nColRow); + static ScAttrArray* GetAttrArrayByCol(ScDocument& rDoc, SCTAB nTab, SCCOL nCol); + static bool IsQueryValid(ScDocument& rDoc, const ScQueryParam& rParam, SCTAB nTab, SCROW nRow, ScBaseCell* pCell); + static SCSIZE SearchColEntryIndex(ScDocument& rDoc, SCTAB nTab, SCROW nRow, SCCOL nCol); + + class DataAccess + { + public: + DataAccess(const ScDBQueryDataIterator* pParent); + virtual ~DataAccess() = 0; + virtual bool getCurrent(Value& rValue) = 0; + virtual bool getFirst(Value& rValue) = 0; + virtual bool getNext(Value& rValue) = 0; + protected: + const ScDBQueryDataIterator* mpParent; + }; + + class DataAccessInternal : public DataAccess + { + public: + DataAccessInternal(const ScDBQueryDataIterator* pParent, ScDBQueryParamInternal* pParam, ScDocument* pDoc); + virtual ~DataAccessInternal(); + virtual bool getCurrent(Value& rValue); + virtual bool getFirst(Value& rValue); + virtual bool getNext(Value& rValue); + + private: + ScDBQueryParamInternal* mpParam; + ScDocument* mpDoc; + const ScAttrArray* pAttrArray; + ULONG nNumFormat; // for CalcAsShown + ULONG nNumFmtIndex; + SCCOL nCol; + SCROW nRow; + SCSIZE nColRow; + SCROW nAttrEndRow; + SCTAB nTab; + short nNumFmtType; + bool bCalcAsShown; + }; + + class DataAccessMatrix : public DataAccess + { + public: + DataAccessMatrix(const ScDBQueryDataIterator* pParent, ScDBQueryParamMatrix* pParam); + virtual ~DataAccessMatrix(); + virtual bool getCurrent(Value& rValue); + virtual bool getFirst(Value& rValue); + virtual bool getNext(Value& rValue); + + private: + bool isValidQuery(SCROW mnRow, const ScMatrix& rMat) const; + + ScDBQueryParamMatrix* mpParam; + SCROW mnCurRow; + SCROW mnRows; + SCCOL mnCols; + }; + + ::std::auto_ptr<ScDBQueryParamBase> mpParam; + ::std::auto_ptr<DataAccess> mpData; + + bool GetThis(Value& rValue); - BOOL GetThis(double& rValue, USHORT& rErr); public: - ScQueryValueIterator(ScDocument* pDocument, SCTAB nTable, - const ScQueryParam& aParam); + ScDBQueryDataIterator(ScDocument* pDocument, ScDBQueryParamBase* pParam); /// Does NOT reset rValue if no value found! - BOOL GetFirst(double& rValue, USHORT& rErr); + bool GetFirst(Value& rValue); /// Does NOT reset rValue if no value found! - BOOL GetNext(double& rValue, USHORT& rErr); - void GetCurNumFmtInfo( short& nType, ULONG& nIndex ) - { nType = nNumFmtType; nIndex = nNumFmtIndex; } + bool GetNext(Value& rValue); }; +// ============================================================================ + class ScCellIterator // alle Zellen in einem Bereich durchgehen { // bei SubTotal aber keine ausgeblendeten und private: // SubTotalZeilen diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index d7bf3edda..d779a53a4 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -66,7 +66,9 @@ class SvxBoxInfoItem; class SvxBoxItem; class SvxBrushItem; class SvxForbiddenCharactersTable; -class SvxLinkManager; +namespace sfx2 { + class LinkManager; + } class SvxSearchItem; class SvxShadowItem; class Window; @@ -224,7 +226,7 @@ class ScDocument { friend class ScDocumentIterator; friend class ScValueIterator; -friend class ScQueryValueIterator; +friend class ScDBQueryDataIterator; friend class ScCellIterator; friend class ScQueryCellIterator; friend class ScHorizontalCellIterator; @@ -257,7 +259,7 @@ private: ScChartCollection* pChartCollection; std::auto_ptr< ScTemporaryChartLock > apTemporaryChartLock; ScPatternAttr* pSelectionAttr; // Attribute eines Blocks - mutable SvxLinkManager* pLinkManager; + mutable sfx2::LinkManager* pLinkManager; ScFormulaCell* pFormulaTree; // Berechnungsbaum Start ScFormulaCell* pEOFormulaTree; // Berechnungsbaum Ende, letzte Zelle ScFormulaCell* pFormulaTrack; // BroadcastTrack Start @@ -288,6 +290,7 @@ private: mxFormulaParserPool; /// Pool for all external formula parsers used by this document. String aDocName; // opt: Dokumentname + String aDocCodeName; // opt: Dokumentname ScRangePairListRef xColNameRanges; ScRangePairListRef xRowNameRanges; @@ -417,6 +420,7 @@ private: public: SC_DLLPUBLIC ULONG GetCellCount() const; // alle Zellen + SCSIZE GetCellCount(SCTAB nTab, SCCOL nCol) const; ULONG GetWeightedCount() const; // Formeln und Edit staerker gewichtet ULONG GetCodeCount() const; // RPN-Code in Formeln DECL_LINK( GetUserDefinedColor, USHORT * ); @@ -432,13 +436,15 @@ public: SC_DLLPUBLIC const String& GetName() const { return aDocName; } void SetName( const String& r ) { aDocName = r; } + const String& GetCodeName() const { return aDocCodeName; } + void SetCodeName( const String& r ) { aDocCodeName = r; } void GetDocStat( ScDocStat& rDocStat ); SC_DLLPUBLIC void InitDrawLayer( SfxObjectShell* pDocShell = NULL ); XColorTable* GetColorTable(); - SC_DLLPUBLIC SvxLinkManager* GetLinkManager() const; + SC_DLLPUBLIC sfx2::LinkManager* GetLinkManager() const; SC_DLLPUBLIC const ScDocOptions& GetDocOptions() const; SC_DLLPUBLIC void SetDocOptions( const ScDocOptions& rOpt ); @@ -517,6 +523,8 @@ public: SC_DLLPUBLIC BOOL HasTable( SCTAB nTab ) const; SC_DLLPUBLIC BOOL GetName( SCTAB nTab, String& rName ) const; + SC_DLLPUBLIC BOOL GetCodeName( SCTAB nTab, String& rName ) const; + SC_DLLPUBLIC BOOL SetCodeName( SCTAB nTab, String& rName ); SC_DLLPUBLIC BOOL GetTable( const String& rName, SCTAB& rTab ) const; SC_DLLPUBLIC inline SCTAB GetTableCount() const { return nMaxTableNumber; } SvNumberFormatterIndexTable* GetFormatExchangeList() const { return pFormatExchangeList; } diff --git a/sc/inc/dpcachetable.hxx b/sc/inc/dpcachetable.hxx index c8a500eb9..c56694d5b 100644 --- a/sc/inc/dpcachetable.hxx +++ b/sc/inc/dpcachetable.hxx @@ -56,6 +56,7 @@ class ScDPDimension; class ScDPCollection; struct ScDPCacheCell; struct ScDPItemData; +struct ScQueryParam; class Date; // ---------------------------------------------------------------------------- diff --git a/sc/inc/dpshttab.hxx b/sc/inc/dpshttab.hxx index 35935ea5b..f9ee695d2 100644 --- a/sc/inc/dpshttab.hxx +++ b/sc/inc/dpshttab.hxx @@ -32,6 +32,7 @@ #include "global.hxx" #include "address.hxx" #include "scdllapi.h" +#include "queryparam.hxx" #include <vector> diff --git a/sc/inc/drawattr.hxx b/sc/inc/drawattr.hxx index 3e9138f3c..fefc32caf 100644 --- a/sc/inc/drawattr.hxx +++ b/sc/inc/drawattr.hxx @@ -28,7 +28,7 @@ #define _IDLITEMS_HXX #include <svl/eitem.hxx> -#include <svx/svxenum.hxx> +#include <editeng/svxenum.hxx> class SvxDrawToolItem : public SfxEnumItem diff --git a/sc/inc/editsrc.hxx b/sc/inc/editsrc.hxx index 02646656f..32756a41a 100644 --- a/sc/inc/editsrc.hxx +++ b/sc/inc/editsrc.hxx @@ -29,7 +29,7 @@ #define SC_EDITSRC_HXX #include "address.hxx" -#include <svx/unoedsrc.hxx> +#include <editeng/unoedsrc.hxx> #include <svl/lstner.hxx> #include <memory> diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx index ca90d1470..974ceef28 100644 --- a/sc/inc/editutil.hxx +++ b/sc/inc/editutil.hxx @@ -30,7 +30,7 @@ #include "scdllapi.h" #include "address.hxx" -#include <svx/editeng.hxx> +#include <editeng/editeng.hxx> #include <svx/pageitem.hxx> #include <tools/date.hxx> #include <tools/time.hxx> diff --git a/sc/inc/fielduno.hxx b/sc/inc/fielduno.hxx index 501d018d2..6f57383ed 100644 --- a/sc/inc/fielduno.hxx +++ b/sc/inc/fielduno.hxx @@ -33,7 +33,7 @@ #include <svl/lstner.hxx> #include <svl/itemprop.hxx> -#include <svx/editdata.hxx> +#include <editeng/editdata.hxx> #include <com/sun/star/text/XTextField.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/container/XContainer.hpp> diff --git a/sc/inc/forbiuno.hxx b/sc/inc/forbiuno.hxx index 1f4d15032..c191ca187 100644 --- a/sc/inc/forbiuno.hxx +++ b/sc/inc/forbiuno.hxx @@ -28,7 +28,7 @@ #ifndef SC_FORBIUNO_HXX #define SC_FORBIUNO_HXX -#include <svx/UnoForbiddenCharsTable.hxx> +#include <editeng/UnoForbiddenCharsTable.hxx> #include <svl/lstner.hxx> class ScDocShell; diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index 2c02929d3..282c363b8 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -814,47 +814,6 @@ struct ScQueryEntry BOOL operator==( const ScQueryEntry& r ) const; }; -struct SC_DLLPUBLIC ScQueryParam -{ - SCCOL nCol1; - SCROW nRow1; - SCCOL nCol2; - SCROW nRow2; - SCTAB nTab; - BOOL bHasHeader; - BOOL bByRow; - BOOL bInplace; - BOOL bCaseSens; - BOOL bRegExp; - BOOL bMixedComparison; // whether numbers are smaller than strings - BOOL bDuplicate; - BOOL bDestPers; // nicht gespeichert - SCTAB nDestTab; - SCCOL nDestCol; - SCROW nDestRow; - -private: - SCSIZE nEntryCount; - ScQueryEntry* pEntries; - -public: - ScQueryParam(); - ScQueryParam( const ScQueryParam& r ); - ~ScQueryParam(); - - SCSIZE GetEntryCount() const { return nEntryCount; } - ScQueryEntry& GetEntry(SCSIZE n) const { return pEntries[n]; } - void Resize(SCSIZE nNew); - - ScQueryParam& operator= ( const ScQueryParam& r ); - BOOL operator== ( const ScQueryParam& rOther ) const; - void Clear (); - void DeleteQuery( SCSIZE nPos ); - - void MoveToDest(); - void FillInExcelSyntax(String& aCellStr, SCSIZE nIndex); -}; - // ----------------------------------------------------------------------- struct SC_DLLPUBLIC ScSubTotalParam diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx index de6f9aa42..84bb51d58 100644 --- a/sc/inc/patattr.hxx +++ b/sc/inc/patattr.hxx @@ -31,7 +31,7 @@ #include <svl/poolitem.hxx> #include <svl/itemset.hxx> #include <unotools/fontcvt.hxx> -#include <svx/svxenum.hxx> +#include <editeng/svxenum.hxx> #include "scdllapi.h" class Font; diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx index a6f25f2b1..0b69bf5f7 100644 --- a/sc/inc/pch/precompiled_sc.hxx +++ b/sc/inc/pch/precompiled_sc.hxx @@ -159,10 +159,10 @@ #include <unotools/pathoptions.hxx> #include <svl/solar.hrc> #include <unotools/useroptions.hxx> -#include <svx/editobj.hxx> -#include <svx/eeitem.hxx> +#include <editeng/editobj.hxx> +#include <editeng/eeitem.hxx> #include <svx/fmglob.hxx> -#include <svx/outlobj.hxx> +#include <editeng/outlobj.hxx> #include <svx/sdangitm.hxx> #include <svx/sderitm.hxx> #include <svx/sdmetitm.hxx> diff --git a/sc/inc/queryparam.hxx b/sc/inc/queryparam.hxx new file mode 100644 index 000000000..bc5023728 --- /dev/null +++ b/sc/inc/queryparam.hxx @@ -0,0 +1,142 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: interpre.hxx,v $ + * $Revision: 1.35.44.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SC_QUERYPARAM_HXX +#define SC_QUERYPARAM_HXX + +#include "global.hxx" +#include "scmatrix.hxx" + +#include <vector> + +struct ScDBQueryParamInternal; + +struct ScQueryParamBase +{ + bool bHasHeader; + bool bByRow; + bool bInplace; + bool bCaseSens; + bool bRegExp; + bool bDuplicate; + bool bMixedComparison; // whether numbers are smaller than strings + + virtual ~ScQueryParamBase(); + + SC_DLLPUBLIC SCSIZE GetEntryCount() const; + SC_DLLPUBLIC ScQueryEntry& GetEntry(SCSIZE n) const; + void Resize(SCSIZE nNew); + SC_DLLPUBLIC void DeleteQuery( SCSIZE nPos ); + void FillInExcelSyntax(String& aCellStr, SCSIZE nIndex); + +protected: + ScQueryParamBase(); + ScQueryParamBase(const ScQueryParamBase& r); + + mutable ::std::vector<ScQueryEntry> maEntries; +}; + +// ============================================================================ + +struct ScQueryParamTable +{ + SCCOL nCol1; + SCROW nRow1; + SCCOL nCol2; + SCROW nRow2; + SCTAB nTab; + + ScQueryParamTable(); + ScQueryParamTable(const ScQueryParamTable& r); + virtual ~ScQueryParamTable(); +}; + +// ============================================================================ + +struct SC_DLLPUBLIC ScQueryParam : public ScQueryParamBase, public ScQueryParamTable +{ + BOOL bDestPers; // nicht gespeichert + SCTAB nDestTab; + SCCOL nDestCol; + SCROW nDestRow; + + ScQueryParam(); + ScQueryParam( const ScQueryParam& r ); + ScQueryParam( const ScDBQueryParamInternal& r ); + virtual ~ScQueryParam(); + + ScQueryParam& operator= ( const ScQueryParam& r ); + BOOL operator== ( const ScQueryParam& rOther ) const; + void Clear(); + void ClearDestParams(); + void MoveToDest(); +}; + +// ============================================================================ + +struct ScDBQueryParamBase : public ScQueryParamBase +{ + enum DataType { INTERNAL, MATRIX }; + + SCCOL mnField; /// the field in which the values are processed during iteration. + bool mbSkipString; + + DataType GetType() const; + + virtual ~ScDBQueryParamBase(); + +protected: + ScDBQueryParamBase(DataType eType); + +private: + ScDBQueryParamBase(); + + DataType meType; +}; + +// ============================================================================ + +struct ScDBQueryParamInternal : public ScDBQueryParamBase, public ScQueryParamTable +{ + ScDBQueryParamInternal(); + virtual ~ScDBQueryParamInternal(); +}; + +// ============================================================================ + +struct ScDBQueryParamMatrix : public ScDBQueryParamBase +{ + ScMatrixRef mpMatrix; + + ScDBQueryParamMatrix(); + virtual ~ScDBQueryParamMatrix(); +}; + +#endif diff --git a/sc/inc/reftokenhelper.hxx b/sc/inc/reftokenhelper.hxx index 8c014fc9c..4a1e47ccc 100644 --- a/sc/inc/reftokenhelper.hxx +++ b/sc/inc/reftokenhelper.hxx @@ -67,12 +67,12 @@ public: static void getTokensFromRangeList(::std::vector<ScSharedTokenRef>& pTokens, const ScRangeList& rRanges); - static bool isRef(const ScSharedTokenRef& pToken); - static bool isExternalRef(const ScSharedTokenRef& pToken); + static bool SC_DLLPUBLIC isRef(const ScSharedTokenRef& pToken); + static bool SC_DLLPUBLIC isExternalRef(const ScSharedTokenRef& pToken); - static bool intersects(const ::std::vector<ScSharedTokenRef>& rTokens, const ScSharedTokenRef& pToken); + static bool SC_DLLPUBLIC intersects(const ::std::vector<ScSharedTokenRef>& rTokens, const ScSharedTokenRef& pToken); - static void join(::std::vector<ScSharedTokenRef>& rTokens, const ScSharedTokenRef& pToken); + static void SC_DLLPUBLIC join(::std::vector<ScSharedTokenRef>& rTokens, const ScSharedTokenRef& pToken); static bool getDoubleRefDataFromToken(ScComplexRefData& rData, const ScSharedTokenRef& pToken); }; diff --git a/sc/inc/scextopt.hxx b/sc/inc/scextopt.hxx index a5c6a67b1..7a3080334 100644 --- a/sc/inc/scextopt.hxx +++ b/sc/inc/scextopt.hxx @@ -121,6 +121,8 @@ public: const String& GetCodeName( size_t nIdx ) const; /** Appends a codename for a sheet. */ void AppendCodeName( const String& rCodeName ); + void SetCodeName( const String& rCodeName, size_t nIdx ); + void DeleteCodeName( size_t nIdx ); private: ::std::auto_ptr< ScExtDocOptionsImpl > mxImpl; diff --git a/sc/inc/servuno.hxx b/sc/inc/servuno.hxx index 21c3a9f7a..900bfaec8 100644 --- a/sc/inc/servuno.hxx +++ b/sc/inc/servuno.hxx @@ -90,8 +90,9 @@ class ScDocShell; #define SC_SERVICE_FORMULAPARS 38 #define SC_SERVICE_OPCODEMAPPER 39 +#define SC_SERVICE_VBACODENAMEPROVIDER 40 -#define SC_SERVICE_COUNT 40 +#define SC_SERVICE_COUNT 41 #define SC_SERVICE_INVALID USHRT_MAX diff --git a/sc/inc/sheetdata.hxx b/sc/inc/sheetdata.hxx index 96c1c0fbb..05c0a16cb 100644 --- a/sc/inc/sheetdata.hxx +++ b/sc/inc/sheetdata.hxx @@ -29,7 +29,7 @@ #define SC_SHEETDATA_HXX #include <xmloff/maptype.hxx> -#include <svx/editdata.hxx> +#include <editeng/editdata.hxx> #include <vector> #include <hash_set> diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 40bd58646..e81aa4166 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -86,6 +86,7 @@ private: ScColumn aCol[MAXCOLCOUNT]; String aName; + String aCodeName; String aComment; BOOL bScenario; BOOL bLayoutRTL; @@ -158,7 +159,7 @@ private: friend class ScDocument; // fuer FillInfo friend class ScDocumentIterator; friend class ScValueIterator; -friend class ScQueryValueIterator; +friend class ScDBQueryDataIterator; friend class ScCellIterator; friend class ScQueryCellIterator; friend class ScHorizontalCellIterator; @@ -174,6 +175,7 @@ public: ScOutlineTable* GetOutlineTable() { return pOutlineTable; } + SCSIZE GetCellCount(SCCOL nCol) const; ULONG GetCellCount() const; ULONG GetWeightedCount() const; ULONG GetCodeCount() const; // RPN-Code in Formeln @@ -226,6 +228,9 @@ public: void GetName( String& rName ) const; void SetName( const String& rNewName ); + void GetCodeName( String& rName ) const { rName = aCodeName; } + void SetCodeName( const String& rNewName ) { aCodeName = rNewName; } + const String& GetUpperName() const; const String& GetPageStyle() const { return aPageStyle; } diff --git a/sc/inc/textuno.hxx b/sc/inc/textuno.hxx index 9ab11809e..d7a701e00 100644 --- a/sc/inc/textuno.hxx +++ b/sc/inc/textuno.hxx @@ -30,7 +30,7 @@ #include "global.hxx" // ScRange, ScAddress #include "address.hxx" -#include <svx/unotext.hxx> +#include <editeng/unotext.hxx> #include <svl/brdcst.hxx> #include <svl/lstner.hxx> #include <com/sun/star/text/XTextFieldsSupplier.hpp> diff --git a/sc/sdi/scslots.hrc b/sc/sdi/scslots.hrc index 07a1757f3..10d1675f5 100644 --- a/sc/sdi/scslots.hrc +++ b/sc/sdi/scslots.hrc @@ -28,4 +28,6 @@ #include <svx/dialogs.hrc> #include <sfx2/sfxsids.hrc> #include <svx/svxids.hrc> +#include <editeng/editids.hrc> +#include <editeng/memberids.hrc> #include <sc.hrc> diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx index 45b274ee8..6bada7346 100644 --- a/sc/source/core/data/attarray.cxx +++ b/sc/source/core/data/attarray.cxx @@ -34,12 +34,12 @@ #include "scitems.hxx" #include <svx/algitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/bolnitem.hxx> -#include <svx/frmdiritem.hxx> -#include <svx/shaditem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/bolnitem.hxx> +#include <editeng/frmdiritem.hxx> +#include <editeng/shaditem.hxx> #include <svl/poolcach.hxx> -#include <svx/fontitem.hxx> +#include <editeng/fontitem.hxx> #include <unotools/fontcvt.hxx> #include "attarray.hxx" diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx index 65a2495bf..1b0662445 100644 --- a/sc/source/core/data/attrib.cxx +++ b/sc/source/core/data/attrib.cxx @@ -39,13 +39,13 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/editdata.hxx> -#include <svx/editeng.hxx> -#include <svx/editobj.hxx> -#include <svx/flditem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/editdata.hxx> +#include <editeng/editeng.hxx> +#include <editeng/editobj.hxx> +#include <editeng/flditem.hxx> #include "attrib.hxx" #include "global.hxx" diff --git a/sc/source/core/data/autonamecache.cxx b/sc/source/core/data/autonamecache.cxx index 6851cb2f9..dd080362a 100644 --- a/sc/source/core/data/autonamecache.cxx +++ b/sc/source/core/data/autonamecache.cxx @@ -37,6 +37,7 @@ #include "autonamecache.hxx" #include "dociter.hxx" #include "cell.hxx" +#include "queryparam.hxx" // ----------------------------------------------------------------------- diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx index d4db504ef..03531421f 100644 --- a/sc/source/core/data/cell.cxx +++ b/sc/source/core/data/cell.cxx @@ -51,9 +51,9 @@ #include "recursionhelper.hxx" #include "postit.hxx" #include "externalrefmgr.hxx" -#include <svx/editobj.hxx> +#include <editeng/editobj.hxx> #include <svl/intitem.hxx> -#include <svx/flditem.hxx> +#include <editeng/flditem.hxx> #include <svl/broadcast.hxx> using namespace formula; diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx index b37adc462..a2b27704d 100644 --- a/sc/source/core/data/cell2.cxx +++ b/sc/source/core/data/cell2.cxx @@ -37,8 +37,8 @@ #include <boost/bind.hpp> #include <vcl/mapmod.hxx> -#include <svx/editobj.hxx> -#include <svx/editstat.hxx> +#include <editeng/editobj.hxx> +#include <editeng/editstat.hxx> #include "cell.hxx" #include "compiler.hxx" diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 17498aa70..042863c4a 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -36,7 +36,7 @@ #include <svl/poolcach.hxx> #include <svl/zforlist.hxx> -#include <svx/scripttypeitem.hxx> +#include <editeng/scripttypeitem.hxx> #include <string.h> #include "scitems.hxx" diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index eee2b28fe..39a22ac13 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -33,17 +33,17 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svx/algitem.hxx> -#include <svx/editobj.hxx> -#include <svx/editstat.hxx> -#include <svx/emphitem.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/forbiddencharacterstable.hxx> +#include <editeng/editobj.hxx> +#include <editeng/editstat.hxx> +#include <editeng/emphitem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/forbiddencharacterstable.hxx> #include <svx/rotmodit.hxx> -#include <svx/scripttypeitem.hxx> -#include <svx/unolingu.hxx> +#include <editeng/scripttypeitem.hxx> +#include <editeng/unolingu.hxx> #include <svl/zforlist.hxx> #include <svl/broadcast.hxx> #include <svl/listeneriter.hxx> diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index 1c2ec814b..91389d2bd 100644..100755 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -44,9 +44,23 @@ #include "docoptio.hxx" #include "cellform.hxx" +#include <vector> + +using ::rtl::math::approxEqual; +using ::std::vector; +using ::rtl::OUString; // STATIC DATA ----------------------------------------------------------- +namespace { + +void lcl_toUpper(OUString& rStr) +{ + rStr = ScGlobal::pCharClass->toUpper(rStr.trim(), 0, static_cast<USHORT>(rStr.getLength())); +} + +} + ScDocumentIterator::ScDocumentIterator( ScDocument* pDocument, SCTAB nStartTable, SCTAB nEndTable ) : pDoc( pDocument ), @@ -479,83 +493,121 @@ BOOL ScValueIterator::GetNext(double& rValue, USHORT& rErr) } */ -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ +// ============================================================================ -ScQueryValueIterator::ScQueryValueIterator(ScDocument* pDocument, SCTAB nTable, const ScQueryParam& rParam) : - aParam (rParam), - pDoc( pDocument ), - nNumFmtIndex(0), - nTab( nTable), - nNumFmtType( NUMBERFORMAT_UNDEFINED ), - bCalcAsShown( pDocument->GetDocOptions().IsCalcAsShown() ) +ScDBQueryDataIterator::DataAccess::DataAccess(const ScDBQueryDataIterator* pParent) : + mpParent(pParent) { - nCol = aParam.nCol1; - nRow = aParam.nRow1; +} + +ScDBQueryDataIterator::DataAccess::~DataAccess() +{ +} + +SCROW ScDBQueryDataIterator::GetRowByColEntryIndex(ScDocument& rDoc, SCTAB nTab, SCCOL nCol, SCSIZE nColRow) +{ + ScColumn* pCol = &rDoc.pTab[nTab]->aCol[nCol]; + return pCol->pItems[nColRow].nRow; +} + +ScBaseCell* ScDBQueryDataIterator::GetCellByColEntryIndex(ScDocument& rDoc, SCTAB nTab, SCCOL nCol, SCSIZE nColRow) +{ + ScColumn* pCol = &rDoc.pTab[nTab]->aCol[nCol]; + return pCol->pItems[nColRow].pCell; +} + +ScAttrArray* ScDBQueryDataIterator::GetAttrArrayByCol(ScDocument& rDoc, SCTAB nTab, SCCOL nCol) +{ + ScColumn* pCol = &rDoc.pTab[nTab]->aCol[nCol]; + return pCol->pAttrArray; +} + +bool ScDBQueryDataIterator::IsQueryValid(ScDocument& rDoc, const ScQueryParam& rParam, SCTAB nTab, SCROW nRow, ScBaseCell* pCell) +{ + return rDoc.pTab[nTab]->ValidQuery(nRow, rParam, NULL, pCell); +} + +SCSIZE ScDBQueryDataIterator::SearchColEntryIndex(ScDocument& rDoc, SCTAB nTab, SCROW nRow, SCCOL nCol) +{ + ScColumn* pCol = &rDoc.pTab[nTab]->aCol[nCol]; + SCSIZE nColRow; + pCol->Search(nRow, nColRow); + return nColRow; +} + +// ---------------------------------------------------------------------------- + +ScDBQueryDataIterator::DataAccessInternal::DataAccessInternal(const ScDBQueryDataIterator* pParent, ScDBQueryParamInternal* pParam, ScDocument* pDoc) : + DataAccess(pParent), + mpParam(pParam), + mpDoc(pDoc) +{ + nCol = mpParam->mnField; + nRow = mpParam->nRow1; + nTab = mpParam->nTab; + nColRow = 0; // wird bei GetFirst initialisiert SCSIZE i; - SCSIZE nCount = aParam.GetEntryCount(); - for (i=0; (i<nCount) && (aParam.GetEntry(i).bDoQuery); i++) + SCSIZE nCount = mpParam->GetEntryCount(); + for (i=0; (i<nCount) && (mpParam->GetEntry(i).bDoQuery); i++) { - ScQueryEntry& rEntry = aParam.GetEntry(i); + ScQueryEntry& rEntry = mpParam->GetEntry(i); sal_uInt32 nIndex = 0; rEntry.bQueryByString = - !(pDoc->GetFormatTable()->IsNumberFormat(*rEntry.pStr, nIndex, rEntry.nVal)); + !(mpDoc->GetFormatTable()->IsNumberFormat(*rEntry.pStr, nIndex, rEntry.nVal)); } nNumFormat = 0; // werden bei GetNumberFormat initialisiert pAttrArray = 0; nAttrEndRow = 0; } -BOOL ScQueryValueIterator::GetThis(double& rValue, USHORT& rErr) +ScDBQueryDataIterator::DataAccessInternal::~DataAccessInternal() { - ScColumn* pCol = &(pDoc->pTab[nTab])->aCol[nCol]; - SCCOLROW nFirstQueryField = aParam.GetEntry(0).nField; +} + +bool ScDBQueryDataIterator::DataAccessInternal::getCurrent(Value& rValue) +{ + SCCOLROW nFirstQueryField = mpParam->GetEntry(0).nField; for ( ;; ) { - if ( nRow > aParam.nRow2 ) + if (nRow > mpParam->nRow2) { - nRow = aParam.nRow1; - if (aParam.bHasHeader) - nRow++; - do - { - nCol++; - if ( nCol > aParam.nCol2 ) - { - // rValue = 0.0; // do not change caller's value! - rErr = 0; - return FALSE; // Ende und Aus - } - pCol = &(pDoc->pTab[nTab])->aCol[nCol]; - } while ( pCol->nCount == 0 ); - pCol->Search( nRow, nColRow ); + // Bottom of the range reached. Bail out. + rValue.mnError = 0; + return false; } - while ( (nColRow < pCol->nCount) && (pCol->pItems[nColRow].nRow < nRow) ) - nColRow++; + SCSIZE nCellCount = mpDoc->GetCellCount(nTab, nCol); + SCROW nThisRow = ScDBQueryDataIterator::GetRowByColEntryIndex(*mpDoc, nTab, nCol, nColRow); + while ( (nColRow < nCellCount) && (nThisRow < nRow) ) + nThisRow = ScDBQueryDataIterator::GetRowByColEntryIndex(*mpDoc, nTab, nCol, ++nColRow); - if ( nColRow < pCol->nCount && pCol->pItems[nColRow].nRow <= aParam.nRow2 ) + if ( nColRow < nCellCount && nThisRow <= mpParam->nRow2 ) { - nRow = pCol->pItems[nColRow].nRow; - ScBaseCell* pCell = pCol->pItems[nColRow].pCell; - if ( (pDoc->pTab[nTab])->ValidQuery( nRow, aParam, NULL, - (nCol == static_cast<SCCOL>(nFirstQueryField) ? pCell : NULL) ) ) + nRow = nThisRow; + ScBaseCell* pCell = NULL; + if (nCol == static_cast<SCCOL>(nFirstQueryField)) + pCell = ScDBQueryDataIterator::GetCellByColEntryIndex(*mpDoc, nTab, nCol, nColRow); + + if (ScDBQueryDataIterator::IsQueryValid(*mpDoc, *mpParam, nTab, nRow, pCell)) { switch (pCell->GetCellType()) { case CELLTYPE_VALUE: { - rValue = ((ScValueCell*)pCell)->GetValue(); + rValue.mfValue = ((ScValueCell*)pCell)->GetValue(); + rValue.mbIsNumber = true; if ( bCalcAsShown ) { + const ScAttrArray* pNewAttrArray = + ScDBQueryDataIterator::GetAttrArrayByCol(*mpDoc, nTab, nCol); lcl_IterGetNumberFormat( nNumFormat, pAttrArray, - nAttrEndRow, pCol->pAttrArray, nRow, pDoc ); - rValue = pDoc->RoundValueAsShown( rValue, nNumFormat ); + nAttrEndRow, pNewAttrArray, nRow, mpDoc ); + rValue.mfValue = mpDoc->RoundValueAsShown( rValue.mfValue, nNumFormat ); } nNumFmtType = NUMBERFORMAT_NUMBER; nNumFmtIndex = 0; - rErr = 0; + rValue.mnError = 0; return TRUE; // gefunden } // break; @@ -563,17 +615,31 @@ BOOL ScQueryValueIterator::GetThis(double& rValue, USHORT& rErr) { if (((ScFormulaCell*)pCell)->IsValue()) { - rValue = ((ScFormulaCell*)pCell)->GetValue(); - pDoc->GetNumberFormatInfo( nNumFmtType, + rValue.mfValue = ((ScFormulaCell*)pCell)->GetValue(); + rValue.mbIsNumber = true; + mpDoc->GetNumberFormatInfo( nNumFmtType, nNumFmtIndex, ScAddress( nCol, nRow, nTab ), pCell ); - rErr = ((ScFormulaCell*)pCell)->GetErrCode(); + rValue.mnError = ((ScFormulaCell*)pCell)->GetErrCode(); return TRUE; // gefunden } else nRow++; } break; + case CELLTYPE_STRING: + case CELLTYPE_EDIT: + if (mpParam->mbSkipString) + ++nRow; + else + { + rValue.maString = pCell->GetStringData(); + rValue.mfValue = 0.0; + rValue.mnError = 0; + rValue.mbIsNumber = false; + return true; + } + break; default: nRow++; break; @@ -583,30 +649,309 @@ BOOL ScQueryValueIterator::GetThis(double& rValue, USHORT& rErr) nRow++; } else - nRow = aParam.nRow2 + 1; // Naechste Spalte + nRow = mpParam->nRow2 + 1; // Naechste Spalte } -// return FALSE; +// statement unreachable +// return false; } -BOOL ScQueryValueIterator::GetFirst(double& rValue, USHORT& rErr) +bool ScDBQueryDataIterator::DataAccessInternal::getFirst(Value& rValue) { - nCol = aParam.nCol1; - nRow = aParam.nRow1; - if (aParam.bHasHeader) + if (mpParam->bHasHeader) nRow++; -// nColRow = 0; - ScColumn* pCol = &(pDoc->pTab[nTab])->aCol[nCol]; - pCol->Search( nRow, nColRow ); - return GetThis(rValue, rErr); + + nColRow = ScDBQueryDataIterator::SearchColEntryIndex(*mpDoc, nTab, nRow, nCol); + return getCurrent(rValue); } -BOOL ScQueryValueIterator::GetNext(double& rValue, USHORT& rErr) +bool ScDBQueryDataIterator::DataAccessInternal::getNext(Value& rValue) { ++nRow; - return GetThis(rValue, rErr); + return getCurrent(rValue); } -//------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- + +ScDBQueryDataIterator::DataAccessMatrix::DataAccessMatrix(const ScDBQueryDataIterator* pParent, ScDBQueryParamMatrix* pParam) : + DataAccess(pParent), + mpParam(pParam) +{ + SCSIZE nC, nR; + mpParam->mpMatrix->GetDimensions(nC, nR); + mnRows = static_cast<SCROW>(nR); + mnCols = static_cast<SCCOL>(nC); +} + +ScDBQueryDataIterator::DataAccessMatrix::~DataAccessMatrix() +{ +} + +bool ScDBQueryDataIterator::DataAccessMatrix::getCurrent(Value& rValue) +{ + // Starting from row == mnCurRow, get the first row that satisfies all the + // query parameters. + for ( ;mnCurRow < mnRows; ++mnCurRow) + { + const ScMatrix& rMat = *mpParam->mpMatrix; + if (rMat.IsEmpty(mpParam->mnField, mnCurRow)) + // Don't take empty values into account. + continue; + + bool bIsStrVal = rMat.IsString(mpParam->mnField, mnCurRow); + if (bIsStrVal && mpParam->mbSkipString) + continue; + + if (isValidQuery(mnCurRow, rMat)) + { + rValue.maString = rMat.GetString(mpParam->mnField, mnCurRow); + rValue.mfValue = rMat.GetDouble(mpParam->mnField, mnCurRow); + rValue.mbIsNumber = !bIsStrVal; + rValue.mnError = 0; + return true; + } + } + return false; +} + +bool ScDBQueryDataIterator::DataAccessMatrix::getFirst(Value& rValue) +{ + mnCurRow = mpParam->bHasHeader ? 1 : 0; + return getCurrent(rValue); +} + +bool ScDBQueryDataIterator::DataAccessMatrix::getNext(Value& rValue) +{ + ++mnCurRow; + return getCurrent(rValue); +} + +namespace { + +bool lcl_isQueryByValue(const ScQueryEntry& rEntry, const ScMatrix& rMat, SCSIZE nCol, SCSIZE nRow) +{ + if (rEntry.bQueryByString) + return false; + + if (!rMat.IsValueOrEmpty(nCol, nRow)) + return false; + + return true; +} + +bool lcl_isQueryByString(const ScQueryEntry& rEntry, const ScMatrix& rMat, SCSIZE nCol, SCSIZE nRow) +{ + switch (rEntry.eOp) + { + case SC_EQUAL: + case SC_NOT_EQUAL: + case SC_CONTAINS: + case SC_DOES_NOT_CONTAIN: + case SC_BEGINS_WITH: + case SC_ENDS_WITH: + case SC_DOES_NOT_BEGIN_WITH: + case SC_DOES_NOT_END_WITH: + return true; + default: + ; + } + + if (rEntry.bQueryByString && rMat.IsString(nCol, nRow)) + return true; + + return false; +} + +} + +bool ScDBQueryDataIterator::DataAccessMatrix::isValidQuery(SCROW nRow, const ScMatrix& rMat) const +{ + SCSIZE nEntryCount = mpParam->GetEntryCount(); + vector<bool> aResults; + aResults.reserve(nEntryCount); + + const CollatorWrapper& rCollator = + mpParam->bCaseSens ? *ScGlobal::GetCaseCollator() : *ScGlobal::GetCollator(); + + for (SCSIZE i = 0; i < nEntryCount; ++i) + { + const ScQueryEntry& rEntry = mpParam->GetEntry(i); + if (!rEntry.bDoQuery) + continue; + + switch (rEntry.eOp) + { + case SC_EQUAL: + case SC_LESS: + case SC_GREATER: + case SC_LESS_EQUAL: + case SC_GREATER_EQUAL: + case SC_NOT_EQUAL: + break; + default: + // Only the above operators are supported. + continue; + } + + bool bValid = false; + + SCSIZE nField = static_cast<SCSIZE>(rEntry.nField); + if (lcl_isQueryByValue(rEntry, rMat, nField, nRow)) + { + // By value + double fMatVal = rMat.GetDouble(nField, nRow); + bool bEqual = approxEqual(fMatVal, rEntry.nVal); + switch (rEntry.eOp) + { + case SC_EQUAL: + bValid = bEqual; + break; + case SC_LESS: + bValid = (fMatVal < rEntry.nVal) && !bEqual; + break; + case SC_GREATER: + bValid = (fMatVal > rEntry.nVal) && !bEqual; + break; + case SC_LESS_EQUAL: + bValid = (fMatVal < rEntry.nVal) || bEqual; + break; + case SC_GREATER_EQUAL: + bValid = (fMatVal > rEntry.nVal) || bEqual; + break; + case SC_NOT_EQUAL: + bValid = !bEqual; + break; + default: + ; + } + } + else if (lcl_isQueryByString(rEntry, rMat, nField, nRow)) + { + // By string + do + { + if (!rEntry.pStr) + break; + + // Equality check first. + + OUString aMatStr = rMat.GetString(nField, nRow); + lcl_toUpper(aMatStr); + OUString aQueryStr = *rEntry.pStr; + lcl_toUpper(aQueryStr); + bool bDone = false; + switch (rEntry.eOp) + { + case SC_EQUAL: + bValid = aMatStr.equals(aQueryStr); + bDone = true; + break; + case SC_NOT_EQUAL: + bValid = !aMatStr.equals(aQueryStr); + bDone = true; + break; + default: + ; + } + + if (bDone) + break; + + // Unequality check using collator. + + sal_Int32 nCompare = rCollator.compareString(aMatStr, aQueryStr); + switch (rEntry.eOp) + { + case SC_LESS : + bValid = (nCompare < 0); + break; + case SC_GREATER : + bValid = (nCompare > 0); + break; + case SC_LESS_EQUAL : + bValid = (nCompare <= 0); + break; + case SC_GREATER_EQUAL : + bValid = (nCompare >= 0); + break; + default: + ; + } + } + while (false); + } + else if (mpParam->bMixedComparison) + { + // Not used at the moment. + } + + if (aResults.empty()) + // First query entry. + aResults.push_back(bValid); + else if (rEntry.eConnect == SC_AND) + { + // For AND op, tuck the result into the last result value. + size_t n = aResults.size(); + aResults[n-1] = aResults[n-1] && bValid; + } + else + // For OR op, store its own result. + aResults.push_back(bValid); + } + + // Row is valid as long as there is at least one result being true. + vector<bool>::const_iterator itr = aResults.begin(), itrEnd = aResults.end(); + for (; itr != itrEnd; ++itr) + if (*itr) + return true; + + return false; +} + +// ---------------------------------------------------------------------------- + +ScDBQueryDataIterator::Value::Value() : + mnError(0), mbIsNumber(true) +{ + ::rtl::math::setNan(&mfValue); +} + +// ---------------------------------------------------------------------------- + +ScDBQueryDataIterator::ScDBQueryDataIterator(ScDocument* pDocument, ScDBQueryParamBase* pParam) : + mpParam (pParam) +{ + switch (mpParam->GetType()) + { + case ScDBQueryParamBase::INTERNAL: + { + ScDBQueryParamInternal* p = static_cast<ScDBQueryParamInternal*>(pParam); + mpData.reset(new DataAccessInternal(this, p, pDocument)); + } + break; + case ScDBQueryParamBase::MATRIX: + { + ScDBQueryParamMatrix* p = static_cast<ScDBQueryParamMatrix*>(pParam); + mpData.reset(new DataAccessMatrix(this, p)); + } + } +} + +bool ScDBQueryDataIterator::GetThis(Value& rValue) +{ + return mpData->getCurrent(rValue); +} + +bool ScDBQueryDataIterator::GetFirst(Value& rValue) +{ + return mpData->getFirst(rValue); +} + +bool ScDBQueryDataIterator::GetNext(Value& rValue) +{ + return mpData->getNext(rValue); +} + +// ============================================================================ ScCellIterator::ScCellIterator( ScDocument* pDocument, SCCOL nSCol, SCROW nSRow, SCTAB nSTab, diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx index fc948ad04..2a52ee2b0 100644 --- a/sc/source/core/data/docpool.cxx +++ b/sc/source/core/data/docpool.cxx @@ -36,37 +36,37 @@ #include <svl/aeitem.hxx> #include <svl/itemiter.hxx> #include <svx/algitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/bolnitem.hxx> -#include <svx/brshitem.hxx> -#include <svx/charreliefitem.hxx> -#include <svx/cntritem.hxx> -#include <svx/colritem.hxx> -#include <svx/crsditem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/bolnitem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/charreliefitem.hxx> +#include <editeng/cntritem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/crsditem.hxx> #include <svx/dialmgr.hxx> -#include <svx/emphitem.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/fontitem.hxx> -#include <svx/forbiddenruleitem.hxx> -#include <svx/frmdiritem.hxx> -#include <svx/hngpnctitem.hxx> -#include <svx/itemtype.hxx> -#include <svx/langitem.hxx> -#include <svx/lrspitem.hxx> +#include <editeng/emphitem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/forbiddenruleitem.hxx> +#include <editeng/frmdiritem.hxx> +#include <editeng/hngpnctitem.hxx> +#include <editeng/itemtype.hxx> +#include <editeng/langitem.hxx> +#include <editeng/lrspitem.hxx> #include <svx/pageitem.hxx> -#include <svx/pbinitem.hxx> -#include <svx/postitem.hxx> +#include <editeng/pbinitem.hxx> +#include <editeng/postitem.hxx> #include <svx/rotmodit.hxx> -#include <svx/scriptspaceitem.hxx> -#include <svx/shaditem.hxx> -#include <svx/shdditem.hxx> -#include <svx/sizeitem.hxx> +#include <editeng/scriptspaceitem.hxx> +#include <editeng/shaditem.hxx> +#include <editeng/shdditem.hxx> +#include <editeng/sizeitem.hxx> #include <svx/svxitems.hrc> -#include <svx/udlnitem.hxx> -#include <svx/ulspitem.hxx> -#include <svx/wghtitem.hxx> -#include <svx/wrlmitem.hxx> -#include <svx/xmlcnitm.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/ulspitem.hxx> +#include <editeng/wghtitem.hxx> +#include <editeng/wrlmitem.hxx> +#include <editeng/xmlcnitm.hxx> #include "docpool.hxx" #include "global.hxx" diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 29792013a..f9f2933ce 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -32,11 +32,11 @@ #define _ZFORLIST_DECLARE_TABLE #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> -#include <svx/editeng.hxx> -#include <svx/forbiddencharacterstable.hxx> -#include <svx/linkmgr.hxx> +#include <editeng/editeng.hxx> +#include <editeng/forbiddencharacterstable.hxx> +#include <sfx2/linkmgr.hxx> #include <svx/svdpool.hxx> #include <svx/svdobj.hxx> #include <sfx2/bindings.hxx> @@ -225,7 +225,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, if ( eMode == SCDOCMODE_DOCUMENT ) { if ( pDocShell ) - pLinkManager = new SvxLinkManager( pDocShell ); + pLinkManager = new sfx2::LinkManager( pDocShell ); xPoolHelper = new ScPoolHelper( this ); @@ -260,11 +260,11 @@ ScDocument::ScDocument( ScDocumentMode eMode, aTrackTimer.SetTimeout( 100 ); } -SvxLinkManager* ScDocument::GetLinkManager() const +sfx2::LinkManager* ScDocument::GetLinkManager() const { if ( bAutoCalc && !pLinkManager && pShell) { - pLinkManager = new SvxLinkManager( pShell ); + pLinkManager = new sfx2::LinkManager( pShell ); } return pLinkManager; } diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index 70f712d50..88aa58618 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -31,9 +31,9 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/langitem.hxx> -#include <svx/srchitem.hxx> -#include <svx/linkmgr.hxx> +#include <editeng/langitem.hxx> +#include <svl/srchitem.hxx> +#include <sfx2/linkmgr.hxx> #include <sfx2/bindings.hxx> #include <sfx2/objsh.hxx> #include <svl/zforlist.hxx> diff --git a/sc/source/core/data/documen6.cxx b/sc/source/core/data/documen6.cxx index 53b0b292d..a64201857 100644 --- a/sc/source/core/data/documen6.cxx +++ b/sc/source/core/data/documen6.cxx @@ -31,7 +31,7 @@ #include "scitems.hxx" -#include <svx/scripttypeitem.hxx> +#include <editeng/scripttypeitem.hxx> #include <com/sun/star/i18n/XBreakIterator.hpp> #include <com/sun/star/i18n/ScriptType.hpp> diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 899e83345..bc2bf8c34 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -31,16 +31,16 @@ #define _ZFORLIST_DECLARE_TABLE #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <tools/string.hxx> -#include <svx/editobj.hxx> -#include <svx/editstat.hxx> -#include <svx/frmdiritem.hxx> -#include <svx/langitem.hxx> -#include <svx/linkmgr.hxx> -#include <svx/scripttypeitem.hxx> -#include <svx/unolingu.hxx> +#include <editeng/editobj.hxx> +#include <editeng/editstat.hxx> +#include <editeng/frmdiritem.hxx> +#include <editeng/langitem.hxx> +#include <sfx2/linkmgr.hxx> +#include <editeng/scripttypeitem.hxx> +#include <editeng/unolingu.hxx> #include <sfx2/bindings.hxx> #include <sfx2/objsh.hxx> #include <sfx2/printer.hxx> @@ -1188,7 +1188,7 @@ namespace { (does not include other links from link manager). @return The DDE link, if it exists, otherwise 0. */ ScDdeLink* lclGetDdeLink( - const SvxLinkManager* pLinkManager, + const sfx2::LinkManager* pLinkManager, const String& rAppl, const String& rTopic, const String& rItem, BYTE nMode, USHORT* pnDdePos = NULL ) { @@ -1217,7 +1217,7 @@ ScDdeLink* lclGetDdeLink( /** Returns a pointer to the specified DDE link. @param nDdePos Index of the DDE link (does not include other links from link manager). @return The DDE link, if it exists, otherwise 0. */ -ScDdeLink* lclGetDdeLink( const SvxLinkManager* pLinkManager, USHORT nDdePos ) +ScDdeLink* lclGetDdeLink( const sfx2::LinkManager* pLinkManager, USHORT nDdePos ) { if( pLinkManager ) { diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx index f76be1134..128ff1b60 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -35,13 +35,13 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <sot/exchange.hxx> -#include <svx/akrnitem.hxx> -#include <svx/fontitem.hxx> -#include <svx/forbiddencharacterstable.hxx> -#include <svx/langitem.hxx> +#include <editeng/akrnitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/forbiddencharacterstable.hxx> +#include <editeng/langitem.hxx> #include <svx/svdetc.hxx> #include <svx/svditer.hxx> #include <svx/svdocapt.hxx> diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 997b749c6..7ebbbb51e 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -32,12 +32,12 @@ #define _ZFORLIST_DECLARE_TABLE #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/frmdiritem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/frmdiritem.hxx> #include <svx/pageitem.hxx> -#include <svx/editeng.hxx> +#include <editeng/editeng.hxx> #include <svx/svditer.hxx> #include <svx/svdpage.hxx> #include <svx/svdocapt.hxx> @@ -151,6 +151,32 @@ BOOL ScDocument::GetName( SCTAB nTab, String& rName ) const return FALSE; } +BOOL ScDocument::SetCodeName( SCTAB nTab, String& rName ) +{ + if (VALIDTAB(nTab)) + { + if (pTab[nTab]) + { + pTab[nTab]->SetCodeName( rName ); + return TRUE; + } + } + OSL_TRACE( "**** can't set code name %s", rtl::OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ).getStr() ); + return FALSE; +} + +BOOL ScDocument::GetCodeName( SCTAB nTab, String& rName ) const +{ + if (VALIDTAB(nTab)) + if (pTab[nTab]) + { + pTab[nTab]->GetCodeName( rName ); + return TRUE; + } + rName.Erase(); + return FALSE; +} + BOOL ScDocument::GetTable( const String& rName, SCTAB& rTab ) const { @@ -290,6 +316,7 @@ BOOL ScDocument::InsertTab( SCTAB nPos, const String& rName, if (nPos == SC_TAB_APPEND || nPos == nTabCount) { pTab[nTabCount] = new ScTable(this, nTabCount, rName); + pTab[nTabCount]->SetCodeName( rName ); ++nMaxTableNumber; if ( bExternalDocument ) pTab[nTabCount]->SetVisible( FALSE ); @@ -317,10 +344,16 @@ BOOL ScDocument::InsertTab( SCTAB nPos, const String& rName, for (i = 0; i <= MAXTAB; i++) if (pTab[i]) pTab[i]->UpdateInsertTab(nPos); + for (i = nTabCount; i > nPos; i--) + { pTab[i] = pTab[i - 1]; + } + pTab[nPos] = new ScTable(this, nPos, rName); + pTab[nPos]->SetCodeName( rName ); ++nMaxTableNumber; + // UpdateBroadcastAreas must be called between UpdateInsertTab, // which ends listening, and StartAllListeners, to not modify // areas that are to be inserted by starting listeners. @@ -4667,6 +4700,13 @@ ULONG ScDocument::GetCellCount() const return nCellCount; } +SCSIZE ScDocument::GetCellCount(SCTAB nTab, SCCOL nCol) const +{ + if (!ValidTab(nTab) || !pTab[nTab]) + return 0; + + return pTab[nTab]->GetCellCount(nCol); +} ULONG ScDocument::GetCodeCount() const { diff --git a/sc/source/core/data/dpcachetable.cxx b/sc/source/core/data/dpcachetable.cxx index 7bb8fedcb..524f0eb8c 100644 --- a/sc/source/core/data/dpcachetable.cxx +++ b/sc/source/core/data/dpcachetable.cxx @@ -34,6 +34,7 @@ #include "dptabdat.hxx" #include "dptabsrc.hxx" #include "dpobject.hxx" +#include "queryparam.hxx" #include <com/sun/star/i18n/LocaleDataItem.hpp> #include <com/sun/star/sdbc/DataType.hpp> @@ -205,9 +206,39 @@ sal_Int32 ScDPCacheTable::getColSize() const return maTable.empty() ? 0 : maTable[0].size(); } +namespace { + +/** + * While the macro interpret level is incremented, the formula cells are + * (semi-)guaranteed to be interpreted. + */ +class MacroInterpretIncrementer +{ +public: + MacroInterpretIncrementer(ScDocument* pDoc) : + mpDoc(pDoc) + { + mpDoc->IncMacroInterpretLevel(); + } + ~MacroInterpretIncrementer() + { + mpDoc->DecMacroInterpretLevel(); + } +private: + ScDocument* mpDoc; +}; + +} + void ScDPCacheTable::fillTable(ScDocument* pDoc, const ScRange& rRange, const ScQueryParam& rQuery, BOOL* pSpecial, bool bIgnoreEmptyRows) { + // Make sure the formula cells within the data range are interpreted + // during this call, for this method may be called from the interpretation + // of GETPIVOTDATA, which disables nested formula interpretation without + // increasing the macro level. + MacroInterpretIncrementer aMacroInc(pDoc); + SCTAB nTab = rRange.aStart.Tab(); SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index 7fc30c6c1..21a5cc374 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -34,9 +34,9 @@ #include "scitems.hxx" #include <svx/algitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/brshitem.hxx> -#include <svx/wghtitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/wghtitem.hxx> #include <unotools/transliterationwrapper.hxx> #include "dpoutput.hxx" diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 3522434dc..2e9cfa27b 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -40,8 +40,8 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/eeitem.hxx> -#include <svx/frmdiritem.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/frmdiritem.hxx> #include <sot/exchange.hxx> #include <svx/objfac3d.hxx> #include <svx/xtable.hxx> @@ -53,10 +53,10 @@ #include <svx/svdograf.hxx> #include <svx/svdoole2.hxx> #include <svx/svdundo.hxx> -#include <svx/unolingu.hxx> +#include <editeng/unolingu.hxx> #include <svx/drawitem.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/scriptspaceitem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/scriptspaceitem.hxx> #include <svx/shapepropertynotifier.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/docfile.hxx> diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx index 3d322cf2e..c5f3ab435 100644 --- a/sc/source/core/data/fillinfo.cxx +++ b/sc/source/core/data/fillinfo.cxx @@ -33,10 +33,10 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/boxitem.hxx> -#include <svx/bolnitem.hxx> -#include <svx/editdata.hxx> // can be removed if table has a bLayoutRTL flag -#include <svx/shaditem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/bolnitem.hxx> +#include <editeng/editdata.hxx> // can be removed if table has a bLayoutRTL flag +#include <editeng/shaditem.hxx> #include "fillinfo.hxx" #include "document.hxx" diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 39805e7c5..59d11536e 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -34,11 +34,11 @@ #include <vcl/svapp.hxx> #include "scitems.hxx" #include <svx/algitem.hxx> -#include <svx/brshitem.hxx> -#include <svx/editobj.hxx> -#include <svx/scripttypeitem.hxx> -#include <svx/srchitem.hxx> -#include <svx/langitem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/editobj.hxx> +#include <editeng/scripttypeitem.hxx> +#include <svl/srchitem.hxx> +#include <editeng/langitem.hxx> #include <sfx2/docfile.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/objsh.hxx> diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx index e8f6ccd4a..6d9389453 100644 --- a/sc/source/core/data/global2.cxx +++ b/sc/source/core/data/global2.cxx @@ -240,238 +240,6 @@ utl::TextSearch* ScQueryEntry::GetSearchTextPtr( BOOL bCaseSens ) } //------------------------------------------------------------------------ - -ScQueryParam::ScQueryParam() -{ - nEntryCount = 0; - Clear(); -} - -//------------------------------------------------------------------------ - -ScQueryParam::ScQueryParam( const ScQueryParam& r ) : - nCol1(r.nCol1),nRow1(r.nRow1),nCol2(r.nCol2),nRow2(r.nRow2),nTab(r.nTab), - bHasHeader(r.bHasHeader), bByRow(r.bByRow), bInplace(r.bInplace), bCaseSens(r.bCaseSens), - bRegExp(r.bRegExp), bMixedComparison(r.bMixedComparison), - bDuplicate(r.bDuplicate), bDestPers(r.bDestPers), - nDestTab(r.nDestTab), nDestCol(r.nDestCol), nDestRow(r.nDestRow) -{ - nEntryCount = 0; - - Resize( r.nEntryCount ); - for (USHORT i=0; i<nEntryCount; i++) - pEntries[i] = r.pEntries[i]; -} - -//------------------------------------------------------------------------ - -ScQueryParam::~ScQueryParam() -{ - delete[] pEntries; -} - -//------------------------------------------------------------------------ - -void ScQueryParam::Clear() -{ - nCol1=nCol2=nDestCol = 0; - nRow1=nRow2=nDestRow = 0; - nDestTab = 0; - nTab = SCTAB_MAX; - bHasHeader = bCaseSens = bRegExp = bMixedComparison = FALSE; - bInplace = bByRow = bDuplicate = bDestPers = TRUE; - - Resize( MAXQUERY ); - for (USHORT i=0; i<MAXQUERY; i++) - pEntries[i].Clear(); -} - -//------------------------------------------------------------------------ - -ScQueryParam& ScQueryParam::operator=( const ScQueryParam& r ) -{ - nCol1 = r.nCol1; - nRow1 = r.nRow1; - nCol2 = r.nCol2; - nRow2 = r.nRow2; - nTab = r.nTab; - nDestTab = r.nDestTab; - nDestCol = r.nDestCol; - nDestRow = r.nDestRow; - bHasHeader = r.bHasHeader; - bInplace = r.bInplace; - bCaseSens = r.bCaseSens; - bRegExp = r.bRegExp; - bMixedComparison = r.bMixedComparison; - bDuplicate = r.bDuplicate; - bByRow = r.bByRow; - bDestPers = r.bDestPers; - - Resize( r.nEntryCount ); - for (USHORT i=0; i<nEntryCount; i++) - pEntries[i] = r.pEntries[i]; - - return *this; -} - -//------------------------------------------------------------------------ - -BOOL ScQueryParam::operator==( const ScQueryParam& rOther ) const -{ - BOOL bEqual = FALSE; - - // Anzahl der Queries gleich? - USHORT nUsed = 0; - USHORT nOtherUsed = 0; - while ( nUsed<nEntryCount && pEntries[nUsed].bDoQuery ) ++nUsed; - while ( nOtherUsed<rOther.nEntryCount && rOther.pEntries[nOtherUsed].bDoQuery ) - ++nOtherUsed; - - if ( (nUsed == nOtherUsed) - && (nCol1 == rOther.nCol1) - && (nRow1 == rOther.nRow1) - && (nCol2 == rOther.nCol2) - && (nRow2 == rOther.nRow2) - && (nTab == rOther.nTab) - && (bHasHeader == rOther.bHasHeader) - && (bByRow == rOther.bByRow) - && (bInplace == rOther.bInplace) - && (bCaseSens == rOther.bCaseSens) - && (bRegExp == rOther.bRegExp) - && (bMixedComparison == rOther.bMixedComparison) - && (bDuplicate == rOther.bDuplicate) - && (bDestPers == rOther.bDestPers) - && (nDestTab == rOther.nDestTab) - && (nDestCol == rOther.nDestCol) - && (nDestRow == rOther.nDestRow) ) - { - bEqual = TRUE; - for ( USHORT i=0; i<nUsed && bEqual; i++ ) - bEqual = pEntries[i] == rOther.pEntries[i]; - } - return bEqual; -} - -//------------------------------------------------------------------------ - -void ScQueryParam::DeleteQuery( SCSIZE nPos ) -{ - if (nPos<nEntryCount) - { - for (SCSIZE i=nPos; i+1<nEntryCount; i++) - pEntries[i] = pEntries[i+1]; - - pEntries[nEntryCount-1].Clear(); - } - else - { - DBG_ERROR("Falscher Parameter bei ScQueryParam::DeleteQuery"); - } -} - -//------------------------------------------------------------------------ - -void ScQueryParam::Resize(SCSIZE nNew) -{ - if ( nNew < MAXQUERY ) - nNew = MAXQUERY; // nie weniger als MAXQUERY - - ScQueryEntry* pNewEntries = NULL; - if ( nNew ) - pNewEntries = new ScQueryEntry[nNew]; - - SCSIZE nCopy = Min( nEntryCount, nNew ); - for (SCSIZE i=0; i<nCopy; i++) - pNewEntries[i] = pEntries[i]; - - if ( nEntryCount ) - delete[] pEntries; - nEntryCount = nNew; - pEntries = pNewEntries; -} - -//------------------------------------------------------------------------ - -void ScQueryParam::MoveToDest() -{ - if (!bInplace) - { - SCsCOL nDifX = ((SCsCOL) nDestCol) - ((SCsCOL) nCol1); - SCsROW nDifY = ((SCsROW) nDestRow) - ((SCsROW) nRow1); - SCsTAB nDifZ = ((SCsTAB) nDestTab) - ((SCsTAB) nTab); - - nCol1 = sal::static_int_cast<SCCOL>( nCol1 + nDifX ); - nRow1 = sal::static_int_cast<SCROW>( nRow1 + nDifY ); - nCol2 = sal::static_int_cast<SCCOL>( nCol2 + nDifX ); - nRow2 = sal::static_int_cast<SCROW>( nRow2 + nDifY ); - nTab = sal::static_int_cast<SCTAB>( nTab + nDifZ ); - for (USHORT i=0; i<nEntryCount; i++) - pEntries[i].nField += nDifX; - - bInplace = TRUE; - } - else - { - DBG_ERROR("MoveToDest, bInplace == TRUE"); - } -} - -//------------------------------------------------------------------------ - -void ScQueryParam::FillInExcelSyntax(String& aCellStr, SCSIZE nIndex) -{ - if (aCellStr.Len() > 0) - { - if ( nIndex >= nEntryCount ) - Resize( nIndex+1 ); - - ScQueryEntry& rEntry = pEntries[nIndex]; - - rEntry.bDoQuery = TRUE; - // Operatoren herausfiltern - if (aCellStr.GetChar(0) == '<') - { - if (aCellStr.GetChar(1) == '>') - { - *rEntry.pStr = aCellStr.Copy(2); - rEntry.eOp = SC_NOT_EQUAL; - } - else if (aCellStr.GetChar(1) == '=') - { - *rEntry.pStr = aCellStr.Copy(2); - rEntry.eOp = SC_LESS_EQUAL; - } - else - { - *rEntry.pStr = aCellStr.Copy(1); - rEntry.eOp = SC_LESS; - } - } - else if (aCellStr.GetChar(0) == '>') - { - if (aCellStr.GetChar(1) == '=') - { - *rEntry.pStr = aCellStr.Copy(2); - rEntry.eOp = SC_GREATER_EQUAL; - } - else - { - *rEntry.pStr = aCellStr.Copy(1); - rEntry.eOp = SC_GREATER; - } - } - else - { - if (aCellStr.GetChar(0) == '=') - *rEntry.pStr = aCellStr.Copy(1); - else - *rEntry.pStr = aCellStr; - rEntry.eOp = SC_EQUAL; - } - } -} - -//------------------------------------------------------------------------ // struct ScSubTotalParam: ScSubTotalParam::ScSubTotalParam() diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index 8d969364f..7b6309366 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -32,31 +32,31 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/adjitem.hxx> +#include <editeng/adjitem.hxx> #include <svx/algitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/bolnitem.hxx> -#include <svx/brshitem.hxx> -#include <svx/charreliefitem.hxx> -#include <svx/cntritem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/bolnitem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/charreliefitem.hxx> +#include <editeng/cntritem.hxx> #include <svtools/colorcfg.hxx> -#include <svx/colritem.hxx> -#include <svx/crsditem.hxx> -#include <svx/emphitem.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/fontitem.hxx> -#include <svx/forbiddenruleitem.hxx> -#include <svx/frmdiritem.hxx> -#include <svx/langitem.hxx> -#include <svx/postitem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/crsditem.hxx> +#include <editeng/emphitem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/forbiddenruleitem.hxx> +#include <editeng/frmdiritem.hxx> +#include <editeng/langitem.hxx> +#include <editeng/postitem.hxx> #include <svx/rotmodit.hxx> -#include <svx/scriptspaceitem.hxx> -#include <svx/scripttypeitem.hxx> -#include <svx/shaditem.hxx> -#include <svx/shdditem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/wghtitem.hxx> -#include <svx/wrlmitem.hxx> +#include <editeng/scriptspaceitem.hxx> +#include <editeng/scripttypeitem.hxx> +#include <editeng/shaditem.hxx> +#include <editeng/shdditem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/wghtitem.hxx> +#include <editeng/wrlmitem.hxx> #include <svl/intitem.hxx> #include <svl/zforlist.hxx> #include <vcl/outdev.hxx> diff --git a/sc/source/core/data/pivot2.cxx b/sc/source/core/data/pivot2.cxx index db7ec9752..66bfd3b86 100644 --- a/sc/source/core/data/pivot2.cxx +++ b/sc/source/core/data/pivot2.cxx @@ -37,8 +37,8 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/boxitem.hxx> -#include <svx/wghtitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/wghtitem.hxx> #include <svx/algitem.hxx> #include <unotools/transliterationwrapper.hxx> diff --git a/sc/source/core/data/poolhelp.cxx b/sc/source/core/data/poolhelp.cxx index 575c02e21..fda341f7d 100644 --- a/sc/source/core/data/poolhelp.cxx +++ b/sc/source/core/data/poolhelp.cxx @@ -33,7 +33,7 @@ // INCLUDE --------------------------------------------------------------- #include <svl/zforlist.hxx> -#include <svx/editeng.hxx> +#include <editeng/editeng.hxx> #include "poolhelp.hxx" #include "document.hxx" diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index 98aa0f003..79f9e0714 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -34,8 +34,8 @@ #include <unotools/useroptions.hxx> #include <svx/svdpage.hxx> #include <svx/svdocapt.hxx> -#include <svx/outlobj.hxx> -#include <svx/editobj.hxx> +#include <editeng/outlobj.hxx> +#include <editeng/editobj.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include "scitems.hxx" diff --git a/sc/source/core/data/sortparam.cxx b/sc/source/core/data/sortparam.cxx index 5891fd664..dd3a9cdf4 100644 --- a/sc/source/core/data/sortparam.cxx +++ b/sc/source/core/data/sortparam.cxx @@ -33,6 +33,7 @@ #include "sortparam.hxx" #include "global.hxx" #include "address.hxx" +#include "queryparam.hxx" #include <tools/debug.hxx> diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index a1755ced2..863ff1c39 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -32,20 +32,20 @@ //------------------------------------------------------------------------ #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svx/algitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/brshitem.hxx> -#include <svx/editdata.hxx> -#include <svx/editeng.hxx> -#include <svx/editobj.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/flditem.hxx> -#include <svx/fontitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/editdata.hxx> +#include <editeng/editeng.hxx> +#include <editeng/editobj.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/flditem.hxx> +#include <editeng/fontitem.hxx> #include <svx/pageitem.hxx> -#include <svx/postitem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/wghtitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/wghtitem.hxx> #include <svl/itemset.hxx> #include <svl/zforlist.hxx> #include <unotools/charclass.hxx> diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx index b6d16bc22..6c614812b 100644 --- a/sc/source/core/data/stlsheet.cxx +++ b/sc/source/core/data/stlsheet.cxx @@ -36,14 +36,14 @@ #include "stlpool.hxx" #include "scitems.hxx" -#include <svx/boxitem.hxx> -#include <svx/frmdiritem.hxx> -#include <svx/lrspitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/frmdiritem.hxx> +#include <editeng/lrspitem.hxx> #include <svx/pageitem.hxx> -#include <svx/paperinf.hxx> -#include <svx/pbinitem.hxx> -#include <svx/sizeitem.hxx> -#include <svx/ulspitem.hxx> +#include <editeng/paperinf.hxx> +#include <editeng/pbinitem.hxx> +#include <editeng/sizeitem.hxx> +#include <editeng/ulspitem.hxx> #include <sfx2/printer.hxx> #include <svl/itempool.hxx> #include <svl/itemset.hxx> diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index 0a9af739e..5a7ad116e 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -122,6 +122,7 @@ extern BOOL bIsOlk, bOderSo; ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const String& rNewName, BOOL bColInfo, BOOL bRowInfo ) : aName( rNewName ), + aCodeName( rNewName ), bScenario( FALSE ), bLayoutRTL( FALSE ), bLoadingRTL( FALSE ), diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 5c24eb047..92bd65df3 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -31,7 +31,7 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/boxitem.hxx> +#include <editeng/boxitem.hxx> #include <tools/urlobj.hxx> #include <svl/poolcach.hxx> #include <unotools/charclass.hxx> diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 48d300829..16469b3da 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -57,6 +57,7 @@ #include "progress.hxx" #include "cellform.hxx" #include "postit.hxx" +#include "queryparam.hxx" #include <vector> @@ -1815,6 +1816,11 @@ BOOL ScTable::GetDataEntries(SCCOL nCol, SCROW nRow, TypedScStrCollection& rStri return aCol[nCol].GetDataEntries( nRow, rStrings, bLimit ); } +SCSIZE ScTable::GetCellCount(SCCOL nCol) const +{ + return aCol[nCol].GetCellCount(); +} + ULONG ScTable::GetCellCount() const { ULONG nCellCount = 0; diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index 6f2776898..749324156 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -41,23 +41,23 @@ #include "scitems.hxx" #include <svx/algitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/brshitem.hxx> -#include <svx/cntritem.hxx> -#include <svx/colritem.hxx> -#include <svx/crsditem.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/fontitem.hxx> -#include <svx/langitem.hxx> -#include <svx/postitem.hxx> -#include <svx/shdditem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/wghtitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/cntritem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/crsditem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/langitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/shdditem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/wghtitem.hxx> #include <svx/rotmodit.hxx> -#include <svx/editobj.hxx> -#include <svx/editeng.hxx> -#include <svx/eeitem.hxx> -#include <svx/escpitem.hxx> +#include <editeng/editobj.hxx> +#include <editeng/editeng.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/escpitem.hxx> #include <svl/zforlist.hxx> #include <vcl/keycodes.hxx> #include <rtl/math.hxx> diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx index 1dd730f5e..381cd9c00 100644 --- a/sc/source/core/data/table6.cxx +++ b/sc/source/core/data/table6.cxx @@ -33,8 +33,8 @@ #include <com/sun/star/i18n/TransliterationModules.hpp> #include <unotools/textsearch.hxx> -#include <svx/srchitem.hxx> -#include <svx/editobj.hxx> +#include <svl/srchitem.hxx> +#include <editeng/editobj.hxx> #include "table.hxx" #include "collect.hxx" diff --git a/sc/source/core/inc/core_pch.hxx b/sc/source/core/inc/core_pch.hxx index 6e9c43bf6..6139d1aae 100644 --- a/sc/source/core/inc/core_pch.hxx +++ b/sc/source/core/inc/core_pch.hxx @@ -171,10 +171,10 @@ #include <vcl/combobox.hxx> #include <vcl/combobox.h> #include <refupdat.hxx> -#include <svx/boxitem.hxx> +#include <editeng/boxitem.hxx> #include <conditio.hxx> #include <brdcst.hxx> -#include <svx/svxenum.hxx> +#include <editeng/svxenum.hxx> #include <dociter.hxx> #include <scdll.hxx> #include <stdio.h> @@ -205,35 +205,35 @@ #include <svx/pageitem.hxx> #include <dbcolect.hxx> #include <userlist.hxx> -#include <svx/editdata.hxx> +#include <editeng/editdata.hxx> #include <basic/sbxvar.hxx> #include <basic/sbxcore.hxx> #include <svx/svdobj.hxx> #include <svx/svdsob.hxx> #include <svx/svdglue.hxx> -#include <svx/langitem.hxx> -#include <svx/eeitem.hxx> +#include <editeng/langitem.hxx> +#include <editeng/eeitem.hxx> #include <callform.hxx> #include <validat.hxx> -#include <svx/brshitem.hxx> +#include <editeng/brshitem.hxx> #include <sot/exchange.hxx> -#include <svx/editeng.hxx> +#include <editeng/editeng.hxx> #include <vcl/fonttype.hxx> -#include <svx/editobj.hxx> -#include <svx/wghtitem.hxx> -#include <svx/fhgtitem.hxx> +#include <editeng/editobj.hxx> +#include <editeng/wghtitem.hxx> +#include <editeng/fhgtitem.hxx> #include <svl/stritem.hxx> #include <pivot.hxx> #include <vcl/gdimtf.hxx> #include <svx/svdpage.hxx> #include <svx/svdlayer.hxx> -#include <svx/linkmgr.hxx> +#include <sfx2/linkmgr.hxx> #include <ctype.h> #include <vcl/font.hxx> -#include <svx/fontitem.hxx> -#include <svx/postitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/postitem.hxx> #include <svx/svditer.hxx> -#include <svx/udlnitem.hxx> +#include <editeng/udlnitem.hxx> #include <adiasync.hxx> #include <sfx2/bindings.hxx> #include <ddelink.hxx> diff --git a/sc/source/core/inc/doubleref.hxx b/sc/source/core/inc/doubleref.hxx new file mode 100644 index 000000000..d79b90790 --- /dev/null +++ b/sc/source/core/inc/doubleref.hxx @@ -0,0 +1,194 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: interpre.hxx,v $ + * $Revision: 1.35.44.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SC_DOUBLEREF_HXX +#define SC_DOUBLEREF_HXX + +#include "address.hxx" +#include "scmatrix.hxx" + +class ScDocument; +class ScBaseCell; +struct ScDBQueryParamBase; +struct ScQueryParamBase; + +// ============================================================================ + +/** + * Base class for abstracting range data backends for database functions. + */ +class ScDBRangeBase +{ +public: + enum RefType { INTERNAL, EXTERNAL }; + + virtual ~ScDBRangeBase() = 0; + + RefType getType() const; + bool fillQueryEntries(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef) const; + + virtual SCCOL getColSize() const = 0; + virtual SCROW getRowSize() const = 0; + virtual SCSIZE getVisibleDataCellCount() const = 0; + + /** + * Get a string value of a specified cell position. Note that the + * position of the upper left cell of the range is always (0, 0) even if + * the reference type is of internal range. + * + * @param nCol column position (0 to column size-1) + * @param nRow row position (0 to row size-1) + */ + virtual ::rtl::OUString getString(SCCOL nCol, SCROW nRow) const = 0; + + virtual SCCOL getFirstFieldColumn() const = 0; + + /** + * Get a <i>0-based</i> column index that corresponds with the passed field + * index. Note that the field index passed as the 1st parameter is + * <i>1-based.</i> + * + * @param nIndex 1-based field index. + * + * @return 0-based column index + */ + virtual SCCOL findFieldColumn(SCCOL nIndex) const = 0; + virtual SCCOL findFieldColumn(const ::rtl::OUString& rStr, sal_uInt16* pErr = NULL) const = 0; + virtual ScDBQueryParamBase* createQueryParam(const ScDBRangeBase* pQueryRef) const = 0; + virtual bool isRangeEqual(const ScRange& rRange) const = 0; + +protected: + ScDBRangeBase(ScDocument* pDoc, RefType eType); + ScDocument* getDoc() const; + + /** + * Populate query options that are always the same for all database + * queries. + */ + static void fillQueryOptions(ScQueryParamBase* pParam); + +private: + ScDBRangeBase(); // disabled + + ScDocument* mpDoc; + RefType meType; +}; + +// ============================================================================ + +class ScDBInternalRange : public ScDBRangeBase +{ +public: + explicit ScDBInternalRange(ScDocument* pDoc, const ScRange& rRange); + virtual ~ScDBInternalRange(); + + const ScRange& getRange() const; + + virtual SCCOL getColSize() const; + virtual SCROW getRowSize() const; + virtual SCSIZE getVisibleDataCellCount() const; + + /** + * Get a string value of a specified cell position. Note that the + * position of the upper left cell of the range is always (0, 0) even if + * the reference type is of internal range. + * + * @param nCol column position (0 to column size-1) + * @param nRow row position (0 to row size-1) + */ + virtual ::rtl::OUString getString(SCCOL nCol, SCROW nRow) const; + + virtual SCCOL getFirstFieldColumn() const; + /** + * Get a <i>0-based</i> column index that corresponds with the passed field + * index. Note that the field index passed as the 1st parameter is + * <i>1-based.</i> + * + * @param nIndex 1-based field index. + * + * @return 0-based column index + */ + virtual SCCOL findFieldColumn(SCCOL nIndex) const; + virtual SCCOL findFieldColumn(const ::rtl::OUString& rStr, sal_uInt16* pErr = NULL) const; + virtual ScDBQueryParamBase* createQueryParam(const ScDBRangeBase* pQueryRef) const; + virtual bool isRangeEqual(const ScRange& rRange) const; + +private: + sal_uInt16 getCellString(::rtl::OUString& rStr, ScBaseCell* pCell) const; + +private: + ScRange maRange; +}; + +// ============================================================================ + +class ScDBExternalRange : public ScDBRangeBase +{ +public: + explicit ScDBExternalRange(ScDocument* pDoc, const ScMatrixRef& pMat); + virtual ~ScDBExternalRange(); + + virtual SCCOL getColSize() const; + virtual SCROW getRowSize() const; + virtual SCSIZE getVisibleDataCellCount() const; + + /** + * Get a string value of a specified cell position. Note that the + * position of the upper left cell of the range is always (0, 0) even if + * the reference type is of internal range. + * + * @param nCol column position (0 to column size-1) + * @param nRow row position (0 to row size-1) + */ + virtual ::rtl::OUString getString(SCCOL nCol, SCROW nRow) const; + + virtual SCCOL getFirstFieldColumn() const; + + /** + * Get a <i>0-based</i> column index that corresponds with the passed field + * index. Note that the field index passed as the 1st parameter is + * <i>1-based.</i> + * + * @param nIndex 1-based field index. + * + * @return 0-based column index + */ + virtual SCCOL findFieldColumn(SCCOL nIndex) const; + virtual SCCOL findFieldColumn(const ::rtl::OUString& rStr, sal_uInt16* pErr = NULL) const; + virtual ScDBQueryParamBase* createQueryParam(const ScDBRangeBase* pQueryRef) const; + virtual bool isRangeEqual(const ScRange& rRange) const; + +private: + const ScMatrixRef mpMatrix; + SCCOL mnCols; + SCROW mnRows; +}; + +#endif diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index 665dee55a..6ee94b199 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -50,7 +50,10 @@ class SbxVariable; class ScBaseCell; class ScFormulaCell; class SvNumberFormatter; +class ScDBRangeBase; struct MatrixDoubleOp; +struct ScQueryParam; +struct ScDBQueryParamBase; struct ScCompare { @@ -299,6 +302,7 @@ void DoubleRefToVars( const ScToken* p, SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1, SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2, BOOL bDontCheckForTableOp = FALSE ); +ScDBRangeBase* PopDoubleRef(); void PopDoubleRef(SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1, SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2, BOOL bDontCheckForTableOp = FALSE ); @@ -488,7 +492,7 @@ void ScSubTotal(); // compatibility). If this was the case then rMissingField is set to TRUE upon // return. If rMissingField==FALSE upon call all "missing cases" are considered // to be an error. -BOOL GetDBParams( SCTAB& rTab, ScQueryParam& rParam, BOOL& rMissingField ); +ScDBQueryParamBase* GetDBParams( BOOL& rMissingField ); void DBIterator( ScIterFunc ); void ScDBSum(); diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index d14908b32..0ed8c1962 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -43,7 +43,7 @@ #include <vcl/outdev.hxx> #include <svx/dialmgr.hxx> #include <svx/dialogs.hrc> -#include <svx/langitem.hxx> +#include <editeng/langitem.hxx> #include <tools/urlobj.hxx> #include <unotools/transliterationwrapper.hxx> #include <tools/tenccvt.hxx> diff --git a/sc/source/core/tool/dbcolect.cxx b/sc/source/core/tool/dbcolect.cxx index b8ca629fd..13179b24b 100644 --- a/sc/source/core/tool/dbcolect.cxx +++ b/sc/source/core/tool/dbcolect.cxx @@ -37,6 +37,7 @@ #include "refupdat.hxx" #include "rechead.hxx" #include "document.hxx" +#include "queryparam.hxx" #include "globstr.hrc" diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx index 25f21a28b..b3959f79c 100644 --- a/sc/source/core/tool/ddelink.cxx +++ b/sc/source/core/tool/ddelink.cxx @@ -32,7 +32,7 @@ // INCLUDE --------------------------------------------------------------- #include <tools/list.hxx> -#include <svx/linkmgr.hxx> +#include <sfx2/linkmgr.hxx> #include <sfx2/bindings.hxx> #include <svl/zforlist.hxx> @@ -247,7 +247,7 @@ void __EXPORT ScDdeLink::ListenersGone() ScDocument* pStackDoc = pDoc; // member pDoc can't be used after removing the link - SvxLinkManager* pLinkMgr = pDoc->GetLinkManager(); + sfx2::LinkManager* pLinkMgr = pDoc->GetLinkManager(); pLinkMgr->Remove( this); // deletes this if ( !pLinkMgr->GetLinks().Count() ) // letzten geloescht ? diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx index 06ec74be4..8e6e9f1c3 100644 --- a/sc/source/core/tool/detfunc.cxx +++ b/sc/source/core/tool/detfunc.cxx @@ -32,8 +32,8 @@ #include "scitems.hxx" #include <svtools/colorcfg.hxx> -#include <svx/eeitem.hxx> -#include <svx/outlobj.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/outlobj.hxx> #include <svx/sdshitm.hxx> #include <svx/sdsxyitm.hxx> #include <svx/sdtditm.hxx> @@ -55,11 +55,11 @@ #include <svx/xlnstwit.hxx> #include <svx/xlnwtit.hxx> #include <svx/xtable.hxx> -#include <svx/outliner.hxx> -#include <svx/editobj.hxx> +#include <editeng/outliner.hxx> +#include <editeng/editobj.hxx> #include <svx/sxcecitm.hxx> #include <svl/whiter.hxx> -#include <svx/writingmodeitem.hxx> +#include <editeng/writingmodeitem.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx new file mode 100644 index 000000000..01528db9f --- /dev/null +++ b/sc/source/core/tool/doubleref.cxx @@ -0,0 +1,568 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: interpre.hxx,v $ + * $Revision: 1.35.44.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sc.hxx" + +// INCLUDE --------------------------------------------------------------- + +#include "doubleref.hxx" +#include "cell.hxx" +#include "global.hxx" +#include "document.hxx" +#include "queryparam.hxx" +#include "globstr.hrc" + +#include <memory> +#include <vector> + +using ::rtl::OUString; +using ::std::auto_ptr; +using ::std::vector; + +namespace { + +void lcl_toUpper(OUString& rStr) +{ + rStr = ScGlobal::pCharClass->toUpper(rStr.trim(), 0, static_cast<xub_StrLen>(rStr.getLength())); +} + +bool lcl_createStarQuery(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef, const ScDBRangeBase* pQueryRef) +{ + // A valid StarQuery must be at least 4 columns wide. To be precise it + // should be exactly 4 columns ... + // Additionally, if this wasn't checked, a formula pointing to a valid 1-3 + // column Excel style query range immediately left to itself would result + // in a circular reference when the field name or operator or value (first + // to third query range column) is obtained (#i58354#). Furthermore, if the + // range wasn't sufficiently specified data changes wouldn't flag formula + // cells for recalculation. + + if (pQueryRef->getColSize() < 4) + return false; + + BOOL bValid; + BOOL bFound; + OUString aCellStr; + SCSIZE nIndex = 0; + SCROW nRow = 0; + SCROW nRows = pDBRef->getRowSize(); + SCSIZE nNewEntries = static_cast<SCSIZE>(nRows); + pParam->Resize(nNewEntries); + + do + { + ScQueryEntry& rEntry = pParam->GetEntry(nIndex); + + bValid = FALSE; + + if (nIndex > 0) + { + // For all entries after the first one, check the and/or connector in the first column. + aCellStr = pQueryRef->getString(0, nRow); + lcl_toUpper(aCellStr); + if ( aCellStr.equals(ScGlobal::GetRscString(STR_TABLE_UND)) ) + { + rEntry.eConnect = SC_AND; + bValid = TRUE; + } + else if ( aCellStr.equals(ScGlobal::GetRscString(STR_TABLE_ODER)) ) + { + rEntry.eConnect = SC_OR; + bValid = TRUE; + } + } + + if ((nIndex < 1) || bValid) + { + // field name in the 2nd column. + bFound = FALSE; + aCellStr = pQueryRef->getString(1, nRow); + SCCOL nField = pDBRef->findFieldColumn(aCellStr); // TODO: must be case insensitive comparison. + if (ValidCol(nField)) + { + rEntry.nField = nField; + bValid = true; + } + else + bValid = false; + } + + if (bValid) + { + // equality, non-equality operator in the 3rd column. + bFound = FALSE; + aCellStr = pQueryRef->getString(2, nRow); + lcl_toUpper(aCellStr); + const sal_Unicode* p = aCellStr.getStr(); + if (p[0] == sal_Unicode('<')) + { + if (p[1] == sal_Unicode('>')) + rEntry.eOp = SC_NOT_EQUAL; + else if (p[1] == sal_Unicode('=')) + rEntry.eOp = SC_LESS_EQUAL; + else + rEntry.eOp = SC_LESS; + } + else if (p[0] == sal_Unicode('>')) + { + if (p[1] == sal_Unicode('=')) + rEntry.eOp = SC_GREATER_EQUAL; + else + rEntry.eOp = SC_GREATER; + } + else if (p[0] == sal_Unicode('=')) + rEntry.eOp = SC_EQUAL; + + } + + if (bValid) + { + // Finally, the right-hand-side value in the 4th column. + *rEntry.pStr = pQueryRef->getString(3, nRow); + rEntry.bDoQuery = TRUE; + } + nIndex++; + nRow++; + } + while (bValid && (nRow < nRows) /* && (nIndex < MAXQUERY) */ ); + return bValid; +} + +bool lcl_createExcelQuery( + ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef, const ScDBRangeBase* pQueryRef) +{ + bool bValid = true; + SCCOL nCols = pQueryRef->getColSize(); + SCROW nRows = pQueryRef->getRowSize(); + vector<SCCOL> aFields(nCols); + SCCOL nCol = 0; + while (bValid && (nCol < nCols)) + { + OUString aQueryStr = pQueryRef->getString(nCol, 0); + SCCOL nField = pDBRef->findFieldColumn(aQueryStr); + if (ValidCol(nField)) + aFields[nCol] = nField; + else + bValid = false; + ++nCol; + } + + if (bValid) + { +// ULONG nVisible = 0; +// for ( nCol=nCol1; nCol<=nCol2; nCol++ ) +// nVisible += aCol[nCol].VisibleCount( nRow1+1, nRow2 ); + + // Count the number of visible cells (excluding the header row). Each + // visible cell corresponds with a single query. + SCSIZE nVisible = pQueryRef->getVisibleDataCellCount(); + if ( nVisible > SCSIZE_MAX / sizeof(void*) ) + { + DBG_ERROR("zu viele Filterkritierien"); + nVisible = 0; + } + + SCSIZE nNewEntries = nVisible; + pParam->Resize( nNewEntries ); + + SCSIZE nIndex = 0; + SCROW nRow = 1; + String aCellStr; + while (nRow < nRows) + { + nCol = 0; + while (nCol < nCols) + { + aCellStr = pQueryRef->getString(nCol, nRow); + ScGlobal::pCharClass->toUpper( aCellStr ); + if (aCellStr.Len() > 0) + { + if (nIndex < nNewEntries) + { + pParam->GetEntry(nIndex).nField = aFields[nCol]; + pParam->FillInExcelSyntax(aCellStr, nIndex); + nIndex++; + if (nIndex < nNewEntries) + pParam->GetEntry(nIndex).eConnect = SC_AND; + } + else + bValid = FALSE; + } + nCol++; + } + nRow++; + if (nIndex < nNewEntries) + pParam->GetEntry(nIndex).eConnect = SC_OR; + } + } + return bValid; +} + +bool lcl_fillQueryEntries( + ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef, const ScDBRangeBase* pQueryRef) +{ + SCSIZE nCount = pParam->GetEntryCount(); + for (SCSIZE i = 0; i < nCount; ++i) + pParam->GetEntry(i).Clear(); + + // Standard QueryTabelle + bool bValid = lcl_createStarQuery(pParam, pDBRef, pQueryRef); + // Excel QueryTabelle + if (!bValid) + bValid = lcl_createExcelQuery(pParam, pDBRef, pQueryRef); + + nCount = pParam->GetEntryCount(); + if (bValid) + { + // bQueryByString muss gesetzt sein + for (SCSIZE i = 0; i < nCount; ++i) + pParam->GetEntry(i).bQueryByString = true; + } + else + { + // nix + for (SCSIZE i = 0; i < nCount; ++i) + pParam->GetEntry(i).Clear(); + } + return bValid; +} + +} + +// ============================================================================ + +ScDBRangeBase::ScDBRangeBase(ScDocument* pDoc, RefType eType) : + mpDoc(pDoc), meType(eType) +{ +} + +ScDBRangeBase::~ScDBRangeBase() +{ +} + +ScDBRangeBase::RefType ScDBRangeBase::getType() const +{ + return meType; +} + +bool ScDBRangeBase::fillQueryEntries(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef) const +{ + if (!pDBRef) + return false; + + return lcl_fillQueryEntries(pParam, pDBRef, this); +} + +void ScDBRangeBase::fillQueryOptions(ScQueryParamBase* pParam) +{ + pParam->bHasHeader = true; + pParam->bByRow = true; + pParam->bInplace = true; + pParam->bCaseSens = false; + pParam->bRegExp = false; + pParam->bDuplicate = true; + pParam->bMixedComparison = false; +} + +ScDocument* ScDBRangeBase::getDoc() const +{ + return mpDoc; +} + +// ============================================================================ + +ScDBInternalRange::ScDBInternalRange(ScDocument* pDoc, const ScRange& rRange) : + ScDBRangeBase(pDoc, INTERNAL), maRange(rRange) +{ +} + +ScDBInternalRange::~ScDBInternalRange() +{ +} + +const ScRange& ScDBInternalRange::getRange() const +{ + return maRange; +} + +SCCOL ScDBInternalRange::getColSize() const +{ + return maRange.aEnd.Col() - maRange.aStart.Col() + 1; +} + +SCROW ScDBInternalRange::getRowSize() const +{ + return maRange.aEnd.Row() - maRange.aStart.Row() + 1; +} + +SCSIZE ScDBInternalRange::getVisibleDataCellCount() const +{ + SCCOL nCols = getColSize(); + SCROW nRows = getRowSize(); + if (nRows <= 1) + return 0; + + return (nRows-1)*nCols; +} + +OUString ScDBInternalRange::getString(SCCOL nCol, SCROW nRow) const +{ + String aStr; + const ScAddress& s = maRange.aStart; + getDoc()->GetString(s.Col() + nCol, s.Row() + nRow, maRange.aStart.Tab(), aStr); + return aStr; +} + +SCCOL ScDBInternalRange::getFirstFieldColumn() const +{ + return getRange().aStart.Col(); +} + +SCCOL ScDBInternalRange::findFieldColumn(SCCOL nIndex) const +{ + const ScRange& rRange = getRange(); + const ScAddress& s = rRange.aStart; + const ScAddress& e = rRange.aEnd; + + SCCOL nDBCol1 = s.Col(); + SCCOL nDBCol2 = e.Col(); + + if ( nIndex <= 0 || nIndex > (nDBCol2 - nDBCol1 + 1) ) + return nDBCol1; + + return Min(nDBCol2, static_cast<SCCOL>(nDBCol1 + nIndex - 1)); +} + +sal_uInt16 ScDBInternalRange::getCellString(OUString& rStr, ScBaseCell* pCell) const +{ + sal_uInt16 nErr = 0; + String aStr; + if (pCell) + { + SvNumberFormatter* pFormatter = getDoc()->GetFormatTable(); + switch (pCell->GetCellType()) + { + case CELLTYPE_STRING: + ((ScStringCell*) pCell)->GetString(aStr); + break; + case CELLTYPE_EDIT: + ((ScEditCell*) pCell)->GetString(aStr); + break; + case CELLTYPE_FORMULA: + { + ScFormulaCell* pFCell = (ScFormulaCell*) pCell; + nErr = pFCell->GetErrCode(); + if (pFCell->IsValue()) + { + double fVal = pFCell->GetValue(); + ULONG nIndex = pFormatter->GetStandardFormat( + NUMBERFORMAT_NUMBER, + ScGlobal::eLnge); + pFormatter->GetInputLineString(fVal, nIndex, aStr); + } + else + pFCell->GetString(aStr); + } + break; + case CELLTYPE_VALUE: + { + double fVal = ((ScValueCell*) pCell)->GetValue(); + ULONG nIndex = pFormatter->GetStandardFormat( + NUMBERFORMAT_NUMBER, + ScGlobal::eLnge); + pFormatter->GetInputLineString(fVal, nIndex, aStr); + } + break; + default: + ; + } + } + rStr = aStr; + return nErr; +} + +SCCOL ScDBInternalRange::findFieldColumn(const OUString& rStr, sal_uInt16* pErr) const +{ + const ScAddress& s = maRange.aStart; + const ScAddress& e = maRange.aEnd; + OUString aUpper = rStr; + lcl_toUpper(aUpper); + + SCCOL nDBCol1 = s.Col(); + SCROW nDBRow1 = s.Row(); + SCTAB nDBTab1 = s.Tab(); + SCCOL nDBCol2 = e.Col(); + + SCCOL nField = nDBCol1; + BOOL bFound = TRUE; + + bFound = FALSE; + OUString aCellStr; + ScAddress aLook( nDBCol1, nDBRow1, nDBTab1 ); + while (!bFound && (aLook.Col() <= nDBCol2)) + { + ScBaseCell* pCell = getDoc()->GetCell( aLook ); + sal_uInt16 nErr = getCellString( aCellStr, pCell ); + if (pErr) + *pErr = nErr; + lcl_toUpper(aCellStr); + bFound = ScGlobal::GetpTransliteration()->isEqual(aCellStr, aUpper); + if (!bFound) + aLook.IncCol(); + } + nField = aLook.Col(); + + return bFound ? nField : -1; +} + +ScDBQueryParamBase* ScDBInternalRange::createQueryParam(const ScDBRangeBase* pQueryRef) const +{ + auto_ptr<ScDBQueryParamInternal> pParam(new ScDBQueryParamInternal); + + // Set the database range first. + const ScAddress& s = maRange.aStart; + const ScAddress& e = maRange.aEnd; + pParam->nCol1 = s.Col(); + pParam->nRow1 = s.Row(); + pParam->nCol2 = e.Col(); + pParam->nRow2 = e.Row(); + pParam->nTab = s.Tab(); + + fillQueryOptions(pParam.get()); + + // Now construct the query entries from the query range. + if (!pQueryRef->fillQueryEntries(pParam.get(), this)) + return NULL; + + return pParam.release(); +} + +bool ScDBInternalRange::isRangeEqual(const ScRange& rRange) const +{ + return maRange == rRange; +} + +// ============================================================================ + +ScDBExternalRange::ScDBExternalRange(ScDocument* pDoc, const ScMatrixRef& pMat) : + ScDBRangeBase(pDoc, EXTERNAL), mpMatrix(pMat) +{ + SCSIZE nC, nR; + mpMatrix->GetDimensions(nC, nR); + mnCols = static_cast<SCCOL>(nC); + mnRows = static_cast<SCROW>(nR); +} + +ScDBExternalRange::~ScDBExternalRange() +{ +} + +SCCOL ScDBExternalRange::getColSize() const +{ + return mnCols; +} + +SCROW ScDBExternalRange::getRowSize() const +{ + return mnRows; +} + +SCSIZE ScDBExternalRange::getVisibleDataCellCount() const +{ + SCCOL nCols = getColSize(); + SCROW nRows = getRowSize(); + if (nRows <= 1) + return 0; + + return (nRows-1)*nCols; +} + +OUString ScDBExternalRange::getString(SCCOL nCol, SCROW nRow) const +{ + if (nCol >= mnCols || nRow >= mnRows) + return OUString(); + + return mpMatrix->GetString(nCol, nRow); +} + +SCCOL ScDBExternalRange::getFirstFieldColumn() const +{ + return 0; +} + +SCCOL ScDBExternalRange::findFieldColumn(SCCOL nIndex) const +{ + if (nIndex < 1) + // 1st field + return 0; + + if (nIndex > mnCols) + // last field + return mnCols - 1; + + return nIndex - 1; +} + +SCCOL ScDBExternalRange::findFieldColumn(const OUString& rStr, sal_uInt16* pErr) const +{ + if (pErr) + pErr = 0; + + OUString aUpper = rStr; + lcl_toUpper(aUpper); + for (SCCOL i = 0; i < mnCols; ++i) + { + OUString aUpperVal = mpMatrix->GetString(i, 0); + lcl_toUpper(aUpperVal); + if (aUpper.equals(aUpperVal)) + return i; + } + return -1; +} + +ScDBQueryParamBase* ScDBExternalRange::createQueryParam(const ScDBRangeBase* pQueryRef) const +{ + auto_ptr<ScDBQueryParamMatrix> pParam(new ScDBQueryParamMatrix); + pParam->mpMatrix = mpMatrix; + fillQueryOptions(pParam.get()); + + // Now construct the query entries from the query range. + if (!pQueryRef->fillQueryEntries(pParam.get(), this)) + return NULL; + + return pParam.release(); +} + +bool ScDBExternalRange::isRangeEqual(const ScRange& /*rRange*/) const +{ + return false; +} + diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx index 30cabe5cc..66a275de8 100644 --- a/sc/source/core/tool/editutil.cxx +++ b/sc/source/core/tool/editutil.cxx @@ -35,15 +35,15 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svx/algitem.hxx> #include <svtools/colorcfg.hxx> -#include <svx/editview.hxx> -#include <svx/editstat.hxx> -#include <svx/escpitem.hxx> -#include <svx/flditem.hxx> -#include <svx/numitem.hxx> +#include <editeng/editview.hxx> +#include <editeng/editstat.hxx> +#include <editeng/escpitem.hxx> +#include <editeng/flditem.hxx> +#include <editeng/numitem.hxx> #include <vcl/svapp.hxx> #include <vcl/outdev.hxx> #include <svl/inethist.hxx> diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 726efb977..081253668 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -31,7 +31,7 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/langitem.hxx> +#include <editeng/langitem.hxx> #include <svx/algitem.hxx> #include <unotools/textsearch.hxx> #include <svl/zforlist.hxx> @@ -65,11 +65,14 @@ #include <string.h> #include <math.h> #include <vector> +#include <memory> #include "cellkeytranslator.hxx" #include "lookupcache.hxx" #include "rangenam.hxx" #include "compiler.hxx" #include "externalrefmgr.hxx" +#include "doubleref.hxx" +#include "queryparam.hxx" #define SC_DOUBLE_MAXVALUE 1.7e307 @@ -80,6 +83,8 @@ ScTokenStack* ScInterpreter::pGlobalStack = NULL; BOOL ScInterpreter::bGlobalStackInUse = FALSE; using namespace formula; +using ::std::auto_ptr; + //----------------------------------------------------------------------------- // Funktionen //----------------------------------------------------------------------------- @@ -5825,11 +5830,9 @@ void ScInterpreter::ScSubTotal() #endif -BOOL ScInterpreter::GetDBParams(SCTAB& rTab, ScQueryParam& rParam, - BOOL& rMissingField ) +ScDBQueryParamBase* ScInterpreter::GetDBParams( BOOL& rMissingField ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::GetDBParams" ); - BOOL bRet = FALSE; BOOL bAllowMissingField = FALSE; if ( rMissingField ) { @@ -5838,14 +5841,10 @@ BOOL ScInterpreter::GetDBParams(SCTAB& rTab, ScQueryParam& rParam, } if ( GetByte() == 3 ) { - - SCCOL nQCol1; - SCROW nQRow1; - SCTAB nQTab1; - SCCOL nQCol2; - SCROW nQRow2; - SCTAB nQTab2; - PopDoubleRef(nQCol1, nQRow1, nQTab1, nQCol2, nQRow2, nQTab2); + // First, get the query criteria range. + ::std::auto_ptr<ScDBRangeBase> pQueryRef( PopDoubleRef() ); + if (!pQueryRef.get()) + return NULL; BOOL bByVal = TRUE; double nVal = 0.0; @@ -5901,116 +5900,85 @@ BOOL ScInterpreter::GetDBParams(SCTAB& rTab, ScQueryParam& rParam, SetError( errIllegalParameter ); } - SCCOL nDBCol1; - SCROW nDBRow1; - SCTAB nDBTab1; - SCCOL nDBCol2; - SCROW nDBRow2; - SCTAB nDBTab2; - PopDoubleRef(nDBCol1, nDBRow1, nDBTab1, nDBCol2, nDBRow2, nDBTab2); + auto_ptr<ScDBRangeBase> pDBRef( PopDoubleRef() ); - if ( nGlobalError == 0 && bRangeFake ) + if (nGlobalError || !pDBRef.get()) + return NULL; + + if ( bRangeFake ) { // range parameter must match entire database range - if ( aMissingRange == ScRange( nDBCol1, nDBRow1, nDBTab1, nDBCol2, - nDBRow2, nDBTab2) ) + if (pDBRef->isRangeEqual(aMissingRange)) rMissingField = TRUE; else SetError( errIllegalParameter ); } - if (nGlobalError == 0) + if (nGlobalError) + return NULL; + + SCCOL nField = pDBRef->getFirstFieldColumn(); + if (rMissingField) + ; // special case + else if (bByVal) + nField = pDBRef->findFieldColumn(static_cast<SCCOL>(nVal)); + else + { + sal_uInt16 nErr = 0; + nField = pDBRef->findFieldColumn(aStr, &nErr); + SetError(nErr); + } + + if (!ValidCol(nField)) + return NULL; + + auto_ptr<ScDBQueryParamBase> pParam( pDBRef->createQueryParam(pQueryRef.get()) ); + + if (pParam.get()) { - SCCOL nField = nDBCol1; - BOOL bFound = TRUE; + // An allowed missing field parameter sets the result field + // to any of the query fields, just to be able to return + // some cell from the iterator. if ( rMissingField ) - ; // special case - else if ( bByVal ) - { - if ( nVal <= 0 || nVal > (nDBCol2 - nDBCol1 + 1) ) - bFound = FALSE; - else - nField = Min(nDBCol2, (SCCOL)(nDBCol1 + (SCCOL)nVal - 1)); - } - else + nField = static_cast<SCCOL>(pParam->GetEntry(0).nField); + pParam->mnField = nField; + + SCSIZE nCount = pParam->GetEntryCount(); + for ( SCSIZE i=0; i < nCount; i++ ) { - bFound = FALSE; - String aCellStr; - ScAddress aLook( nDBCol1, nDBRow1, nDBTab1 ); - while (!bFound && (aLook.Col() <= nDBCol2)) - { - ScBaseCell* pCell = GetCell( aLook ); - GetCellString( aCellStr, pCell ); - bFound = ScGlobal::GetpTransliteration()->isEqual( aCellStr, aStr ); - if (!bFound) - aLook.IncCol(); - } - nField = aLook.Col(); - } - if (bFound) - { - rParam.nCol1 = nDBCol1; - rParam.nRow1 = nDBRow1; - rParam.nCol2 = nDBCol2; - rParam.nRow2 = nDBRow2; - rParam.nTab = nDBTab1; - rParam.bHasHeader = TRUE; - rParam.bByRow = TRUE; - rParam.bInplace = TRUE; - rParam.bCaseSens = FALSE; - rParam.bRegExp = FALSE; - rParam.bDuplicate = TRUE; - if (pDok->CreateQueryParam(nQCol1, nQRow1, nQCol2, nQRow2, nQTab1, rParam)) - { - // An allowed missing field parameter sets the result field - // to any of the query fields, just to be able to return - // some cell from the iterator. - if ( rMissingField ) - nField = static_cast<SCCOL>(rParam.GetEntry(0).nField); - - rParam.nCol1 = nField; - rParam.nCol2 = nField; - rTab = nDBTab1; - bRet = TRUE; - SCSIZE nCount = rParam.GetEntryCount(); - for ( SCSIZE i=0; i < nCount; i++ ) - { - ScQueryEntry& rEntry = rParam.GetEntry(i); - if ( rEntry.bDoQuery ) - { - sal_uInt32 nIndex = 0; - rEntry.bQueryByString = !pFormatter->IsNumberFormat( - *rEntry.pStr, nIndex, rEntry.nVal ); - if ( rEntry.bQueryByString && !rParam.bRegExp ) - rParam.bRegExp = MayBeRegExp( *rEntry.pStr, pDok ); - } - else - break; // for - } + ScQueryEntry& rEntry = pParam->GetEntry(i); + if ( rEntry.bDoQuery ) + { + sal_uInt32 nIndex = 0; + rEntry.bQueryByString = !pFormatter->IsNumberFormat( + *rEntry.pStr, nIndex, rEntry.nVal ); + if ( rEntry.bQueryByString && !pParam->bRegExp ) + pParam->bRegExp = MayBeRegExp( *rEntry.pStr, pDok ); } + else + break; // for } + return pParam.release(); } } - return bRet; + return false; } void ScInterpreter::DBIterator( ScIterFunc eFunc ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::DBIterator" ); - SCTAB nTab1; double nErg = 0.0; double fMem = 0.0; BOOL bNull = TRUE; ULONG nCount = 0; - ScQueryParam aQueryParam; BOOL bMissingField = FALSE; - if ( GetDBParams( nTab1, aQueryParam, bMissingField) ) + auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) ); + if (pQueryParam.get()) { - double nVal; - USHORT nErr; - ScQueryValueIterator aValIter(pDok, nTab1, aQueryParam); - if ( aValIter.GetFirst(nVal, nErr) && !nErr ) + ScDBQueryDataIterator aValIter(pDok, pQueryParam.release()); + ScDBQueryDataIterator::Value aValue; + if ( aValIter.GetFirst(aValue) && !aValue.mnError ) { switch( eFunc ) { @@ -6026,24 +5994,24 @@ void ScInterpreter::DBIterator( ScIterFunc eFunc ) { case ifAVERAGE: case ifSUM: - if ( bNull && nVal != 0.0 ) + if ( bNull && aValue.mfValue != 0.0 ) { bNull = FALSE; - fMem = nVal; + fMem = aValue.mfValue; } else - nErg += nVal; + nErg += aValue.mfValue; break; - case ifSUMSQ: nErg += nVal * nVal; break; - case ifPRODUCT: nErg *= nVal; break; - case ifMAX: if( nVal > nErg ) nErg = nVal; break; - case ifMIN: if( nVal < nErg ) nErg = nVal; break; + case ifSUMSQ: nErg += aValue.mfValue * aValue.mfValue; break; + case ifPRODUCT: nErg *= aValue.mfValue; break; + case ifMAX: if( aValue.mfValue > nErg ) nErg = aValue.mfValue; break; + case ifMIN: if( aValue.mfValue < nErg ) nErg = aValue.mfValue; break; default: ; // nothing } } - while ( aValIter.GetNext(nVal, nErr) && !nErr ); + while ( aValIter.GetNext(aValue) && !aValue.mnError ); } - SetError(nErr); + SetError(aValue.mnError); } else SetError( errIllegalParameter); @@ -6068,13 +6036,12 @@ void ScInterpreter::ScDBSum() void ScInterpreter::ScDBCount() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBCount" ); - SCTAB nTab; - ScQueryParam aQueryParam; BOOL bMissingField = TRUE; - if ( GetDBParams( nTab, aQueryParam, bMissingField) ) + auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) ); + if (pQueryParam.get()) { ULONG nCount = 0; - if ( bMissingField ) + if ( bMissingField && pQueryParam->GetType() == ScDBQueryParamBase::INTERNAL ) { // count all matching records // TODO: currently the QueryIterators only return cell pointers of // existing cells, so if a query matches an empty cell there's @@ -6084,7 +6051,9 @@ void ScInterpreter::ScDBCount() // have to live with it until we reimplement the iterators to also // return empty cells, which would mean to adapt all callers of // iterators. - ScQueryCellIterator aCellIter( pDok, nTab, aQueryParam); + ScDBQueryParamInternal* p = static_cast<ScDBQueryParamInternal*>(pQueryParam.get()); + SCTAB nTab = p->nTab; + ScQueryCellIterator aCellIter( pDok, nTab, *p); if ( aCellIter.GetFirst() ) { do @@ -6095,17 +6064,17 @@ void ScInterpreter::ScDBCount() } else { // count only matching records with a value in the "result" field - double nVal; - USHORT nErr = 0; - ScQueryValueIterator aValIter( pDok, nTab, aQueryParam); - if ( aValIter.GetFirst( nVal, nErr) && !nErr ) + ScDBQueryDataIterator aValIter( pDok, pQueryParam.release()); + ScDBQueryDataIterator::Value aValue; + if ( aValIter.GetFirst(aValue) && !aValue.mnError ) { do { nCount++; - } while ( aValIter.GetNext( nVal, nErr) && !nErr ); + } + while ( aValIter.GetNext(aValue) && !aValue.mnError ); } - SetError( nErr ); + SetError(aValue.mnError); } PushDouble( nCount ); } @@ -6117,21 +6086,24 @@ void ScInterpreter::ScDBCount() void ScInterpreter::ScDBCount2() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBCount2" ); - SCTAB nTab; - ScQueryParam aQueryParam; BOOL bMissingField = TRUE; - if (GetDBParams( nTab, aQueryParam, bMissingField)) + auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) ); + if (pQueryParam.get()) { ULONG nCount = 0; - ScQueryCellIterator aCellIter(pDok, nTab, aQueryParam); - if ( aCellIter.GetFirst() ) + pQueryParam->mbSkipString = false; + ScDBQueryDataIterator aValIter( pDok, pQueryParam.release()); + ScDBQueryDataIterator::Value aValue; + if ( aValIter.GetFirst(aValue) && !aValue.mnError ) { do { nCount++; - } while ( aCellIter.GetNext() ); + } + while ( aValIter.GetNext(aValue) && !aValue.mnError ); } - PushDouble(nCount); + SetError(aValue.mnError); + PushDouble( nCount ); } else PushIllegalParameter(); @@ -6175,25 +6147,23 @@ void ScInterpreter::GetDBStVarParams( double& rVal, double& rValCount ) rValCount = 0.0; double fSum = 0.0; - SCTAB nTab; - ScQueryParam aQueryParam; BOOL bMissingField = FALSE; - if (GetDBParams( nTab, aQueryParam, bMissingField)) + auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) ); + if (pQueryParam.get()) { - double fVal; - USHORT nErr; - ScQueryValueIterator aValIter(pDok, nTab, aQueryParam); - if (aValIter.GetFirst(fVal, nErr) && !nErr) + ScDBQueryDataIterator aValIter(pDok, pQueryParam.release()); + ScDBQueryDataIterator::Value aValue; + if (aValIter.GetFirst(aValue) && !aValue.mnError) { do { rValCount++; - values.push_back(fVal); - fSum += fVal; + values.push_back(aValue.mfValue); + fSum += aValue.mfValue; } - while ((nErr == 0) && aValIter.GetNext(fVal, nErr)); + while ((aValue.mnError == 0) && aValIter.GetNext(aValue)); } - SetError(nErr); + SetError(aValue.mnError); } else SetError( errIllegalParameter); diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index 5d751888e..09b6408fa 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -30,7 +30,7 @@ // INCLUDE --------------------------------------------------------------- -#include <svx/linkmgr.hxx> +#include <sfx2/linkmgr.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/objsh.hxx> #include <svl/stritem.hxx> @@ -2099,7 +2099,7 @@ void ScInterpreter::ScStyle() PushIllegalParameter(); } -ScDdeLink* lcl_GetDdeLink( SvxLinkManager* pLinkMgr, +ScDdeLink* lcl_GetDdeLink( sfx2::LinkManager* pLinkMgr, const String& rA, const String& rT, const String& rI, BYTE nM ) { USHORT nCount = pLinkMgr->GetLinks().Count(); @@ -2142,7 +2142,7 @@ void ScInterpreter::ScDde() // temporary documents (ScFunctionAccess) have no DocShell // and no LinkManager -> abort - SvxLinkManager* pLinkMgr = pDok->GetLinkManager(); + sfx2::LinkManager* pLinkMgr = pDok->GetLinkManager(); if (!pLinkMgr) { PushNoValue(); diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index f4ceebd10..f1744e44a 100644..100755 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -65,15 +65,18 @@ #include "jumpmatrix.hxx" #include "parclass.hxx" #include "externalrefmgr.hxx" +#include "doubleref.hxx" #include <math.h> #include <float.h> #include <map> #include <algorithm> #include <functional> +#include <memory> using namespace com::sun::star; using namespace formula; +using ::std::auto_ptr; #define ADDIN_MAXSTRLEN 256 @@ -1219,6 +1222,42 @@ void ScInterpreter::DoubleRefToVars( const ScToken* p, } } +ScDBRangeBase* ScInterpreter::PopDoubleRef() +{ + if (!sp) + { + SetError(errUnknownStackVariable); + return NULL; + } + + --sp; + FormulaToken* p = pStack[sp]; + switch (p->GetType()) + { + case svError: + nGlobalError = p->GetError(); + break; + case svDoubleRef: + { + SCCOL nCol1, nCol2; + SCROW nRow1, nRow2; + SCTAB nTab1, nTab2; + DoubleRefToVars(static_cast<ScToken*>(p), + nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, false); + + return new ScDBInternalRange(pDok, + ScRange(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2)); + } + case svMatrix: + { + ScMatrixRef pMat = static_cast<ScToken*>(p)->GetMatrix(); + return new ScDBExternalRange(pDok, pMat); + } + default: + SetError( errIllegalParameter); + } + return NULL; +} void ScInterpreter::PopDoubleRef(SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1, SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2, @@ -2052,78 +2091,37 @@ ScMatValType ScInterpreter::GetDoubleOrStringFromMatrix( double& rDouble, void ScInterpreter::ScDBGet() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScDBGet" ); - SCTAB nTab; - ScQueryParam aQueryParam; BOOL bMissingField = FALSE; - if (GetDBParams( nTab, aQueryParam, bMissingField)) + auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) ); + if (!pQueryParam.get()) { - ScBaseCell* pCell; - ScQueryCellIterator aCellIter(pDok, nTab, aQueryParam); - if ( (pCell = aCellIter.GetFirst()) != NULL ) - { - if (aCellIter.GetNext()) - PushIllegalArgument(); - else - { - switch (pCell->GetCellType()) - { - case CELLTYPE_VALUE: - { - double rValue = ((ScValueCell*)pCell)->GetValue(); - if ( bCalcAsShown ) - { - ULONG nFormat; - nFormat = aCellIter.GetNumberFormat(); - rValue = pDok->RoundValueAsShown( rValue, nFormat ); - } - PushDouble(rValue); - } - break; - case CELLTYPE_STRING: - { - String rString; - ((ScStringCell*)pCell)->GetString(rString); - PushString(rString); - } - break; - case CELLTYPE_EDIT: - { - String rString; - ((ScEditCell*)pCell)->GetString(rString); - PushString(rString); - } - break; - case CELLTYPE_FORMULA: - { - USHORT rErr = ((ScFormulaCell*)pCell)->GetErrCode(); - if (rErr) - PushError(rErr); - else if (((ScFormulaCell*)pCell)->IsValue()) - { - double rValue = ((ScFormulaCell*)pCell)->GetValue(); - PushDouble(rValue); - } - else - { - String rString; - ((ScFormulaCell*)pCell)->GetString(rString); - PushString(rString); - } - } - break; - case CELLTYPE_NONE: - case CELLTYPE_NOTE: - default: - PushIllegalArgument(); - break; - } - } - } - else - PushNoValue(); + // Failed to create query param. + PushIllegalParameter(); + return; } + + pQueryParam->mbSkipString = false; + ScDBQueryDataIterator aValIter(pDok, pQueryParam.release()); + ScDBQueryDataIterator::Value aValue; + if (!aValIter.GetFirst(aValue) || aValue.mnError) + { + // No match found. + PushNoValue(); + return; + } + + ScDBQueryDataIterator::Value aValNext; + if (aValIter.GetNext(aValNext) && !aValNext.mnError) + { + // There should be only one unique match. + PushIllegalArgument(); + return; + } + + if (aValue.mbIsNumber) + PushDouble(aValue.mfValue); else - PushIllegalParameter(); + PushString(aValue.maString); } @@ -3333,7 +3331,7 @@ void ScInterpreter::ScSpewFunc() #include "sctictac.hxx" #include "scmod.hxx" -extern "C" { static void SAL_CALL thisModule() {} } +//extern "C" { static void SAL_CALL thisModule() {} } void ScInterpreter::ScGame() { @@ -3488,19 +3486,6 @@ int main() SetError( errIllegalParameter ); } break; - case SC_GAME_STARWARS : - { - oslModule m_tfu = osl_loadModuleRelative(&thisModule, rtl::OUString::createFromAscii( SVLIBRARY( "tfu" ) ).pData, SAL_LOADMODULE_NOW); - typedef void StartInvader_Type (Window*, ResMgr*); - - StartInvader_Type *StartInvader = (StartInvader_Type *) osl_getFunctionSymbol( m_tfu, rtl::OUString::createFromAscii("StartInvader").pData ); - if ( StartInvader ) - StartInvader( Application::GetDefDialogParent(), ResMgr::CreateResMgr( "tfu" )); - } - break; - case SC_GAME_FROGGER : - //Game(); - break; default: { // added to avoid warnings diff --git a/sc/source/core/tool/makefile.mk b/sc/source/core/tool/makefile.mk index 7ea0ef0b7..0bc433a7b 100644 --- a/sc/source/core/tool/makefile.mk +++ b/sc/source/core/tool/makefile.mk @@ -72,6 +72,7 @@ SLOFILES = \ $(SLO)$/detdata.obj \ $(SLO)$/detfunc.obj \ $(SLO)$/docoptio.obj \ + $(SLO)$/doubleref.obj \ $(SLO)$/editutil.obj \ $(SLO)$/filtopt.obj \ $(SLO)$/formulaparserpool.obj \ @@ -91,6 +92,7 @@ SLOFILES = \ $(SLO)$/printopt.obj \ $(SLO)$/prnsave.obj \ $(SLO)$/progress.obj \ + $(SLO)$/queryparam.obj \ $(SLO)$/rangelst.obj \ $(SLO)$/rangenam.obj \ $(SLO)$/rangeseq.obj \ @@ -118,6 +120,7 @@ EXCEPTIONSFILES= \ $(SLO)$/chartlock.obj \ $(SLO)$/chgtrack.obj \ $(SLO)$/compiler.obj \ + $(SLO)$/doubleref.obj \ $(SLO)$/formulaparserpool.obj \ $(SLO)$/interpr1.obj \ $(SLO)$/interpr2.obj \ @@ -126,6 +129,7 @@ EXCEPTIONSFILES= \ $(SLO)$/interpr5.obj \ $(SLO)$/lookupcache.obj \ $(SLO)$/prnsave.obj \ + $(SLO)$/queryparam.obj \ $(SLO)$/reftokenhelper.obj \ $(SLO)$/token.obj diff --git a/sc/source/core/tool/queryparam.cxx b/sc/source/core/tool/queryparam.cxx new file mode 100644 index 000000000..b97558df1 --- /dev/null +++ b/sc/source/core/tool/queryparam.cxx @@ -0,0 +1,365 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: interpr4.cxx,v $ + * $Revision: 1.57.92.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_sc.hxx" + +// INCLUDE --------------------------------------------------------------- + +#include "queryparam.hxx" + +using ::std::vector; + +// ============================================================================ + +ScQueryParamBase::ScQueryParamBase() +{ + Resize( MAXQUERY ); + for (USHORT i=0; i<MAXQUERY; i++) + maEntries[i].Clear(); +} + +ScQueryParamBase::ScQueryParamBase(const ScQueryParamBase& r) : + bHasHeader(r.bHasHeader), bByRow(r.bByRow), bInplace(r.bInplace), bCaseSens(r.bCaseSens), + bRegExp(r.bRegExp), bDuplicate(r.bDuplicate), bMixedComparison(r.bMixedComparison), + maEntries(r.maEntries) +{ +} + +ScQueryParamBase::~ScQueryParamBase() +{ +} + +SCSIZE ScQueryParamBase::GetEntryCount() const +{ + return maEntries.size(); +} + +ScQueryEntry& ScQueryParamBase::GetEntry(SCSIZE n) const +{ + return maEntries[n]; +} + +void ScQueryParamBase::Resize(SCSIZE nNew) +{ + if ( nNew < MAXQUERY ) + nNew = MAXQUERY; // nie weniger als MAXQUERY + + vector<ScQueryEntry> aNewEntries(nNew); + SCSIZE nCopy = ::std::min(maEntries.size(), nNew); + for (SCSIZE i=0; i<nCopy; i++) + aNewEntries[i] = maEntries[i]; + + maEntries.swap(aNewEntries); +} + +void ScQueryParamBase::DeleteQuery( SCSIZE nPos ) +{ + if (nPos >= maEntries.size()) + return; + + size_t n = maEntries.size(); + vector<ScQueryEntry> aNewEntries; + aNewEntries.reserve(n); + for (size_t i = 0; i < n; ++i) + if (i != nPos) + aNewEntries.push_back(maEntries[i]); + + // Don't forget to append an empty entry to make up for the removed one. + // The size of the entries is not supposed to change. + aNewEntries.push_back(ScQueryEntry()); + + maEntries.swap(aNewEntries); +} + +void ScQueryParamBase::FillInExcelSyntax(String& aCellStr, SCSIZE nIndex) +{ + if (aCellStr.Len() > 0) + { + if ( nIndex >= maEntries.size() ) + Resize( nIndex+1 ); + + ScQueryEntry& rEntry = GetEntry(nIndex); + + rEntry.bDoQuery = TRUE; + // Operatoren herausfiltern + if (aCellStr.GetChar(0) == '<') + { + if (aCellStr.GetChar(1) == '>') + { + *rEntry.pStr = aCellStr.Copy(2); + rEntry.eOp = SC_NOT_EQUAL; + } + else if (aCellStr.GetChar(1) == '=') + { + *rEntry.pStr = aCellStr.Copy(2); + rEntry.eOp = SC_LESS_EQUAL; + } + else + { + *rEntry.pStr = aCellStr.Copy(1); + rEntry.eOp = SC_LESS; + } + } + else if (aCellStr.GetChar(0) == '>') + { + if (aCellStr.GetChar(1) == '=') + { + *rEntry.pStr = aCellStr.Copy(2); + rEntry.eOp = SC_GREATER_EQUAL; + } + else + { + *rEntry.pStr = aCellStr.Copy(1); + rEntry.eOp = SC_GREATER; + } + } + else + { + if (aCellStr.GetChar(0) == '=') + *rEntry.pStr = aCellStr.Copy(1); + else + *rEntry.pStr = aCellStr; + rEntry.eOp = SC_EQUAL; + } + } +} + +// ============================================================================ + +ScQueryParamTable::ScQueryParamTable() +{ +} + +ScQueryParamTable::ScQueryParamTable(const ScQueryParamTable& r) : + nCol1(r.nCol1),nRow1(r.nRow1),nCol2(r.nCol2),nRow2(r.nRow2),nTab(r.nTab) +{ +} + +ScQueryParamTable::~ScQueryParamTable() +{ +} + +// ============================================================================ + +ScQueryParam::ScQueryParam() : + ScQueryParamBase(), + ScQueryParamTable() +{ + Clear(); +} + +//------------------------------------------------------------------------ + +ScQueryParam::ScQueryParam( const ScQueryParam& r ) : + ScQueryParamBase(r), + ScQueryParamTable(r), + bDestPers(r.bDestPers), nDestTab(r.nDestTab), nDestCol(r.nDestCol), nDestRow(r.nDestRow) +{ +} + +ScQueryParam::ScQueryParam( const ScDBQueryParamInternal& r ) : + ScQueryParamBase(r), + ScQueryParamTable(r), + bDestPers(true), + nDestTab(0), + nDestCol(0), + nDestRow(0) +{ +} + + +//------------------------------------------------------------------------ + +ScQueryParam::~ScQueryParam() +{ +} + +//------------------------------------------------------------------------ + +void ScQueryParam::Clear() +{ + nCol1=nCol2 = 0; + nRow1=nRow2 = 0; + nTab = SCTAB_MAX; + bHasHeader = bCaseSens = bRegExp = bMixedComparison = FALSE; + bInplace = bByRow = bDuplicate = TRUE; + + Resize( MAXQUERY ); + for (USHORT i=0; i<MAXQUERY; i++) + maEntries[i].Clear(); + + ClearDestParams(); +} + +void ScQueryParam::ClearDestParams() +{ + bDestPers = true; + nDestTab = 0; + nDestCol = 0; + nDestRow = 0; +} + +//------------------------------------------------------------------------ + +ScQueryParam& ScQueryParam::operator=( const ScQueryParam& r ) +{ + nCol1 = r.nCol1; + nRow1 = r.nRow1; + nCol2 = r.nCol2; + nRow2 = r.nRow2; + nTab = r.nTab; + nDestTab = r.nDestTab; + nDestCol = r.nDestCol; + nDestRow = r.nDestRow; + bHasHeader = r.bHasHeader; + bInplace = r.bInplace; + bCaseSens = r.bCaseSens; + bRegExp = r.bRegExp; + bMixedComparison = r.bMixedComparison; + bDuplicate = r.bDuplicate; + bByRow = r.bByRow; + bDestPers = r.bDestPers; + + maEntries = r.maEntries; + + return *this; +} + +//------------------------------------------------------------------------ + +BOOL ScQueryParam::operator==( const ScQueryParam& rOther ) const +{ + BOOL bEqual = FALSE; + + // Anzahl der Queries gleich? + SCSIZE nUsed = 0; + SCSIZE nOtherUsed = 0; + SCSIZE nEntryCount = GetEntryCount(); + SCSIZE nOtherEntryCount = rOther.GetEntryCount(); + + while ( nUsed<nEntryCount && maEntries[nUsed].bDoQuery ) ++nUsed; + while ( nOtherUsed<nOtherEntryCount && rOther.maEntries[nOtherUsed].bDoQuery ) + ++nOtherUsed; + + if ( (nUsed == nOtherUsed) + && (nCol1 == rOther.nCol1) + && (nRow1 == rOther.nRow1) + && (nCol2 == rOther.nCol2) + && (nRow2 == rOther.nRow2) + && (nTab == rOther.nTab) + && (bHasHeader == rOther.bHasHeader) + && (bByRow == rOther.bByRow) + && (bInplace == rOther.bInplace) + && (bCaseSens == rOther.bCaseSens) + && (bRegExp == rOther.bRegExp) + && (bMixedComparison == rOther.bMixedComparison) + && (bDuplicate == rOther.bDuplicate) + && (bDestPers == rOther.bDestPers) + && (nDestTab == rOther.nDestTab) + && (nDestCol == rOther.nDestCol) + && (nDestRow == rOther.nDestRow) ) + { + bEqual = TRUE; + for ( SCSIZE i=0; i<nUsed && bEqual; i++ ) + bEqual = maEntries[i] == rOther.maEntries[i]; + } + return bEqual; +} + +//------------------------------------------------------------------------ + +void ScQueryParam::MoveToDest() +{ + if (!bInplace) + { + SCsCOL nDifX = ((SCsCOL) nDestCol) - ((SCsCOL) nCol1); + SCsROW nDifY = ((SCsROW) nDestRow) - ((SCsROW) nRow1); + SCsTAB nDifZ = ((SCsTAB) nDestTab) - ((SCsTAB) nTab); + + nCol1 = sal::static_int_cast<SCCOL>( nCol1 + nDifX ); + nRow1 = sal::static_int_cast<SCROW>( nRow1 + nDifY ); + nCol2 = sal::static_int_cast<SCCOL>( nCol2 + nDifX ); + nRow2 = sal::static_int_cast<SCROW>( nRow2 + nDifY ); + nTab = sal::static_int_cast<SCTAB>( nTab + nDifZ ); + size_t n = maEntries.size(); + for (size_t i=0; i<n; i++) + maEntries[i].nField += nDifX; + + bInplace = TRUE; + } + else + { + DBG_ERROR("MoveToDest, bInplace == TRUE"); + } +} + +// ============================================================================ + +ScDBQueryParamBase::ScDBQueryParamBase(DataType eType) : + ScQueryParamBase(), + mnField(-1), + mbSkipString(true), + meType(eType) +{ +} + +ScDBQueryParamBase::~ScDBQueryParamBase() +{ +} + +ScDBQueryParamBase::DataType ScDBQueryParamBase::GetType() const +{ + return meType; +} + +// ============================================================================ + +ScDBQueryParamInternal::ScDBQueryParamInternal() : + ScDBQueryParamBase(ScDBQueryParamBase::INTERNAL), + ScQueryParamTable() +{ +} + +ScDBQueryParamInternal::~ScDBQueryParamInternal() +{ +} + +// ============================================================================ + +ScDBQueryParamMatrix::ScDBQueryParamMatrix() : + ScDBQueryParamBase(ScDBQueryParamBase::MATRIX) +{ +} + +ScDBQueryParamMatrix::~ScDBQueryParamMatrix() +{ +} + diff --git a/sc/source/filter/excel/colrowst.cxx b/sc/source/filter/excel/colrowst.cxx index 1d4812ba5..fb1caaf92 100644 --- a/sc/source/filter/excel/colrowst.cxx +++ b/sc/source/filter/excel/colrowst.cxx @@ -40,6 +40,7 @@ #include "xltable.hxx" #include "xistream.hxx" #include "xistyle.hxx" +#include "queryparam.hxx" // for filter manager #include "excimp8.hxx" diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx index bc21f6b1c..e03c6bec9 100644 --- a/sc/source/filter/excel/excdoc.cxx +++ b/sc/source/filter/excel/excdoc.cxx @@ -37,8 +37,8 @@ #include <svx/svdobj.hxx> #include <svx/svditer.hxx> #include <svx/svdpage.hxx> -#include <svx/lrspitem.hxx> -#include <svx/ulspitem.hxx> +#include <editeng/lrspitem.hxx> +#include <editeng/ulspitem.hxx> #include <svl/intitem.hxx> #include <svl/zformat.hxx> #include <sot/storage.hxx> @@ -232,7 +232,7 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList ) Add( new XclExpFilePass( GetRoot() ) ); Add( new XclExpInterfaceHdr( nCodePage ) ); Add( new XclExpUInt16Record( EXC_ID_MMS, 0 ) ); - Add( new XclExpEmptyRecord( EXC_ID_INTERFACEEND ) ); + Add( new XclExpInterfaceEnd ); Add( new XclExpWriteAccess ); } diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx index 35e91f67f..fb9b859d3 100644 --- a/sc/source/filter/excel/excimp8.cxx +++ b/sc/source/filter/excel/excimp8.cxx @@ -37,21 +37,21 @@ #include <svtools/wmf.hxx> -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <sfx2/docfile.hxx> #include <sfx2/objsh.hxx> -#include <svx/brshitem.hxx> -#include <svx/editdata.hxx> -#include <svx/editeng.hxx> -#include <svx/editobj.hxx> -#include <svx/editstat.hxx> -#include <svx/colritem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/wghtitem.hxx> -#include <svx/postitem.hxx> -#include <svx/crsditem.hxx> -#include <svx/flditem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/editdata.hxx> +#include <editeng/editeng.hxx> +#include <editeng/editobj.hxx> +#include <editeng/editstat.hxx> +#include <editeng/colritem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/wghtitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/crsditem.hxx> +#include <editeng/flditem.hxx> #include <svx/xflclit.hxx> #include <filter/msfilter/svxmsbas.hxx> @@ -114,7 +114,7 @@ using namespace com::sun::star; ImportExcel8::ImportExcel8( XclImpRootData& rImpData, SvStream& rStrm ) : - ImportExcel( rImpData, rStrm ) + ImportExcel( rImpData, rStrm ), mnTab(0) { delete pFormConv; @@ -237,9 +237,15 @@ void ImportExcel8::Codename( BOOL bWorkbookGlobals ) if( aName.Len() ) { if( bWorkbookGlobals ) + { GetExtDocOptions().GetDocSettings().maGlobCodeName = aName; + GetDoc().SetCodeName( aName ); + } else + { GetExtDocOptions().AppendCodeName( aName ); + GetDoc().SetCodeName( mnTab++, aName ); + } } } } diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx index 770722aae..e3cb29eea 100644 --- a/sc/source/filter/excel/excrecds.cxx +++ b/sc/source/filter/excel/excrecds.cxx @@ -38,27 +38,27 @@ #include <filter/msfilter/countryid.hxx> #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <sfx2/objsh.hxx> -#include <svx/editdata.hxx> -#include <svx/editeng.hxx> -#include <svx/editobj.hxx> -#include <svx/editstat.hxx> +#include <editeng/editdata.hxx> +#include <editeng/editeng.hxx> +#include <editeng/editobj.hxx> +#include <editeng/editstat.hxx> -#include <svx/flditem.hxx> -#include <svx/flstitem.hxx> +#include <editeng/flditem.hxx> +#include <editeng/flstitem.hxx> #include <svx/algitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/brshitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/brshitem.hxx> #include <svx/pageitem.hxx> -#include <svx/paperinf.hxx> -#include <svx/sizeitem.hxx> -#include <svx/ulspitem.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/escpitem.hxx> +#include <editeng/paperinf.hxx> +#include <editeng/sizeitem.hxx> +#include <editeng/ulspitem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/escpitem.hxx> #include <svl/intitem.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> diff --git a/sc/source/filter/excel/exctools.cxx b/sc/source/filter/excel/exctools.cxx index d9072f519..25c3d4c00 100644 --- a/sc/source/filter/excel/exctools.cxx +++ b/sc/source/filter/excel/exctools.cxx @@ -33,12 +33,12 @@ //------------------------------------------------------------------------ #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> -#include <svx/editdata.hxx> -#include <svx/editeng.hxx> -#include <svx/editobj.hxx> -#include <svx/editstat.hxx> +#include <editeng/editdata.hxx> +#include <editeng/editeng.hxx> +#include <editeng/editobj.hxx> +#include <editeng/editstat.hxx> #include "document.hxx" #include "patattr.hxx" diff --git a/sc/source/filter/excel/fontbuff.cxx b/sc/source/filter/excel/fontbuff.cxx index 6402fc29a..84b2f6c3a 100644 --- a/sc/source/filter/excel/fontbuff.cxx +++ b/sc/source/filter/excel/fontbuff.cxx @@ -31,14 +31,14 @@ #include "lotfntbf.hxx" #include "scitems.hxx" -#include <svx/cntritem.hxx> -#include <svx/crsditem.hxx> -#include <svx/eeitem.hxx> -#include <svx/postitem.hxx> -#include <svx/shdditem.hxx> -#include <svx/escpitem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/wghtitem.hxx> +#include <editeng/cntritem.hxx> +#include <editeng/crsditem.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/shdditem.hxx> +#include <editeng/escpitem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/wghtitem.hxx> #include <sfx2/printer.hxx> #include "attrib.hxx" diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 647d14aee..05e101c99 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -33,15 +33,15 @@ #include <filter/msfilter/countryid.hxx> #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> -#include <svx/editdata.hxx> -#include <svx/editeng.hxx> -#include <svx/editobj.hxx> -#include <svx/editstat.hxx> -#include <svx/flditem.hxx> +#include <editeng/editdata.hxx> +#include <editeng/editeng.hxx> +#include <editeng/editobj.hxx> +#include <editeng/editstat.hxx> +#include <editeng/flditem.hxx> #include <svx/pageitem.hxx> -#include <svx/colritem.hxx> +#include <editeng/colritem.hxx> #include <sfx2/printer.hxx> #include <sfx2/docfile.hxx> #include <svl/zforlist.hxx> diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index 5d0896cc7..82aced900 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -40,8 +40,8 @@ #include <svl/itemset.hxx> #include <formula/grammar.hxx> #include "scitems.hxx" -#include <svx/eeitem.hxx> -#include <svx/flditem.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/flditem.hxx> #include "document.hxx" #include "validat.hxx" #include "unonames.hxx" @@ -745,19 +745,19 @@ void XclExpCFImpl::WriteBody( XclExpStream& rStrm ) // font used flag for underline -> 0 = used, 1 = default sal_uInt32 nFontFlags3 = mbUnderlUsed ? 0 : EXC_CF_FONT_UNDERL; - rStrm.WriteZeroBytes( 64 ); + rStrm.WriteZeroBytesToRecord( 64 ); rStrm << nHeight << nStyle << maFontData.mnWeight << EXC_FONTESC_NONE << maFontData.mnUnderline; - rStrm.WriteZeroBytes( 3 ); + rStrm.WriteZeroBytesToRecord( 3 ); rStrm << nColor << sal_uInt32( 0 ) << nFontFlags1 << EXC_CF_FONT_ESCAPEM // escapement never used -> set the flag << nFontFlags3; - rStrm.WriteZeroBytes( 16 ); + rStrm.WriteZeroBytesToRecord( 16 ); rStrm << sal_uInt16( 1 ); // must be 1 } diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index 4f6524798..db6a33c1e 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -49,8 +49,8 @@ #include <vcl/bmpacc.hxx> #include <svx/svdoole2.hxx> #include <svx/svdocapt.hxx> -#include <svx/outlobj.hxx> -#include <svx/editobj.hxx> +#include <editeng/outlobj.hxx> +#include <editeng/editobj.hxx> #include "editutil.hxx" #include "unonames.hxx" diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index c10de074b..a8ef7eb6e 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -35,15 +35,15 @@ #include <svl/itemset.hxx> #include <svtools/ctrltool.hxx> #include <svx/svdotext.hxx> -#include <svx/outlobj.hxx> +#include <editeng/outlobj.hxx> #include "scitems.hxx" -#include <svx/fhgtitem.hxx> -#include <svx/flstitem.hxx> -#include <svx/colritem.hxx> -#include <svx/eeitem.hxx> -#include <svx/flditem.hxx> -#include <svx/escpitem.hxx> -#include <svx/svxfont.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/flstitem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/flditem.hxx> +#include <editeng/escpitem.hxx> +#include <editeng/svxfont.hxx> #define _SVSTDARR_USHORTS #include <svl/svstdarr.hxx> diff --git a/sc/source/filter/excel/xepage.cxx b/sc/source/filter/excel/xepage.cxx index 97ccacd9d..74dd75d88 100644 --- a/sc/source/filter/excel/xepage.cxx +++ b/sc/source/filter/excel/xepage.cxx @@ -34,10 +34,10 @@ #include <svl/eitem.hxx> #include <svl/intitem.hxx> #include <svx/pageitem.hxx> -#include <svx/sizeitem.hxx> -#include <svx/lrspitem.hxx> -#include <svx/ulspitem.hxx> -#include <svx/brshitem.hxx> +#include <editeng/sizeitem.hxx> +#include <editeng/lrspitem.hxx> +#include <editeng/ulspitem.hxx> +#include <editeng/brshitem.hxx> #include "document.hxx" #include "stlpool.hxx" #include "stlsheet.hxx" diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index 1f58d1a97..51d6d3a1d 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -256,6 +256,17 @@ void XclExpStream::WriteZeroBytes( sal_Size nBytes ) WriteRawZeroBytes( nBytes ); } +void XclExpStream::WriteZeroBytesToRecord( sal_Size nBytes ) +{ + if (!mbInRec) + // not in record. + return; + + sal_uInt8 nZero = 0; + for (sal_Size i = 0; i < nBytes; ++i) + *this << nZero; +} + sal_Size XclExpStream::CopyFromStream( SvStream& rInStrm, sal_Size nBytes ) { sal_Size nStrmPos = rInStrm.Tell(); diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 0dd03b216..11954cc8e 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -39,14 +39,14 @@ #include <sfx2/printer.hxx> #include "scitems.hxx" #include <svx/algitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/bolnitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/bolnitem.hxx> #include <svx/rotmodit.hxx> -#include <svx/colritem.hxx> -#include <svx/brshitem.hxx> -#include <svx/frmdiritem.hxx> -#include <svx/eeitem.hxx> -#include <svx/escpitem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/frmdiritem.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/escpitem.hxx> #include "document.hxx" #include "stlpool.hxx" #include "stlsheet.hxx" diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 1e93dc6d3..97f0a3c6f 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -31,6 +31,7 @@ #include "xichart.hxx" #include <algorithm> +#include <memory> #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/drawing/Direction3D.hpp> @@ -69,6 +70,8 @@ #include "tokenarray.hxx" #include "token.hxx" #include "compiler.hxx" +#include "reftokenhelper.hxx" +#include "chartlis.hxx" #include "fprogressbar.hxx" #include "xltracer.hxx" #include "xistream.hxx" @@ -120,6 +123,8 @@ using ::com::sun::star::chart2::data::XDataSequence; using ::formula::FormulaToken; using ::formula::StackVar; +using ::std::vector; + // Helpers ==================================================================== namespace { @@ -788,6 +793,22 @@ Sequence< Reference< XFormattedString > > XclImpChSourceLink::CreateStringSequen return ScfApiHelper::VectorToSequence( aStringVec ); } +void XclImpChSourceLink::FillSourceLink(vector<ScSharedTokenRef>& rTokens) const +{ + if (!mxTokenArray.is()) + // no links to fill. + return; + + mxTokenArray->Reset(); + for (FormulaToken* p = mxTokenArray->First(); p; p = mxTokenArray->Next()) + { + ScSharedTokenRef pToken(static_cast<ScToken*>(p->Clone())); + if (ScRefTokenHelper::isRef(pToken)) + // This is a reference token. Store it. + ScRefTokenHelper::join(rTokens, pToken); + } +} + // Text ======================================================================= XclImpChFontBase::~XclImpChFontBase() @@ -1834,6 +1855,18 @@ Reference< XDataSeries > XclImpChSeries::CreateDataSeries() const return xDataSeries; } +void XclImpChSeries::FillAllSourceLinks(vector<ScSharedTokenRef>& rTokens) const +{ + if (mxValueLink.is()) + mxValueLink->FillSourceLink(rTokens); + if (mxCategLink.is()) + mxCategLink->FillSourceLink(rTokens); + if (mxTitleLink.is()) + mxTitleLink->FillSourceLink(rTokens); + if (mxBubbleLink.is()) + mxBubbleLink->FillSourceLink(rTokens); +} + void XclImpChSeries::ReadChSourceLink( XclImpStream& rStrm ) { XclImpChSourceLinkRef xSrcLink( new XclImpChSourceLink( GetChRoot() ) ); @@ -3480,7 +3513,7 @@ XclImpChTextRef XclImpChChart::GetDefaultText( XclChTextType eTextType ) const return maDefTexts.get( nDefTextId ); } -void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, ScfProgressBar& rProgress ) const +void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, ScfProgressBar& rProgress, const OUString& rObjName ) const { // initialize conversion (locks the model to suppress any internal updates) InitConversion( xChartDoc ); @@ -3523,6 +3556,28 @@ void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, ScfProgressB // unlock the model FinishConversion( rProgress ); + + ScDocument* pDoc = &GetRoot().GetDoc(); + ScChartListenerCollection* pChartCollection = pDoc->GetChartListenerCollection(); + if (pChartCollection) + { + // Now, start listening to this chart. + ::std::auto_ptr< vector<ScSharedTokenRef> > pRefTokens(new vector<ScSharedTokenRef>); + for (XclImpChSeriesVec::const_iterator itr = maSeries.begin(), itrEnd = maSeries.end(); itr != itrEnd; ++itr) + { + const XclImpChSeriesRef& rSeries = *itr; + rSeries->FillAllSourceLinks(*pRefTokens); + } + if (!pRefTokens->empty()) + { + ::std::auto_ptr<ScChartListener> pListener( + new ScChartListener(rObjName, pDoc, pRefTokens.release())); + pListener->SetUsed(true); + pListener->StartListeningTo(); + pChartCollection->Insert(pListener.release()); + + } + } } void XclImpChChart::ReadChSeries( XclImpStream& rStrm ) @@ -3748,11 +3803,11 @@ sal_Size XclImpChart::GetProgressSize() const return mxChartData.is() ? mxChartData->GetProgressSize() : 0; } -void XclImpChart::Convert( Reference< XModel > xModel, ScfProgressBar& rProgress ) const +void XclImpChart::Convert( Reference< XModel > xModel, ScfProgressBar& rProgress, const OUString& rObjName ) const { Reference< XChartDocument > xChartDoc( xModel, UNO_QUERY ); if( mxChartData.is() && xChartDoc.is() ) - mxChartData->Convert( xChartDoc, rProgress ); + mxChartData->Convert( xChartDoc, rProgress, rObjName ); } void XclImpChart::ReadChChart( XclImpStream& rStrm ) diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index b1b6dc313..904d00acb 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -31,21 +31,21 @@ #include <sfx2/objsh.hxx> #include <sfx2/docfile.hxx> #include <tools/urlobj.hxx> -#include <svx/editeng.hxx> -#include <svx/editobj.hxx> -#include <svx/linkmgr.hxx> +#include <editeng/editeng.hxx> +#include <editeng/editobj.hxx> +#include <sfx2/linkmgr.hxx> #include <svl/itemset.hxx> #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svl/intitem.hxx> #include <svl/stritem.hxx> -#include <svx/flditem.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/wghtitem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/postitem.hxx> -#include <svx/colritem.hxx> -#include <svx/crsditem.hxx> +#include <editeng/flditem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/wghtitem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/crsditem.hxx> #include "document.hxx" #include "editutil.hxx" #include "cell.hxx" diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 340be9200..f5a0ebcd7 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -76,18 +76,18 @@ #include <svx/svdocapt.hxx> #include <svx/svdouno.hxx> #include <svx/svdpage.hxx> -#include <svx/editobj.hxx> -#include <svx/outliner.hxx> -#include <svx/outlobj.hxx> +#include <editeng/editobj.hxx> +#include <editeng/outliner.hxx> +#include <editeng/outlobj.hxx> #include <svx/unoapi.hxx> #include <svx/svditer.hxx> -#include <svx/writingmodeitem.hxx> +#include <editeng/writingmodeitem.hxx> #include "scitems.hxx" -#include <svx/eeitem.hxx> -#include <svx/colritem.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/colritem.hxx> #include <svx/xflclit.hxx> -#include <svx/adjitem.hxx> +#include <editeng/adjitem.hxx> #include <svx/xlineit.hxx> #include <svx/xlinjoit.hxx> #include <svx/xlntrit.hxx> @@ -102,6 +102,7 @@ #include "convuno.hxx" #include "postit.hxx" #include "globstr.hrc" +#include "chartlis.hxx" #include "fprogressbar.hxx" #include "xltracer.hxx" @@ -1659,7 +1660,7 @@ SdrObject* XclImpChartObj::DoCreateSdrObj( const Rectangle& rAnchorRect, ScfProg if( svt::EmbeddedObjectRef::TryRunningState( xEmbObj ) ) { Reference< XModel > xModel( xEmbObj->getComponent(), UNO_QUERY ); - mxChart->Convert( xModel, rProgress ); + mxChart->Convert( xModel, rProgress, aEmbObjName ); Reference< XEmbedPersist > xPers( xEmbObj, UNO_QUERY ); if( xPers.is() ) @@ -3835,6 +3836,9 @@ void XclImpObjectManager::ConvertObjects() rDffManager.ProcessDrawing( maDffStrm, *aPIt ); } } + ScChartListenerCollection* pChartListeners = GetDoc().GetChartListenerCollection(); + if (pChartListeners && pChartListeners->GetCount()) + pChartListeners->SetDirty(); } String XclImpObjectManager::GetDefaultObjName( const XclImpDrawObjBase& rDrawObj ) const diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx index 2d8ee0dac..1097633b1 100644 --- a/sc/source/filter/excel/xihelper.cxx +++ b/sc/source/filter/excel/xihelper.cxx @@ -29,11 +29,11 @@ #include "precompiled_sc.hxx" #include "xihelper.hxx" #include <svl/itemset.hxx> -#include <svx/editobj.hxx> +#include <editeng/editobj.hxx> #include <tools/urlobj.hxx> #include "scitems.hxx" -#include <svx/eeitem.hxx> -#include <svx/flditem.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/flditem.hxx> #include "document.hxx" #include "cell.hxx" #include "rangelst.hxx" diff --git a/sc/source/filter/excel/xipage.cxx b/sc/source/filter/excel/xipage.cxx index 44c98ada5..696f0e764 100644 --- a/sc/source/filter/excel/xipage.cxx +++ b/sc/source/filter/excel/xipage.cxx @@ -34,10 +34,10 @@ #include <svl/eitem.hxx> #include <svl/intitem.hxx> #include <svx/pageitem.hxx> -#include <svx/sizeitem.hxx> -#include <svx/lrspitem.hxx> -#include <svx/ulspitem.hxx> -#include <svx/brshitem.hxx> +#include <editeng/sizeitem.hxx> +#include <editeng/lrspitem.hxx> +#include <editeng/ulspitem.hxx> +#include <editeng/brshitem.hxx> #include "document.hxx" #include "stlsheet.hxx" #include "attrib.hxx" diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx index 7ad98e4b8..84f28383e 100644 --- a/sc/source/filter/excel/xistream.cxx +++ b/sc/source/filter/excel/xistream.cxx @@ -675,56 +675,56 @@ XclImpStream& XclImpStream::operator>>( double& rfValue ) sal_Int8 XclImpStream::ReadInt8() { - sal_Int8 nValue; + sal_Int8 nValue(0); operator>>( nValue ); return nValue; } sal_uInt8 XclImpStream::ReaduInt8() { - sal_uInt8 nValue; + sal_uInt8 nValue(0); operator>>( nValue ); return nValue; } sal_Int16 XclImpStream::ReadInt16() { - sal_Int16 nValue; + sal_Int16 nValue(0); operator>>( nValue ); return nValue; } sal_uInt16 XclImpStream::ReaduInt16() { - sal_uInt16 nValue; + sal_uInt16 nValue(0); operator>>( nValue ); return nValue; } sal_Int32 XclImpStream::ReadInt32() { - sal_Int32 nValue; + sal_Int32 nValue(0); operator>>( nValue ); return nValue; } sal_uInt32 XclImpStream::ReaduInt32() { - sal_uInt32 nValue; + sal_uInt32 nValue(0); operator>>( nValue ); return nValue; } float XclImpStream::ReadFloat() { - float fValue; + float fValue(0.0); operator>>( fValue ); return fValue; } double XclImpStream::ReadDouble() { - double fValue; + double fValue(0.0); operator>>( fValue ); return fValue; } diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 4aac7ab13..349e45b0e 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -31,26 +31,26 @@ #include <sfx2/printer.hxx> #include <sfx2/objsh.hxx> #include <svtools/ctrltool.hxx> -#include <svx/editobj.hxx> +#include <editeng/editobj.hxx> #include "scitems.hxx" -#include <svx/fontitem.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/wghtitem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/postitem.hxx> -#include <svx/crsditem.hxx> -#include <svx/cntritem.hxx> -#include <svx/shdditem.hxx> -#include <svx/escpitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/wghtitem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/crsditem.hxx> +#include <editeng/cntritem.hxx> +#include <editeng/shdditem.hxx> +#include <editeng/escpitem.hxx> #include <svx/algitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/bolnitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/bolnitem.hxx> #include <svx/rotmodit.hxx> -#include <svx/colritem.hxx> -#include <svx/brshitem.hxx> -#include <svx/frmdiritem.hxx> -#include <svx/eeitem.hxx> -#include <svx/flstitem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/frmdiritem.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/flstitem.hxx> #include "document.hxx" #include "docpool.hxx" #include "attrib.hxx" diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx index 55c48e9a1..0092fcc7b 100644 --- a/sc/source/filter/excel/xlchart.cxx +++ b/sc/source/filter/excel/xlchart.cxx @@ -53,7 +53,7 @@ #include <svx/xbtmpit.hxx> #include <svx/unomid.hxx> #include <filter/msfilter/escherex.hxx> - +#include <editeng/memberids.hrc> #include "global.hxx" #include "xlconst.hxx" #include "xlstyle.hxx" diff --git a/sc/source/filter/excel/xlpage.cxx b/sc/source/filter/excel/xlpage.cxx index f4c62ca1c..5a570f4af 100644 --- a/sc/source/filter/excel/xlpage.cxx +++ b/sc/source/filter/excel/xlpage.cxx @@ -29,11 +29,11 @@ #include "precompiled_sc.hxx" #include "xlpage.hxx" #include <sfx2/printer.hxx> -#include <svx/svxenum.hxx> -#include <svx/paperinf.hxx> +#include <editeng/svxenum.hxx> +#include <editeng/paperinf.hxx> #include <vcl/svapp.hxx> #include "scitems.hxx" -#include <svx/brshitem.hxx> +#include <editeng/brshitem.hxx> #include "global.hxx" #include "xlconst.hxx" diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx index 98259d82a..bce68098b 100644 --- a/sc/source/filter/excel/xlroot.cxx +++ b/sc/source/filter/excel/xlroot.cxx @@ -36,9 +36,9 @@ #include <sfx2/printer.hxx> #include <sfx2/docfile.hxx> #include <vcl/font.hxx> -#include <svx/editstat.hxx> +#include <editeng/editstat.hxx> #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include "document.hxx" #include "docpool.hxx" #include "docuno.hxx" diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx index 20b496eee..b820d39f4 100644 --- a/sc/source/filter/excel/xlstyle.cxx +++ b/sc/source/filter/excel/xlstyle.cxx @@ -37,7 +37,7 @@ #include <vcl/font.hxx> #include <rtl/tencinfo.h> #include <toolkit/unohlp.hxx> -#include <svx/svxfont.hxx> +#include <editeng/svxfont.hxx> #include "global.hxx" #include "xlroot.hxx" diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx index a17a41b19..6882f64b9 100644 --- a/sc/source/filter/excel/xltools.cxx +++ b/sc/source/filter/excel/xltools.cxx @@ -33,7 +33,7 @@ #include <sal/mathconf.h> #include <unotools/fontcvt.hxx> #include <sfx2/objsh.hxx> -#include <svx/editstat.hxx> +#include <editeng/editstat.hxx> #include "xestream.hxx" #include "document.hxx" #include "docuno.hxx" diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index f2d3c2024..008595c78 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -33,24 +33,24 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #define _SVSTDARR_STRINGSSORTDTOR #include <rtl/tencinfo.h> #include <vcl/svapp.hxx> #include <svx/algitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/brshitem.hxx> -#include <svx/colritem.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/fontitem.hxx> -#include <svx/postitem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/wghtitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/wghtitem.hxx> #include <svx/xoutbmp.hxx> -#include <svx/editeng.hxx> -#include <svx/htmlcfg.hxx> +#include <editeng/editeng.hxx> +#include <svtools/htmlcfg.hxx> #include <sfx2/docfile.hxx> #include <sfx2/frmhtmlw.hxx> #include <sfx2/objsh.hxx> @@ -83,8 +83,8 @@ #include "ftools.hxx" -#include <svx/flditem.hxx> -#include <svx/borderline.hxx> +#include <editeng/flditem.hxx> +#include <editeng/borderline.hxx> #include <unotools/syslocale.hxx> diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx index 5ca1cba2d..7ab81251c 100644 --- a/sc/source/filter/html/htmlimp.cxx +++ b/sc/source/filter/html/htmlimp.cxx @@ -33,13 +33,13 @@ //------------------------------------------------------------------------ #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> -#include <svx/lrspitem.hxx> -#include <svx/paperinf.hxx> -#include <svx/sizeitem.hxx> -#include <svx/ulspitem.hxx> -#include <svx/boxitem.hxx> +#include <editeng/lrspitem.hxx> +#include <editeng/paperinf.hxx> +#include <editeng/sizeitem.hxx> +#include <editeng/ulspitem.hxx> +#include <editeng/boxitem.hxx> #include <vcl/svapp.hxx> #include "htmlimp.hxx" diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index a06ebbe7f..1b3379e69 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -32,20 +32,19 @@ #define SC_HTMLPARS_CXX #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> -#include <svx/htmlcfg.hxx> +#include <svtools/htmlcfg.hxx> #include <svx/algitem.hxx> -#include <svx/colritem.hxx> -#include <svx/brshitem.hxx> -#include <svx/editeng.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/fontitem.hxx> -#include <svx/impgrf.hxx> -#include <svx/postitem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/wghtitem.hxx> -#include <svx/boxitem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/editeng.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/wghtitem.hxx> +#include <editeng/boxitem.hxx> #include <sfx2/objsh.hxx> #include <svl/eitem.hxx> #include <svtools/filter.hxx> @@ -1372,8 +1371,8 @@ void ScHTMLLayoutParser::Image( ImportInfo* pInfo ) USHORT nFormat; Graphic* pGraphic = new Graphic; - GraphicFilter* pFilter = ::GetGrfFilter(); - if ( GRFILTER_OK != ::LoadGraphic( pImage->aURL, pImage->aFilterName, + GraphicFilter* pFilter = GraphicFilter::GetGraphicFilter(); + if ( GRFILTER_OK != GraphicFilter::LoadGraphic( pImage->aURL, pImage->aFilterName, *pGraphic, pFilter, &nFormat ) ) { delete pGraphic; diff --git a/sc/source/filter/inc/eeparser.hxx b/sc/source/filter/inc/eeparser.hxx index 354ce662a..2a06cbc31 100644 --- a/sc/source/filter/inc/eeparser.hxx +++ b/sc/source/filter/inc/eeparser.hxx @@ -33,7 +33,7 @@ #include <vcl/graph.hxx> #include <tools/table.hxx> #include <svl/itemset.hxx> -#include <svx/editdata.hxx> +#include <editeng/editdata.hxx> #include <address.hxx> const sal_Char nHorizontal = 1; diff --git a/sc/source/filter/inc/excimp8.hxx b/sc/source/filter/inc/excimp8.hxx index bda4d6ab9..e87dc02e8 100644 --- a/sc/source/filter/inc/excimp8.hxx +++ b/sc/source/filter/inc/excimp8.hxx @@ -34,6 +34,7 @@ #include "excscen.hxx" #include "excdefs.hxx" #include "ftools.hxx" +#include "queryparam.hxx" class SotStorage; @@ -49,6 +50,7 @@ class XclImpStream; class ImportExcel8 : public ImportExcel { + SCTAB mnTab; protected: ExcScenarioList aScenList; diff --git a/sc/source/filter/inc/filt_pch.hxx b/sc/source/filter/inc/filt_pch.hxx index 38c8d8591..0f1c7543e 100644 --- a/sc/source/filter/inc/filt_pch.hxx +++ b/sc/source/filter/inc/filt_pch.hxx @@ -158,7 +158,7 @@ #include <namebuff.hxx> #include <tools/shl.hxx> #include <tools/pstm.hxx> -#include <svx/fhgtitem.hxx> +#include <editeng/fhgtitem.hxx> #include <vos/types.hxx> #include <vos/object.hxx> #include <vos/macros.hxx> @@ -168,7 +168,7 @@ #include <com/sun/star/uno/Sequence.hxx> #include <attrib.hxx> #include <svl/zforlist.hxx> -#include <svx/fontitem.hxx> +#include <editeng/fontitem.hxx> #include <com/sun/star/lang/XEventListener.hpp> #include <com/sun/star/lang/XEventListener.hdl> #include <com/sun/star/lang/EventObject.hdl> @@ -228,20 +228,20 @@ #include <vos/runnable.hxx> #include <vos/refernce.hxx> #include <vcl/apptypes.hxx> -#include <svx/editdata.hxx> -#include <svx/editeng.hxx> +#include <editeng/editdata.hxx> +#include <editeng/editeng.hxx> #include <com/sun/star/lang/WrappedTargetException.hdl> #include <com/sun/star/lang/WrappedTargetException.hpp> #include <sfx2/shell.hxx> #include <tools/stack.hxx> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/lang/XComponent.hdl> -#include <svx/svxenum.hxx> +#include <editeng/svxenum.hxx> #include <formel.hxx> #include <com/sun/star/container/XElementAccess.hdl> #include <com/sun/star/container/XElementAccess.hpp> #include <svl/itempool.hxx> -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <rangenam.hxx> #include <vcl/syswin.hxx> #include <svl/smplhint.hxx> @@ -299,7 +299,7 @@ #include <com/sun/star/lang/IllegalArgumentException.hdl> #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <tools/urlobj.hxx> -#include <svx/colritem.hxx> +#include <editeng/colritem.hxx> #include <vcl/wrkwin.hxx> #include <excimp8.hxx> #include <excscen.hxx> diff --git a/sc/source/filter/inc/lotfntbf.hxx b/sc/source/filter/inc/lotfntbf.hxx index d384e65f2..8f9bd3572 100644 --- a/sc/source/filter/inc/lotfntbf.hxx +++ b/sc/source/filter/inc/lotfntbf.hxx @@ -31,9 +31,9 @@ #include <tools/solar.h> #include "scitems.hxx" -#include <svx/fontitem.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/colritem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/colritem.hxx> // ---------------------------------------------------- class LotusFontBuffer - diff --git a/sc/source/filter/inc/xcl97rec.hxx b/sc/source/filter/inc/xcl97rec.hxx index 57500edef..1bcffdaa1 100644 --- a/sc/source/filter/inc/xcl97rec.hxx +++ b/sc/source/filter/inc/xcl97rec.hxx @@ -567,6 +567,19 @@ private: // ============================================================================ +/** End of User Interface Records */ +class XclExpInterfaceEnd : public XclExpRecord +{ +public: + explicit XclExpInterfaceEnd(); + virtual ~XclExpInterfaceEnd(); + +private: + virtual void WriteBody( XclExpStream& rStrm ); +}; + +// ============================================================================ + /** Write Access User Name - This record contains the user name, which is the name you type when you install Excel. */ class XclExpWriteAccess : public XclExpRecord diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx index fe7fde823..a8fae8fdf 100644 --- a/sc/source/filter/inc/xestream.hxx +++ b/sc/source/filter/inc/xestream.hxx @@ -123,6 +123,9 @@ public: sal_Size Write( const void* pData, sal_Size nBytes ); /** Writes a sequence of nBytes zero bytes (respects slice setting). */ void WriteZeroBytes( sal_Size nBytes ); + + void WriteZeroBytesToRecord( sal_Size nBytes ); + /** Copies nBytes bytes from current position of the stream rInStrm. @descr Omitting the second parameter means: read to end of stream. */ sal_Size CopyFromStream( SvStream& rInStrm, sal_Size nBytes = STREAM_SEEK_TO_END ); diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx index 70f2192c4..f7a806828 100644 --- a/sc/source/filter/inc/xestyle.hxx +++ b/sc/source/filter/inc/xestyle.hxx @@ -33,7 +33,7 @@ #include <tools/string.hxx> #include <svl/zforlist.hxx> #include <svl/nfkeytab.hxx> -#include <svx/svxfont.hxx> +#include <editeng/svxfont.hxx> #include "xerecord.hxx" #include "xlstyle.hxx" #include "xeroot.hxx" diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx index bc09c5db8..f5afb3cfa 100644 --- a/sc/source/filter/inc/xichart.hxx +++ b/sc/source/filter/inc/xichart.hxx @@ -36,6 +36,7 @@ #include <svl/itemset.hxx> #include "rangelst.hxx" +#include "token.hxx" #include "xlchart.hxx" #include "xlstyle.hxx" #include "xistring.hxx" @@ -400,6 +401,8 @@ public: XFormattedStringSeq CreateStringSequence( const XclImpChRoot& rRoot, sal_uInt16 nLeadFontIdx, const Color& rLeadFontColor ) const; + void FillSourceLink(::std::vector<ScSharedTokenRef>& rTokens) const; + private: XclChSourceLink maData; /// Contents of the CHSOURCELINK record. XclImpStringRef mxString; /// Text data (CHSTRING record). @@ -808,6 +811,8 @@ public: /** Creates a data series object with initialized source links. */ XDataSeriesRef CreateDataSeries() const; + void FillAllSourceLinks(::std::vector<ScSharedTokenRef>& rTokens) const; + private: /** Reads a CHSOURCELINK record. */ void ReadChSourceLink( XclImpStream& rStrm ); @@ -1350,7 +1355,7 @@ public: inline sal_Size GetProgressSize() const { return 2 * EXC_CHART_PROGRESS_SIZE; } /** Converts and writes all properties to the passed chart. */ - void Convert( XChartDocRef xChartDoc, ScfProgressBar& rProgress ) const; + void Convert( XChartDocRef xChartDoc, ScfProgressBar& rProgress, const ::rtl::OUString& rObjName ) const; private: /** Reads a CHSERIES group (data series source and formatting). */ @@ -1418,7 +1423,7 @@ public: inline bool IsPivotChart() const { return mbIsPivotChart; } /** Creates the chart object in the passed component. */ - void Convert( XModelRef xModel, ScfProgressBar& rProgress ) const; + void Convert( XModelRef xModel, ScfProgressBar& rProgress, const ::rtl::OUString& rObjName ) const; private: /** Reads the CHCHART group (entire chart data). */ diff --git a/sc/source/filter/inc/xihelper.hxx b/sc/source/filter/inc/xihelper.hxx index a39f1e210..4b9274584 100644 --- a/sc/source/filter/inc/xihelper.hxx +++ b/sc/source/filter/inc/xihelper.hxx @@ -28,7 +28,7 @@ #ifndef SC_XIHELPER_HXX #define SC_XIHELPER_HXX -#include <svx/editdata.hxx> +#include <editeng/editdata.hxx> #include "scmatrix.hxx" #include "xladdress.hxx" #include "xiroot.hxx" diff --git a/sc/source/filter/inc/xlstyle.hxx b/sc/source/filter/inc/xlstyle.hxx index 366ee2994..b7d08570e 100644 --- a/sc/source/filter/inc/xlstyle.hxx +++ b/sc/source/filter/inc/xlstyle.hxx @@ -34,8 +34,8 @@ #include <com/sun/star/awt/FontStrikeout.hpp> #include <tools/color.hxx> #include <vcl/vclenum.hxx> -#include <svx/svxenum.hxx> -#include <svx/frmdir.hxx> +#include <editeng/svxenum.hxx> +#include <editeng/frmdir.hxx> #include <svl/zforlist.hxx> #include "fapihelper.hxx" diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx index 493ef6aca..2253e513d 100644 --- a/sc/source/filter/lotus/lotattr.cxx +++ b/sc/source/filter/lotus/lotattr.cxx @@ -34,8 +34,8 @@ #include "scitems.hxx" #include <svx/algitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/brshitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/brshitem.hxx> #include "document.hxx" #include "patattr.hxx" diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx index 074b0adbc..0cf2b40ea 100644 --- a/sc/source/filter/lotus/op.cxx +++ b/sc/source/filter/lotus/op.cxx @@ -45,9 +45,9 @@ #include "patattr.hxx" #include "docpool.hxx" #include <svx/algitem.hxx> -#include <svx/postitem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/wghtitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/wghtitem.hxx> #include "cell.hxx" #include "rangenam.hxx" diff --git a/sc/source/filter/qpro/qprostyle.cxx b/sc/source/filter/qpro/qprostyle.cxx index 8908e65d6..8e1b13bbf 100644 --- a/sc/source/filter/qpro/qprostyle.cxx +++ b/sc/source/filter/qpro/qprostyle.cxx @@ -40,12 +40,12 @@ #include <tools/color.hxx> #include <scitems.hxx> #include <svx/algitem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/wghtitem.hxx> -#include <svx/postitem.hxx> -#include <svx/crsditem.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/fontitem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/wghtitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/crsditem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/fontitem.hxx> #include <map> #include "global.hxx" diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx index 4512f5176..0e5161604 100644 --- a/sc/source/filter/rtf/eeimpars.cxx +++ b/sc/source/filter/rtf/eeimpars.cxx @@ -33,18 +33,18 @@ //------------------------------------------------------------------------ #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> -#include <svx/adjitem.hxx> -#include <svx/editobj.hxx> -#include <svx/editview.hxx> -#include <svx/escpitem.hxx> -#include <svx/langitem.hxx> +#include <editeng/adjitem.hxx> +#include <editeng/editobj.hxx> +#include <editeng/editview.hxx> +#include <editeng/escpitem.hxx> +#include <editeng/langitem.hxx> #include <svx/svdograf.hxx> #include <svx/svdpage.hxx> -#include <svx/scripttypeitem.hxx> -#include <svx/htmlcfg.hxx> +#include <editeng/scripttypeitem.hxx> +#include <svtools/htmlcfg.hxx> #include <sfx2/sfxhtml.hxx> #include <svtools/parhtml.hxx> #include <svl/zforlist.hxx> diff --git a/sc/source/filter/rtf/rtfexp.cxx b/sc/source/filter/rtf/rtfexp.cxx index 17f34e933..7b8ba5c26 100644 --- a/sc/source/filter/rtf/rtfexp.cxx +++ b/sc/source/filter/rtf/rtfexp.cxx @@ -31,15 +31,15 @@ #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svx/algitem.hxx> -#include <svx/wghtitem.hxx> -#include <svx/postitem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/fontitem.hxx> -#include <svx/fhgtitem.hxx> +#include <editeng/wghtitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/fhgtitem.hxx> #include <svl/style.hxx> #include <svtools/rtfout.hxx> #include <svtools/rtfkeywd.hxx> diff --git a/sc/source/filter/rtf/rtfparse.cxx b/sc/source/filter/rtf/rtfparse.cxx index 3bff6e877..f6e660348 100644 --- a/sc/source/filter/rtf/rtfparse.cxx +++ b/sc/source/filter/rtf/rtfparse.cxx @@ -33,12 +33,12 @@ //------------------------------------------------------------------------ #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> -#include <svx/editeng.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/svxrtf.hxx> +#include <editeng/editeng.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/svxrtf.hxx> #include <vcl/outdev.hxx> #include <svtools/rtftoken.h> diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx index aad47aeee..f5ab9af77 100644 --- a/sc/source/filter/starcalc/scflt.cxx +++ b/sc/source/filter/starcalc/scflt.cxx @@ -33,25 +33,25 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svx/algitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/brshitem.hxx> -#include <svx/colritem.hxx> -#include <svx/crsditem.hxx> -#include <svx/editdata.hxx> -#include <svx/editeng.hxx> -#include <svx/editobj.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/fontitem.hxx> -#include <svx/lrspitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/crsditem.hxx> +#include <editeng/editdata.hxx> +#include <editeng/editeng.hxx> +#include <editeng/editobj.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/lrspitem.hxx> #include <svx/pageitem.hxx> -#include <svx/postitem.hxx> -#include <svx/sizeitem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/ulspitem.hxx> -#include <svx/wghtitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/sizeitem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/ulspitem.hxx> +#include <editeng/wghtitem.hxx> #include <svl/zforlist.hxx> #include <svl/PasswordHelper.hxx> #include <stdio.h> diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx index 358c7f8e5..c631cdcff 100644 --- a/sc/source/filter/xcl97/xcl97esc.cxx +++ b/sc/source/filter/xcl97/xcl97esc.cxx @@ -35,7 +35,7 @@ #include <com/sun/star/script/XEventAttacherManager.hpp> #include <svx/svdpage.hxx> -#include <svx/outlobj.hxx> +#include <editeng/outlobj.hxx> #include <svx/svdotext.hxx> #include <svx/svdobj.hxx> #include <svx/svdoole2.hxx> diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index b2b6c60a0..eb726b810 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -31,14 +31,14 @@ #include <svx/svdpool.hxx> #include <svx/sdtaitm.hxx> #include <svx/svdotext.hxx> -#include <svx/editobj.hxx> +#include <editeng/editobj.hxx> #include <svx/svdoole2.hxx> #include <sot/storage.hxx> #include <svl/itemset.hxx> #include <svx/svdpage.hxx> #include <svx/svdocapt.hxx> #include <svx/unoapi.hxx> -#include <svx/writingmodeitem.hxx> +#include <editeng/writingmodeitem.hxx> #include <vcl/svapp.hxx> #include <rtl/math.hxx> #include <svl/zformat.hxx> @@ -55,11 +55,11 @@ #include "scitems.hxx" #include <unotools/fltrcfg.hxx> -#include <svx/brshitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/frmdiritem.hxx> -#include <svx/adjitem.hxx> -#include <svx/eeitem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/frmdiritem.hxx> +#include <editeng/adjitem.hxx> +#include <editeng/eeitem.hxx> #include <filter/msfilter/msoleexp.hxx> #include <unotools/localedatawrapper.hxx> @@ -1456,6 +1456,19 @@ void XclExpInterfaceHdr::WriteBody( XclExpStream& rStrm ) // ============================================================================ +XclExpInterfaceEnd::XclExpInterfaceEnd() : + XclExpRecord(0x00E2, 0) {} + +XclExpInterfaceEnd::~XclExpInterfaceEnd() {} + +void XclExpInterfaceEnd::WriteBody( XclExpStream& rStrm ) +{ + // Don't forget to re-enable encryption. + rStrm.EnableEncryption(); +} + +// ============================================================================ + XclExpWriteAccess::XclExpWriteAccess() : XclExpRecord(0x005C, 112) { diff --git a/sc/source/filter/xml/XMLExportDataPilot.hxx b/sc/source/filter/xml/XMLExportDataPilot.hxx index fd5311f09..260e3e3d1 100644 --- a/sc/source/filter/xml/XMLExportDataPilot.hxx +++ b/sc/source/filter/xml/XMLExportDataPilot.hxx @@ -41,6 +41,7 @@ class ScDPDimensionSaveData; class ScDPSaveGroupDimension; class ScDPSaveNumGroupDimension; struct ScDPNumGroupInfo; +struct ScQueryParam; class ScXMLExportDataPilot { diff --git a/sc/source/filter/xml/xmlannoi.hxx b/sc/source/filter/xml/xmlannoi.hxx index 054c4d7c1..ea6cfad80 100644 --- a/sc/source/filter/xml/xmlannoi.hxx +++ b/sc/source/filter/xml/xmlannoi.hxx @@ -31,7 +31,7 @@ #include <xmloff/xmlictxt.hxx> #include <xmloff/xmlimp.hxx> #include <rtl/ustrbuf.hxx> -#include <svx/editdata.hxx> +#include <editeng/editdata.hxx> #include <com/sun/star/drawing/XShape.hpp> #include <com/sun/star/drawing/XShapes.hpp> diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index d1d23a59e..02096f2dc 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -48,7 +48,7 @@ #include "XMLStylesImportHelper.hxx" #include "arealink.hxx" -#include <svx/linkmgr.hxx> +#include <sfx2/linkmgr.hxx> #include "convuno.hxx" #include "XMLConverter.hxx" #include "scerrors.hxx" @@ -64,8 +64,8 @@ #include <xmloff/xmlnmspe.hxx> #include <svl/zforlist.hxx> #include <svx/svdocapt.hxx> -#include <svx/outlobj.hxx> -#include <svx/editobj.hxx> +#include <editeng/outlobj.hxx> +#include <editeng/editobj.hxx> #include <svx/unoapi.hxx> #include <svl/languageoptions.hxx> @@ -736,7 +736,7 @@ void ScXMLTableRowCellContext::SetCellRangeSource( const table::CellAddress& rPo String sSourceStr( pCellRangeSource->sSourceStr ); ScAreaLink* pLink = new ScAreaLink( pDoc->GetDocumentShell(), pCellRangeSource->sURL, sFilterName, pCellRangeSource->sFilterOptions, sSourceStr, aDestRange, pCellRangeSource->nRefresh ); - SvxLinkManager* pLinkManager = pDoc->GetLinkManager(); + sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, pCellRangeSource->sURL, &sFilterName, &sSourceStr ); } } diff --git a/sc/source/filter/xml/xmldpimp.hxx b/sc/source/filter/xml/xmldpimp.hxx index 7aaacba16..e136fb2d0 100644 --- a/sc/source/filter/xml/xmldpimp.hxx +++ b/sc/source/filter/xml/xmldpimp.hxx @@ -37,6 +37,7 @@ #include "global.hxx" #include "dpobject.hxx" #include "dpsave.hxx" +#include "queryparam.hxx" #include <hash_set> diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 7c2077178..be873cccf 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -30,7 +30,7 @@ // INCLUDE --------------------------------------------------------------- -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include "xmlexprt.hxx" #include "XMLConverter.hxx" @@ -88,11 +88,11 @@ #include <svl/zforlist.hxx> #include <svx/unoshape.hxx> #include <comphelper/extract.hxx> -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <toolkit/helper/convert.hxx> #include <svx/svdobj.hxx> #include <svx/svdocapt.hxx> -#include <svx/outlobj.hxx> +#include <editeng/outlobj.hxx> #include <svx/svditer.hxx> #include <svx/svdpage.hxx> diff --git a/sc/source/filter/xml/xmlfonte.cxx b/sc/source/filter/xml/xmlfonte.cxx index f44c205eb..b082cd74e 100644 --- a/sc/source/filter/xml/xmlfonte.cxx +++ b/sc/source/filter/xml/xmlfonte.cxx @@ -34,13 +34,13 @@ #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <xmloff/XMLFontAutoStylePool.hxx> -#include <svx/fontitem.hxx> -#include <svx/eeitem.hxx> -#include <svx/editeng.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/editeng.hxx> #include "document.hxx" #include "docpool.hxx" #include "xmlexprt.hxx" diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx index 901b6f068..bb7b0eac0 100644 --- a/sc/source/ui/Accessibility/AccessibleCell.cxx +++ b/sc/source/ui/Accessibility/AccessibleCell.cxx @@ -31,7 +31,7 @@ #include "AccessibleCell.hxx" #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include "AccessibleText.hxx" @@ -58,7 +58,7 @@ #include <com/sun/star/accessibility/XAccessibleTable.hpp> #include <rtl/uuid.h> #include <tools/debug.hxx> -#include <svx/brshitem.hxx> +#include <editeng/brshitem.hxx> #include <comphelper/sequence.hxx> #include <float.h> diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx index c1e784f50..e7ab3fae0 100644 --- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx +++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx @@ -52,7 +52,7 @@ #include <com/sun/star/sheet/XSpreadsheetDocument.hpp> #include <com/sun/star/sheet/XSpreadsheet.hpp> #include <tools/debug.hxx> -#include <svx/brshitem.hxx> +#include <editeng/brshitem.hxx> #include <rtl/uuid.h> #include <comphelper/sequence.hxx> #include <sfx2/objsh.hxx> diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx index 513fd622d..5cfef56ff 100644 --- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx +++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx @@ -50,9 +50,9 @@ #endif #include <comphelper/sequence.hxx> #include "scitems.hxx" -#include <svx/fontitem.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/langitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/langitem.hxx> #include "csvcontrol.hxx" #include "csvruler.hxx" #include "csvgrid.hxx" diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx index e8fe8ed21..41a23b208 100644 --- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx +++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx @@ -29,7 +29,7 @@ #include "precompiled_sc.hxx" #include "AccessibleEditObject.hxx" #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include "unoguard.hxx" #include "AccessibleText.hxx" #include "editsrc.hxx" @@ -48,8 +48,8 @@ #include <rtl/uuid.h> #include <tools/debug.hxx> #include <svx/AccessibleTextHelper.hxx> -#include <svx/editview.hxx> -#include <svx/editeng.hxx> +#include <editeng/editview.hxx> +#include <editeng/editeng.hxx> #include <svx/svdmodel.hxx> using namespace ::com::sun::star; diff --git a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx index 92d9799eb..a3d99badc 100644 --- a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx +++ b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx @@ -37,9 +37,9 @@ #include "docpool.hxx" #include "tools/gen.hxx" -#include "svx/unoedsrc.hxx" -#include "svx/editdata.hxx" -#include "svx/outliner.hxx" +#include "editeng/unoedsrc.hxx" +#include "editeng/editdata.hxx" +#include "editeng/outliner.hxx" #include "vcl/unohelp.hxx" #include "dpcontrol.hxx" diff --git a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx index 89195ba12..c15674862 100644 --- a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx +++ b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx @@ -53,7 +53,7 @@ #include <unotools/accessiblestatesethelper.hxx> #include <svl/style.hxx> #include <svl/itempool.hxx> -#include <svx/editobj.hxx> +#include <editeng/editobj.hxx> #include <toolkit/helper/convert.hxx> #include <algorithm> diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx index c8c2dc66a..06d234dd7 100644 --- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx +++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx @@ -47,7 +47,7 @@ #include <com/sun/star/accessibility/AccessibleStateType.hpp> #endif #include <com/sun/star/accessibility/AccessibleEventId.hpp> -#include <svx/editobj.hxx> +#include <editeng/editobj.hxx> #include <svx/AccessibleTextHelper.hxx> #include <rtl/uuid.h> #include <unotools/accessiblestatesethelper.hxx> diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx index 5433d2ef5..2bf337fcf 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sc.hxx" #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <tools/gen.hxx> #include "AccessibleText.hxx" #include "editsrc.hxx" @@ -40,7 +40,7 @@ #include "document.hxx" #include <svx/AccessibleTextHelper.hxx> #include <unotools/accessiblestatesethelper.hxx> -#include <svx/brshitem.hxx> +#include <editeng/brshitem.hxx> #include <vcl/window.hxx> #include <toolkit/helper/convert.hxx> diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx index 305abc3ae..65d87a044 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sc.hxx" #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <tools/gen.hxx> #include "AccessibleText.hxx" #include "editsrc.hxx" diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index d7292bc90..50e248466 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -29,7 +29,7 @@ #include "precompiled_sc.hxx" #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <memory> @@ -45,12 +45,12 @@ #include "unoguard.hxx" #include "patattr.hxx" #include "inputwin.hxx" -#include <svx/unofored.hxx> -#include <svx/editview.hxx> -#include <svx/unoedhlp.hxx> +#include <editeng/unofored.hxx> +#include <editeng/editview.hxx> +#include <editeng/unoedhlp.hxx> #include <vcl/virdev.hxx> -#include <svx/editobj.hxx> -#include <svx/adjitem.hxx> +#include <editeng/editobj.hxx> +#include <editeng/adjitem.hxx> #include <svx/svdmodel.hxx> #include <svx/algitem.hxx> diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index 39adece58..85ad39189 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -73,10 +73,10 @@ #include "scitems.hxx" // #108584# -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> // #108584# -#include <svx/fhgtitem.hxx> +#include <editeng/fhgtitem.hxx> #include <vcl/svapp.hxx> using namespace com::sun::star; diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index a29029ce9..ebae028b5 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -31,24 +31,24 @@ //------------------------------------------------------------------ #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <sfx2/app.hxx> -#include <svx/acorrcfg.hxx> +#include <editeng/acorrcfg.hxx> #include <svx/algitem.hxx> -#include <svx/adjitem.hxx> -#include <svx/brshitem.hxx> +#include <editeng/adjitem.hxx> +#include <editeng/brshitem.hxx> #include <svtools/colorcfg.hxx> -#include <svx/colritem.hxx> -#include <svx/editobj.hxx> -#include <svx/editstat.hxx> -#include <svx/editview.hxx> -#include <svx/escpitem.hxx> -#include <svx/forbiddencharacterstable.hxx> -#include <svx/langitem.hxx> -#include <svx/svxacorr.hxx> -#include <svx/unolingu.hxx> -#include <svx/wghtitem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/editobj.hxx> +#include <editeng/editstat.hxx> +#include <editeng/editview.hxx> +#include <editeng/escpitem.hxx> +#include <editeng/forbiddencharacterstable.hxx> +#include <editeng/langitem.hxx> +#include <editeng/svxacorr.hxx> +#include <editeng/unolingu.hxx> +#include <editeng/wghtitem.hxx> #include <sfx2/bindings.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/dispatch.hxx> diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 6ab8787c1..918c239ab 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -31,22 +31,22 @@ #include <algorithm> #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <sfx2/app.hxx> -#include <svx/adjitem.hxx> -#include <svx/editview.hxx> -#include <svx/editstat.hxx> -#include <svx/frmdiritem.hxx> -#include <svx/lspcitem.hxx> +#include <editeng/adjitem.hxx> +#include <editeng/editview.hxx> +#include <editeng/editstat.hxx> +#include <editeng/frmdiritem.hxx> +#include <editeng/lspcitem.hxx> #include <sfx2/bindings.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/event.hxx> #include <sfx2/imgmgr.hxx> #include <stdlib.h> // qsort -#include <svx/scriptspaceitem.hxx> -#include <svx/scripttypeitem.hxx> +#include <editeng/scriptspaceitem.hxx> +#include <editeng/scripttypeitem.hxx> #include <vcl/cursor.hxx> #include <vcl/help.hxx> #include <svl/stritem.hxx> @@ -70,7 +70,7 @@ #include "rangeutl.hxx" #include "docfunc.hxx" #include "funcdesc.hxx" -#include <svx/fontitem.hxx> +#include <editeng/fontitem.hxx> #include <com/sun/star/accessibility/XAccessible.hpp> #include "AccessibleEditObject.hxx" #include "AccessibleText.hxx" diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index a8a273263..245f0a907 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -30,7 +30,7 @@ -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #ifndef _FM_FMOBJFAC_HXX @@ -93,7 +93,7 @@ #include <svx/selctrl.hxx> #include <svx/insctrl.hxx> #include <svx/zoomctrl.hxx> -#include <svx/flditem.hxx> +#include <editeng/flditem.hxx> #include <svx/modctrl.hxx> #include <svx/pszctrl.hxx> #include <svx/fntctl.hxx> diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index def807780..58884ddf6 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -38,10 +38,10 @@ #include "scitems.hxx" #include <sfx2/app.hxx> -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> -#include <svx/flditem.hxx> -#include <svx/outliner.hxx> +#include <editeng/flditem.hxx> +#include <editeng/outliner.hxx> #include <basic/sbstar.hxx> #include <sfx2/sfxdlg.hxx> @@ -60,7 +60,7 @@ #include <sfx2/request.hxx> #include <sfx2/macrconf.hxx> #include <sfx2/printer.hxx> -#include <svx/langitem.hxx> +#include <editeng/langitem.hxx> #include <svtools/colorcfg.hxx> #include <svl/whiter.hxx> diff --git a/sc/source/ui/app/scmod2.cxx b/sc/source/ui/app/scmod2.cxx index e3c24eef5..0e042cfd7 100644 --- a/sc/source/ui/app/scmod2.cxx +++ b/sc/source/ui/app/scmod2.cxx @@ -32,7 +32,7 @@ //------------------------------------------------------------------ -#include <svx/unolingu.hxx> +#include <editeng/unolingu.hxx> #include <unotools/lingucfg.hxx> #include <i18npool/mslangid.hxx> #include <com/sun/star/i18n/ScriptType.hpp> diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index 75304d3d7..1fe1e304e 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -33,7 +33,7 @@ #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <com/sun/star/uno/Sequence.hxx> @@ -60,8 +60,8 @@ #include "scmod.hxx" // for InitDocShell -#include <svx/paperinf.hxx> -#include <svx/sizeitem.hxx> +#include <editeng/paperinf.hxx> +#include <editeng/sizeitem.hxx> #include <svx/algitem.hxx> #include <svl/intitem.hxx> #include <svl/zforlist.hxx> diff --git a/sc/source/ui/app/typemap.cxx b/sc/source/ui/app/typemap.cxx index cf08791a1..33a8069c7 100644 --- a/sc/source/ui/app/typemap.cxx +++ b/sc/source/ui/app/typemap.cxx @@ -32,7 +32,7 @@ #include <svx/svxids.hrc> #include "sc.hrc" #include "scitems.hxx" - +#include <editeng/memberids.hrc> #define ITEMID_DBTYPE 0 @@ -64,24 +64,24 @@ #include <svl/stritem.hxx> #include <svl/slstitm.hxx> #include <sfx2/objitem.hxx> -#include <svx/fontitem.hxx> +#include <editeng/fontitem.hxx> #include <svx/hlnkitem.hxx> -#include <svx/srchitem.hxx> +#include <svl/srchitem.hxx> #include <svx/postattr.hxx> -#include <svx/postitem.hxx> +#include <editeng/postitem.hxx> #include <sfx2/tplpitem.hxx> #include <svx/zoomitem.hxx> -#include <svx/brshitem.hxx> -#include <svx/wghtitem.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/colritem.hxx> -#include <svx/boxitem.hxx> -#include <svx/bolnitem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/wghtitem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/bolnitem.hxx> #include <svl/ptitem.hxx> -#include <svx/sizeitem.hxx> +#include <editeng/sizeitem.hxx> #include <svx/algitem.hxx> #include <svx/clipfmtitem.hxx> -#include <svx/udlnitem.hxx> +#include <editeng/udlnitem.hxx> #include <svx/xlnstit.hxx> #include <svx/xlnedit.hxx> #include <svx/xfillit0.hxx> @@ -104,14 +104,14 @@ #include <svx/xftshcit.hxx> #include <svx/xftshxy.hxx> #include <svx/xftsfit.hxx> -#include <svx/langitem.hxx> +#include <editeng/langitem.hxx> #include <svx/grafctrl.hxx> -#include <svx/shdditem.hxx> -#include <svx/shaditem.hxx> -#include <svx/cntritem.hxx> -#include <svx/crsditem.hxx> -#include <svx/brkitem.hxx> -#include <svx/charreliefitem.hxx> +#include <editeng/shdditem.hxx> +#include <editeng/shaditem.hxx> +#include <editeng/cntritem.hxx> +#include <editeng/crsditem.hxx> +#include <editeng/brkitem.hxx> +#include <editeng/charreliefitem.hxx> #include <svx/rotmodit.hxx> #include <svx/drawitem.hxx> #include <svl/ilstitem.hxx> diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx index 798820083..36eab35ca 100644 --- a/sc/source/ui/app/uiitems.cxx +++ b/sc/source/ui/app/uiitems.cxx @@ -30,7 +30,7 @@ -#include <svx/editobj.hxx> +#include <editeng/editobj.hxx> #include "userlist.hxx" #include "uiitems.hxx" diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx index 44a37a498..65fa88ea0 100644 --- a/sc/source/ui/attrdlg/attrdlg.cxx +++ b/sc/source/ui/attrdlg/attrdlg.cxx @@ -51,7 +51,7 @@ #include <svx/svxdlg.hxx> //CHINA001 #include <svx/dialogs.hrc> //CHINA001 #include <svx/flagsdef.hxx> //CHINA001 -#include <svx/flstitem.hxx> //CHINA001 +#include <editeng/flstitem.hxx> //CHINA001 #include <sfx2/app.hxx> //CHINA001 #if !LAYOUT_SFX_TABDIALOG_BROKEN diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index 420836102..51545fe22 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -43,12 +43,12 @@ // *** edit engine *** #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> -#include <svx/colritem.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/fontitem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/fontitem.hxx> #include <svl/itemset.hxx> #include "editutil.hxx" // *** edit engine *** diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx index b47e35e19..6f56fc0ff 100644 --- a/sc/source/ui/dbgui/foptmgr.cxx +++ b/sc/source/ui/dbgui/foptmgr.cxx @@ -42,6 +42,7 @@ #include "dbcolect.hxx" #include "viewdata.hxx" #include "document.hxx" +#include "queryparam.hxx" #define _FOPTMGR_CXX #include "foptmgr.hxx" diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx index 0b39beb3c..9c4655fa7 100644 --- a/sc/source/ui/docshell/arealink.cxx +++ b/sc/source/ui/docshell/arealink.cxx @@ -36,7 +36,7 @@ #include <sfx2/docfile.hxx> #include <sfx2/fcontnr.hxx> #include <sfx2/sfxsids.hrc> -#include <svx/linkmgr.hxx> +#include <sfx2/linkmgr.hxx> #include <svl/stritem.hxx> #include <vcl/msgbox.hxx> @@ -127,7 +127,7 @@ void __EXPORT ScAreaLink::DataChanged( const String&, if (bInCreate) return; - SvxLinkManager* pLinkManager=pImpl->m_pDocSh->GetDocument()->GetLinkManager(); + sfx2::LinkManager* pLinkManager=pImpl->m_pDocSh->GetDocument()->GetLinkManager(); if (pLinkManager!=NULL) { String aFile; diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 419038881..47d67df26 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -33,11 +33,11 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <sfx2/app.hxx> -#include <svx/editobj.hxx> -#include <svx/linkmgr.hxx> +#include <editeng/editobj.hxx> +#include <sfx2/linkmgr.hxx> #include <svx/svdundo.hxx> #include <sfx2/bindings.hxx> #include <sfx2/printer.hxx> @@ -4548,7 +4548,7 @@ BOOL ScDocFunc::InsertAreaLink( const String& rFile, const String& rFilter, ScDocument* pDoc = rDocShell.GetDocument(); BOOL bUndo (pDoc->IsUndoEnabled()); - SvxLinkManager* pLinkManager = pDoc->GetLinkManager(); + sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); // #i52120# if other area links exist at the same start position, // remove them first (file format specifies only one link definition diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 25c574328..76407ae9a 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -32,8 +32,8 @@ #include "scitems.hxx" -#include <svx/eeitem.hxx> -#include <svx/svxenum.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/svxenum.hxx> #include <svx/algitem.hxx> @@ -59,7 +59,7 @@ #include <sfx2/sfx.hrc> #include <sfx2/topfrm.hxx> #include <sfx2/objface.hxx> -#include <svx/srchitem.hxx> +#include <svl/srchitem.hxx> #include <unotools/fltrcfg.hxx> #include <svl/documentlockfile.hxx> #include <svl/sharecontrolfile.hxx> diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx index 31727f019..4854bc9e1 100644 --- a/sc/source/ui/docshell/docsh2.cxx +++ b/sc/source/ui/docshell/docsh2.cxx @@ -37,7 +37,7 @@ #include "scitems.hxx" #include <tools/gen.hxx> #include <svtools/ctrltool.hxx> -#include <svx/flstitem.hxx> +#include <editeng/flstitem.hxx> #include <svx/drawitem.hxx> #include <sfx2/printer.hxx> #include <svl/smplhint.hxx> @@ -45,9 +45,9 @@ #include <svx/svdobj.hxx> #include <svx/svdoole2.hxx> #include <vcl/svapp.hxx> -#include <svx/asiancfg.hxx> -#include <svx/forbiddencharacterstable.hxx> -#include <svx/unolingu.hxx> +#include <svl/asiancfg.hxx> +#include <editeng/forbiddencharacterstable.hxx> +#include <editeng/unolingu.hxx> #include <rtl/logfile.hxx> #include <comphelper/processfactory.hxx> diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 2706b4b6b..f6cff1612 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -37,11 +37,11 @@ #include "scitems.hxx" #include "rangelst.hxx" -#include <svx/flstitem.hxx> +#include <editeng/flstitem.hxx> #include <svx/pageitem.hxx> -#include <svx/paperinf.hxx> +#include <editeng/paperinf.hxx> #include <svx/postattr.hxx> -#include <svx/sizeitem.hxx> +#include <editeng/sizeitem.hxx> #include <unotools/misccfg.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/app.hxx> diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index f2b3c6f95..51e732518 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -42,7 +42,7 @@ using namespace ::com::sun::star; #include "scitems.hxx" #include <sfx2/fcontnr.hxx> -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <sfx2/app.hxx> #include <sfx2/bindings.hxx> diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index f2f39355b..5c6a411bc 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -37,7 +37,7 @@ #include <svx/pageitem.hxx> #include <vcl/virdev.hxx> -#include <svx/linkmgr.hxx> +#include <sfx2/linkmgr.hxx> #endif // INCLUDE --------------------------------------------------------------- @@ -364,7 +364,7 @@ BOOL __EXPORT ScDocShell::Insert( SfxObjectShell &rSource, void ScDocShell::UpdateLinks() { - SvxLinkManager* pLinkManager = aDocument.GetLinkManager(); + sfx2::LinkManager* pLinkManager = aDocument.GetLinkManager(); ScStrCollection aNames; // nicht mehr benutzte Links raus @@ -435,7 +435,7 @@ void ScDocShell::UpdateLinks() BOOL ScDocShell::ReloadTabLinks() { - SvxLinkManager* pLinkManager = aDocument.GetLinkManager(); + sfx2::LinkManager* pLinkManager = aDocument.GetLinkManager(); BOOL bAny = FALSE; USHORT nCount = pLinkManager->GetLinks().Count(); diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 2289c1ff3..3ace7dec1 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -58,7 +58,7 @@ #include "svl/stritem.hxx" #include "svl/urihelper.hxx" #include "svl/zformat.hxx" -#include "svx/linkmgr.hxx" +#include "sfx2/linkmgr.hxx" #include "tools/urlobj.hxx" #include "unotools/ucbhelper.hxx" @@ -1058,8 +1058,11 @@ void ScExternalRefLink::DataChanged(const String& /*rMimeType*/, const Any& /*rV else { // The source document has changed. + ScDocShell* pDocShell = ScDocShell::GetViewData()->GetDocShell(); + ScDocShellModificator aMod(*pDocShell); pMgr->switchSrcFile(mnFileId, aFile, aFilter); maFilterName = aFilter; + aMod.SetDocumentModified(); } } @@ -1991,7 +1994,7 @@ void ScExternalRefManager::maybeLinkExternalFile(sal_uInt16 nFileId) String aFilter, aOptions; ScDocumentLoader::GetFilterName(*pFileName, aFilter, aOptions, true, false); - SvxLinkManager* pLinkMgr = mpDoc->GetLinkManager(); + sfx2::LinkManager* pLinkMgr = mpDoc->GetLinkManager(); ScExternalRefLink* pLink = new ScExternalRefLink(mpDoc, nFileId, aFilter); DBG_ASSERT(pFileName, "ScExternalRefManager::insertExternalFileLink: file name pointer is NULL"); pLinkMgr->InsertFileLink(*pLink, OBJECT_CLIENT_FILE, *pFileName, &aFilter); diff --git a/sc/source/ui/docshell/servobj.cxx b/sc/source/ui/docshell/servobj.cxx index 297df231a..1d69e2661 100644 --- a/sc/source/ui/docshell/servobj.cxx +++ b/sc/source/ui/docshell/servobj.cxx @@ -33,7 +33,7 @@ #include <sot/formats.hxx> #include <sfx2/app.hxx> -#include <svx/linkmgr.hxx> +#include <sfx2/linkmgr.hxx> #include "servobj.hxx" #include "docsh.hxx" #include "impex.hxx" diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index af95f78ba..0e313e512 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -44,7 +44,7 @@ #include <sfx2/docfile.hxx> #include <sfx2/docfilt.hxx> #include <sfx2/fcontnr.hxx> -#include <svx/linkmgr.hxx> +#include <sfx2/linkmgr.hxx> #include <tools/urlobj.hxx> #include <unotools/transliterationwrapper.hxx> @@ -143,7 +143,7 @@ void __EXPORT ScTableLink::Edit( Window* pParent, const Link& rEndEditHdl ) void __EXPORT ScTableLink::DataChanged( const String&, const ::com::sun::star::uno::Any& ) { - SvxLinkManager* pLinkManager=pImpl->m_pDocSh->GetDocument()->GetLinkManager(); + sfx2::LinkManager* pLinkManager=pImpl->m_pDocSh->GetDocument()->GetLinkManager(); if (pLinkManager!=NULL) { String aFile; diff --git a/sc/source/ui/drawfunc/chartsh.cxx b/sc/source/ui/drawfunc/chartsh.cxx index 16c98cbef..e85642d98 100644 --- a/sc/source/ui/drawfunc/chartsh.cxx +++ b/sc/source/ui/drawfunc/chartsh.cxx @@ -31,10 +31,10 @@ //------------------------------------------------------------------ -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svx/fontwork.hxx> //CHINA001 #include <svx/labdlg.hxx> -#include <svx/srchitem.hxx> +#include <svl/srchitem.hxx> #include <svx/tabarea.hxx> #include <svx/tabline.hxx> //CHINA001 #include <svx/transfrm.hxx> diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index 14b3dab14..183088312 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -33,10 +33,10 @@ #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svx/fontwork.hxx> //#include <svx/labdlg.hxx> CHINA001 -#include <svx/srchitem.hxx> +#include <svl/srchitem.hxx> #include <svx/tabarea.hxx> #include <svx/tabline.hxx> //CHINA001 #include <svx/transfrm.hxx> diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index 1ac80c313..7d1392ba0 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -32,8 +32,8 @@ #include <com/sun/star/embed/EmbedMisc.hpp> #include "scitems.hxx" -#include <svx/eeitem.hxx> -#include <svx/sizeitem.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/sizeitem.hxx> #include <svx/svdpagv.hxx> #include <svx/xdef.hxx> #include <sfx2/app.hxx> diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx index e93280814..2908af8dd 100644 --- a/sc/source/ui/drawfunc/drawsh5.cxx +++ b/sc/source/ui/drawfunc/drawsh5.cxx @@ -32,7 +32,7 @@ //------------------------------------------------------------------ -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/request.hxx> diff --git a/sc/source/ui/drawfunc/drformsh.cxx b/sc/source/ui/drawfunc/drformsh.cxx index 7d430c90c..3a83f18a5 100644 --- a/sc/source/ui/drawfunc/drformsh.cxx +++ b/sc/source/ui/drawfunc/drformsh.cxx @@ -32,10 +32,10 @@ //------------------------------------------------------------------ -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svx/fontwork.hxx> //CHINA001 #include <svx/labdlg.hxx> -#include <svx/srchitem.hxx> +#include <svl/srchitem.hxx> #include <svx/tabarea.hxx> #include <svx/tabline.hxx> //CHINA001 #include <svx/transfrm.hxx> diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index e75c6239b..710bd450f 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -34,26 +34,26 @@ #include "scitems.hxx" -#include <svx/adjitem.hxx> +#include <editeng/adjitem.hxx> #include <svx/clipfmtitem.hxx> -#include <svx/cntritem.hxx> -#include <svx/crsditem.hxx> -#include <svx/editeng.hxx> -#include <svx/escpitem.hxx> -#include <svx/flditem.hxx> -#include <svx/fontitem.hxx> -#include <svx/frmdiritem.hxx> +#include <editeng/cntritem.hxx> +#include <editeng/crsditem.hxx> +#include <editeng/editeng.hxx> +#include <editeng/escpitem.hxx> +#include <editeng/flditem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/frmdiritem.hxx> #include <svx/hlnkitem.hxx> -#include <svx/lspcitem.hxx> +#include <editeng/lspcitem.hxx> #include <svx/svdoutl.hxx> -#include <svx/outlobj.hxx> -#include <svx/postitem.hxx> -#include <svx/scripttypeitem.hxx> -#include <svx/shdditem.hxx> -#include <svx/srchitem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/wghtitem.hxx> -#include <svx/writingmodeitem.hxx> +#include <editeng/outlobj.hxx> +#include <editeng/postitem.hxx> +#include <editeng/scripttypeitem.hxx> +#include <editeng/shdditem.hxx> +#include <svl/srchitem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/wghtitem.hxx> +#include <editeng/writingmodeitem.hxx> #include <sfx2/app.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/objface.hxx> diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx index 2e8a7d9db..2a06767d5 100644 --- a/sc/source/ui/drawfunc/drtxtob1.cxx +++ b/sc/source/ui/drawfunc/drtxtob1.cxx @@ -33,15 +33,15 @@ //------------------------------------------------------------------------ #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svx/svxdlg.hxx> -#include <svx/brkitem.hxx> -#include <svx/hyznitem.hxx> -#include <svx/orphitem.hxx> -#include <svx/outliner.hxx> -#include <svx/spltitem.hxx> -#include <svx/widwitem.hxx> +#include <editeng/brkitem.hxx> +#include <editeng/hyznitem.hxx> +#include <editeng/orphitem.hxx> +#include <editeng/outliner.hxx> +#include <editeng/spltitem.hxx> +#include <editeng/widwitem.hxx> #include <sot/exchange.hxx> #include <vcl/msgbox.hxx> #include <svtools/transfer.hxx> diff --git a/sc/source/ui/drawfunc/drtxtob2.cxx b/sc/source/ui/drawfunc/drtxtob2.cxx index 90254062a..7f21071b5 100644 --- a/sc/source/ui/drawfunc/drtxtob2.cxx +++ b/sc/source/ui/drawfunc/drtxtob2.cxx @@ -29,14 +29,14 @@ #include "precompiled_sc.hxx" #include "scitems.hxx" -#include <svx/adjitem.hxx> +#include <editeng/adjitem.hxx> #include <svx/drawitem.hxx> #include <svx/fontwork.hxx> -#include <svx/frmdiritem.hxx> -#include <svx/outlobj.hxx> +#include <editeng/frmdiritem.hxx> +#include <editeng/outlobj.hxx> #include <svx/svdocapt.hxx> #include <svx/xtextit.hxx> -#include <svx/writingmodeitem.hxx> +#include <editeng/writingmodeitem.hxx> #include <sfx2/bindings.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/objsh.hxx> diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx index ce793903d..96d1eb9e1 100644 --- a/sc/source/ui/drawfunc/fuconcustomshape.cxx +++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx @@ -29,20 +29,20 @@ #include "precompiled_sc.hxx" #include "fuconcustomshape.hxx" -#include <svx/svxenum.hxx> +#include <editeng/svxenum.hxx> #include <svx/gallery.hxx> #include <sfx2/request.hxx> #include <svx/fmmodel.hxx> #include <svl/itempool.hxx> #include <svx/svdpage.hxx> #include <svx/svdoashp.hxx> -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svx/sdtagitm.hxx> #include "fuconuno.hxx" #include "tabvwsh.hxx" #include "sc.hrc" #include "drawview.hxx" -#include <svx/adjitem.hxx> +#include <editeng/adjitem.hxx> #include <math.h> diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx index dc893db20..61a35df31 100644 --- a/sc/source/ui/drawfunc/fuconrec.cxx +++ b/sc/source/ui/drawfunc/fuconrec.cxx @@ -33,7 +33,7 @@ #include "sc.hrc" #include "drawview.hxx" -#include <svx/outlobj.hxx> +#include <editeng/outlobj.hxx> // #98185# Create default drawing objects via keyboard #include <svx/svdopath.hxx> #include <svx/svdocapt.hxx> diff --git a/sc/source/ui/drawfunc/fuconstr.cxx b/sc/source/ui/drawfunc/fuconstr.cxx index 4207c1a61..ca1378011 100644 --- a/sc/source/ui/drawfunc/fuconstr.cxx +++ b/sc/source/ui/drawfunc/fuconstr.cxx @@ -28,8 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sc.hxx" -#include <svx/outliner.hxx> -#include <svx/outlobj.hxx> +#include <editeng/outliner.hxx> +#include <editeng/outlobj.hxx> #include <svx/svdotext.hxx> #include <svx/svdouno.hxx> #include <sfx2/dispatch.hxx> diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx index 792ef7261..cb33e6301 100644 --- a/sc/source/ui/drawfunc/fudraw.cxx +++ b/sc/source/ui/drawfunc/fudraw.cxx @@ -30,8 +30,8 @@ //------------------------------------------------------------------------ -#include <svx/editeng.hxx> // EditEngine::IsSimpleCharInput -#include <svx/outlobj.hxx> +#include <editeng/editeng.hxx> // EditEngine::IsSimpleCharInput +#include <editeng/outlobj.hxx> #include <svx/svdobj.hxx> #include <svx/svdoole2.hxx> #include <svx/svdouno.hxx> diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx index 1914a4286..80d6324c8 100644 --- a/sc/source/ui/drawfunc/fuins1.cxx +++ b/sc/source/ui/drawfunc/fuins1.cxx @@ -28,8 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sc.hxx" -#include <svx/impgrf.hxx> -#include <svx/opengrf.hxx> +#include <sfx2/opengrf.hxx> #include <svx/svdograf.hxx> #include <svx/svdomedia.hxx> #include <svx/svdpage.hxx> @@ -270,7 +269,7 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh, bAsLink = ((const SfxBoolItem*)pItem)->GetValue(); Graphic aGraphic; - int nError = ::LoadGraphic( aFileName, aFilterName, aGraphic, ::GetGrfFilter() ); + int nError = GraphicFilter::LoadGraphic( aFileName, aFilterName, aGraphic, GraphicFilter::GetGraphicFilter() ); if ( nError == GRFILTER_OK ) { lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, TRUE, pViewSh, pWindow, pView ); diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx index 620ce823e..314b16b2a 100644 --- a/sc/source/ui/drawfunc/fupoor.cxx +++ b/sc/source/ui/drawfunc/fupoor.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sc.hxx" -#include <svx/outliner.hxx> +#include <editeng/outliner.hxx> #include <svx/svditer.hxx> #include <svx/svdobj.hxx> #include <svx/svdpagv.hxx> diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx index cc57d41ea..fc19f72fb 100644 --- a/sc/source/ui/drawfunc/fusel.cxx +++ b/sc/source/ui/drawfunc/fusel.cxx @@ -32,8 +32,8 @@ #include <com/sun/star/embed/EmbedStates.hpp> -#include <svx/eeitem.hxx> -#include <svx/flditem.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/flditem.hxx> #include <svx/svdoole2.hxx> #include <svx/svdotext.hxx> #include <sfx2/dispatch.hxx> @@ -41,7 +41,7 @@ #include <svx/svdouno.hxx> #include <svx/svdomedia.hxx> #include <svx/svdpagv.hxx> -#include <svx/outlobj.hxx> +#include <editeng/outlobj.hxx> #include <svx/svdocapt.hxx> #include <sfx2/app.hxx> diff --git a/sc/source/ui/drawfunc/fusel2.cxx b/sc/source/ui/drawfunc/fusel2.cxx index 93a694428..36d2f1cbb 100644 --- a/sc/source/ui/drawfunc/fusel2.cxx +++ b/sc/source/ui/drawfunc/fusel2.cxx @@ -36,7 +36,7 @@ #include <svx/svdocapt.hxx> #include <svx/svdpagv.hxx> #include <sfx2/dispatch.hxx> -#include <svx/outliner.hxx> +#include <editeng/outliner.hxx> #include "fusel.hxx" #include "tabvwsh.hxx" diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx index 3b89bd34e..11f7574f0 100644 --- a/sc/source/ui/drawfunc/futext.cxx +++ b/sc/source/ui/drawfunc/futext.cxx @@ -30,17 +30,17 @@ #include <svx/svddef.hxx> #include <svx/svdoutl.hxx> -#include <svx/outlobj.hxx> +#include <editeng/outlobj.hxx> #include <svx/sdtaaitm.hxx> #include <svx/sdtacitm.hxx> #include <svx/svdotext.hxx> -#include <svx/unolingu.hxx> +#include <editeng/unolingu.hxx> #include <svx/svdocapt.hxx> #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/viewfrm.hxx> #include <svx/svxids.hrc> -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svl/itemset.hxx> #include "futext.hxx" diff --git a/sc/source/ui/drawfunc/futext3.cxx b/sc/source/ui/drawfunc/futext3.cxx index 229af9977..dd6c80f17 100644 --- a/sc/source/ui/drawfunc/futext3.cxx +++ b/sc/source/ui/drawfunc/futext3.cxx @@ -28,16 +28,16 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sc.hxx" -#include <svx/editeng.hxx> -#include <svx/outlobj.hxx> +#include <editeng/editeng.hxx> +#include <editeng/outlobj.hxx> #include <svx/svdocapt.hxx> #include <svx/svdpage.hxx> #include <svx/svdundo.hxx> #include <svx/svdview.hxx> -#include <svx/editobj.hxx> +#include <editeng/editobj.hxx> #include <vcl/cursor.hxx> #include <sfx2/objsh.hxx> -#include <svx/writingmodeitem.hxx> +#include <editeng/writingmodeitem.hxx> #include "global.hxx" #include "drwlayer.hxx" diff --git a/sc/source/ui/drawfunc/oleobjsh.cxx b/sc/source/ui/drawfunc/oleobjsh.cxx index 85722034a..8b4540123 100644 --- a/sc/source/ui/drawfunc/oleobjsh.cxx +++ b/sc/source/ui/drawfunc/oleobjsh.cxx @@ -32,10 +32,10 @@ //------------------------------------------------------------------ -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svx/fontwork.hxx> //CHINA001 #include <svx/labdlg.hxx> -#include <svx/srchitem.hxx> +#include <svl/srchitem.hxx> #include <svx/tabarea.hxx> #include <svx/tabline.hxx> //CHINA001 #include <svx/transfrm.hxx> diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx index 939d67b4e..a19b3e984 100644 --- a/sc/source/ui/formdlg/dwfunctr.cxx +++ b/sc/source/ui/formdlg/dwfunctr.cxx @@ -32,7 +32,7 @@ // INCLUDE --------------------------------------------------------------- -#include <svx/editview.hxx> +#include <editeng/editview.hxx> #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/objsh.hxx> diff --git a/sc/source/ui/inc/AccessibleCell.hxx b/sc/source/ui/inc/AccessibleCell.hxx index 85d3d3682..dc639994e 100644 --- a/sc/source/ui/inc/AccessibleCell.hxx +++ b/sc/source/ui/inc/AccessibleCell.hxx @@ -34,7 +34,7 @@ #include "viewdata.hxx" #include <com/sun/star/accessibility/XAccessibleRelationSet.hpp> #include <unotools/accessiblerelationsethelper.hxx> -#include <svx/AccessibleStaticTextBase.hxx> +#include <editeng/AccessibleStaticTextBase.hxx> #include <comphelper/uno3.hxx> class ScTabViewShell; diff --git a/sc/source/ui/inc/AccessibleCsvControl.hxx b/sc/source/ui/inc/AccessibleCsvControl.hxx index 9f10feb2f..051e1b11c 100644 --- a/sc/source/ui/inc/AccessibleCsvControl.hxx +++ b/sc/source/ui/inc/AccessibleCsvControl.hxx @@ -38,7 +38,7 @@ #include <rtl/ustrbuf.hxx> #include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase2.hxx> -#include <svx/AccessibleStaticTextBase.hxx> +#include <editeng/AccessibleStaticTextBase.hxx> #include <comphelper/uno3.hxx> #include "AccessibleContextBase.hxx" diff --git a/sc/source/ui/inc/AccessiblePageHeader.hxx b/sc/source/ui/inc/AccessiblePageHeader.hxx index 3b5e7de8d..859ed4692 100644 --- a/sc/source/ui/inc/AccessiblePageHeader.hxx +++ b/sc/source/ui/inc/AccessiblePageHeader.hxx @@ -30,7 +30,7 @@ #define _SC_ACCESSIBLEPAGEHEADER_HXX #include "AccessibleContextBase.hxx" -#include <svx/svxenum.hxx> +#include <editeng/svxenum.hxx> class ScPreviewShell; class EditTextObject; diff --git a/sc/source/ui/inc/AccessiblePageHeaderArea.hxx b/sc/source/ui/inc/AccessiblePageHeaderArea.hxx index 5f9f36fef..b40ad8d97 100644 --- a/sc/source/ui/inc/AccessiblePageHeaderArea.hxx +++ b/sc/source/ui/inc/AccessiblePageHeaderArea.hxx @@ -32,7 +32,7 @@ #ifndef _SC_ACCESSIBLE_CONTEXT_BASE_HXX #include "AccessibleContextBase.hxx" #endif -#include <svx/svxenum.hxx> +#include <editeng/svxenum.hxx> class EditTextObject; namespace accessibility diff --git a/sc/source/ui/inc/AccessibleText.hxx b/sc/source/ui/inc/AccessibleText.hxx index e21fc03ed..cc3d70af5 100644 --- a/sc/source/ui/inc/AccessibleText.hxx +++ b/sc/source/ui/inc/AccessibleText.hxx @@ -31,7 +31,7 @@ #include "textuno.hxx" #include "global.hxx" #include "viewdata.hxx" -#include <svx/svxenum.hxx> +#include <editeng/svxenum.hxx> #include <memory> diff --git a/sc/source/ui/inc/editsh.hxx b/sc/source/ui/inc/editsh.hxx index c39342408..ce08dea63 100644 --- a/sc/source/ui/inc/editsh.hxx +++ b/sc/source/ui/inc/editsh.hxx @@ -33,7 +33,7 @@ #include <tools/link.hxx> #include "shellids.hxx" -#include <svx/editview.hxx> +#include <editeng/editview.hxx> class EditView; class ScViewData; diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx index c1d9e952c..e7f3a493b 100644 --- a/sc/source/ui/inc/inputhdl.hxx +++ b/sc/source/ui/inc/inputhdl.hxx @@ -32,7 +32,7 @@ #include "address.hxx" #include <tools/fract.hxx> #include <tools/gen.hxx> -#include <svx/svxenum.hxx> +#include <editeng/svxenum.hxx> class ScDocument; class ScTabView; diff --git a/sc/source/ui/inc/msgpool.hxx b/sc/source/ui/inc/msgpool.hxx index be3ee8bdb..7fe407abc 100644 --- a/sc/source/ui/inc/msgpool.hxx +++ b/sc/source/ui/inc/msgpool.hxx @@ -29,7 +29,7 @@ #define SC_MSGPOOL_HXX #include "scitems.hxx" -#include <svx/srchitem.hxx> +#include <svl/srchitem.hxx> #include <svl/itempool.hxx> diff --git a/sc/source/ui/inc/pfiltdlg.hxx b/sc/source/ui/inc/pfiltdlg.hxx index 2fe57a856..096bb53d9 100644 --- a/sc/source/ui/inc/pfiltdlg.hxx +++ b/sc/source/ui/inc/pfiltdlg.hxx @@ -50,8 +50,8 @@ #ifndef _COMBOBOX_HXX //autogen #include <vcl/combobox.hxx> #endif -#include "global.hxx" // -> ScQueryParam #include "address.hxx" +#include "queryparam.hxx" //------------------------------------------------------------------ diff --git a/sc/source/ui/inc/selectionstate.hxx b/sc/source/ui/inc/selectionstate.hxx index 509c79863..a2f3bf475 100644 --- a/sc/source/ui/inc/selectionstate.hxx +++ b/sc/source/ui/inc/selectionstate.hxx @@ -28,7 +28,7 @@ #ifndef SC_SELECTIONSTATE_HXX #define SC_SELECTIONSTATE_HXX -#include <svx/editdata.hxx> +#include <editeng/editdata.hxx> #include "rangelst.hxx" // ============================================================================ diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index c378b2196..91add9d08 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -28,9 +28,10 @@ #ifndef SC_TABVWSH_HXX #define SC_TABVWSH_HXX +#include <svtools/htmlcfg.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/viewfac.hxx> -#include <svx/svxenum.hxx> +#include <editeng/svxenum.hxx> #include "scdllapi.h" #include "dbfunc.hxx" // -> tabview #include "target.hxx" @@ -103,6 +104,7 @@ private: static USHORT nInsCellsCtrlState; static USHORT nInsObjCtrlState; + SvxHtmlOptions aHTMLOpt; ObjectSelectionType eCurOST; USHORT nDrawSfxId; USHORT nCtrlSfxId; @@ -195,6 +197,7 @@ private: DECL_LINK( SimpleRefAborted, String* ); DECL_LINK( SimpleRefChange, String* ); DECL_LINK( FormControlActivated, FmFormShell* ); + DECL_LINK( HtmlOptionsHdl, void * ); protected: virtual void Activate(BOOL bMDI); diff --git a/sc/source/ui/inc/ui_pch.hxx b/sc/source/ui/inc/ui_pch.hxx index adeeb5719..ce157626e 100644 --- a/sc/source/ui/inc/ui_pch.hxx +++ b/sc/source/ui/inc/ui_pch.hxx @@ -236,7 +236,7 @@ #include <vcl/bitmapex.hxx> #include <vcl/animate.hxx> #include <vcl/graph.h> -#include <svx/editdata.hxx> +#include <editeng/editdata.hxx> #include <svtools/stdctrl.hxx> #include <sfx2/basedlgs.hxx> #include <conditio.hxx> @@ -245,7 +245,7 @@ #include <uiitems.hxx> #include <svx/svdmodel.hxx> #include <vcl/gdiobj.hxx> -#include <svx/editeng.hxx> +#include <editeng/editeng.hxx> #include <svx/pageitem.hxx> #include <anyrefdg.hxx> #include <basic/sbxcore.hxx> @@ -301,10 +301,9 @@ #include <drawview.hxx> #include <svx/view3d.hxx> #include <svx/def3d.hxx> -#include <goodies/vector3d.hxx> #include <vcl/floatwin.hxx> #include <basic/sbxobj.hxx> -#include <svx/svxenum.hxx> +#include <editeng/svxenum.hxx> #include <svx/xtextit0.hxx> #include <svx/svdtrans.hxx> #include <svl/style.hxx> @@ -321,11 +320,11 @@ #include <fupoor.hxx> #include <docpool.hxx> #include <vcl/button.hxx> -#include <svx/srchitem.hxx> +#include <svl/srchitem.hxx> #include <svx/svdorect.hxx> #include <svl/whiter.hxx> #include <stlpool.hxx> -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <inputhdl.hxx> #include <svx/svdpage.hxx> diff --git a/sc/source/ui/inc/uiitems.hxx b/sc/source/ui/inc/uiitems.hxx index 93a88fdc9..579f9dfa8 100644 --- a/sc/source/ui/inc/uiitems.hxx +++ b/sc/source/ui/inc/uiitems.hxx @@ -31,6 +31,7 @@ #include "scdllapi.h" #include "conditio.hxx" #include "sortparam.hxx" +#include "queryparam.hxx" #include "paramisc.hxx" #include <svl/poolitem.hxx> diff --git a/sc/source/ui/inc/undodat.hxx b/sc/source/ui/inc/undodat.hxx index 98d47d743..81da22ed9 100644 --- a/sc/source/ui/inc/undodat.hxx +++ b/sc/source/ui/inc/undodat.hxx @@ -33,6 +33,7 @@ #include "rangelst.hxx" // ScRangeListRef #include "markdata.hxx" #include "sortparam.hxx" +#include "queryparam.hxx" #include "pivot.hxx" class ScDocShell; diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx index cd5068c70..9e05fe3fe 100644 --- a/sc/source/ui/miscdlgs/autofmt.cxx +++ b/sc/source/ui/miscdlgs/autofmt.cxx @@ -34,16 +34,16 @@ #include "scitems.hxx" #include <svx/algitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/brshitem.hxx> -#include <svx/cntritem.hxx> -#include <svx/colritem.hxx> -#include <svx/crsditem.hxx> -#include <svx/fontitem.hxx> -#include <svx/postitem.hxx> -#include <svx/shdditem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/wghtitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/cntritem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/crsditem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/shdditem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/wghtitem.hxx> #include <sfx2/topfrm.hxx> #include <vcl/svapp.hxx> #include <svl/zforlist.hxx> diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx index 0ae728eac..210ff7205 100644 --- a/sc/source/ui/miscdlgs/scuiautofmt.cxx +++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx @@ -36,16 +36,16 @@ #include "scitems.hxx" #include <svx/algitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/brshitem.hxx> -#include <svx/cntritem.hxx> -#include <svx/colritem.hxx> -#include <svx/crsditem.hxx> -#include <svx/fontitem.hxx> -#include <svx/postitem.hxx> -#include <svx/shdditem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/wghtitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/cntritem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/crsditem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/shdditem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/wghtitem.hxx> #include <svl/zforlist.hxx> #include <vcl/msgbox.hxx> #include <comphelper/processfactory.hxx> diff --git a/sc/source/ui/miscdlgs/textdlgs.cxx b/sc/source/ui/miscdlgs/textdlgs.cxx index b6bc86aa6..7c48cf288 100644 --- a/sc/source/ui/miscdlgs/textdlgs.cxx +++ b/sc/source/ui/miscdlgs/textdlgs.cxx @@ -39,7 +39,7 @@ #include <svx/svxids.hrc> //CHINA001 #include <svx/chardlg.hxx> -#include <svx/flstitem.hxx> +#include <editeng/flstitem.hxx> //CHINA001 #include <svx/paragrph.hxx> //CHINA001 #include <svx/tabstpge.hxx> #include <sfx2/objsh.hxx> diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index c704ebcff..5d2ecffba 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -36,7 +36,7 @@ #include <svx/svdpagv.hxx> #include <svx/svdview.hxx> #include <svx/svdxcgv.hxx> -#include <svx/linkmgr.hxx> +#include <sfx2/linkmgr.hxx> #include <sfx2/docfile.hxx> #include <sfx2/viewfrm.hxx> #include <vcl/help.hxx> @@ -827,7 +827,7 @@ void ScContentTree::GetLinkNames() if (!pDoc) return; - SvxLinkManager* pLinkManager = pDoc->GetLinkManager(); + sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); DBG_ASSERT(pLinkManager, "kein LinkManager am Dokument?"); const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); @@ -848,7 +848,7 @@ const ScAreaLink* ScContentTree::GetLink( ULONG nIndex ) return NULL; ULONG nFound = 0; - SvxLinkManager* pLinkManager = pDoc->GetLinkManager(); + sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); DBG_ASSERT(pLinkManager, "kein LinkManager am Dokument?"); const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); USHORT nCount = rLinks.Count(); diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx index cde7fe712..2c897cb51 100644 --- a/sc/source/ui/pagedlg/scuitphfedit.cxx +++ b/sc/source/ui/pagedlg/scuitphfedit.cxx @@ -36,13 +36,13 @@ #define _TPHFEDIT_CXX #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> //CHINA001 #include <svx/chardlg.hxx> -#include <svx/editobj.hxx> -#include <svx/editstat.hxx> -#include <svx/editview.hxx> -#include <svx/flditem.hxx> +#include <editeng/editobj.hxx> +#include <editeng/editstat.hxx> +#include <editeng/editview.hxx> +#include <editeng/flditem.hxx> #include <sfx2/basedlgs.hxx> #include <sfx2/objsh.hxx> #include <vcl/msgbox.hxx> diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx index c026aa719..baaf85e08 100644 --- a/sc/source/ui/pagedlg/tphfedit.cxx +++ b/sc/source/ui/pagedlg/tphfedit.cxx @@ -34,15 +34,15 @@ #define _TPHFEDIT_CXX #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> //CHINA001 #include <svx/chardlg.hxx> -#include <svx/editobj.hxx> -#include <svx/editstat.hxx> -#include <svx/editview.hxx> -#include <svx/flditem.hxx> -#include <svx/adjitem.hxx> +#include <editeng/editobj.hxx> +#include <editeng/editstat.hxx> +#include <editeng/editview.hxx> +#include <editeng/flditem.hxx> +#include <editeng/adjitem.hxx> #include <sfx2/basedlgs.hxx> #include <sfx2/objsh.hxx> #include <vcl/msgbox.hxx> diff --git a/sc/source/ui/styleui/styledlg.cxx b/sc/source/ui/styleui/styledlg.cxx index fb15ea194..6d5c2d336 100644 --- a/sc/source/ui/styleui/styledlg.cxx +++ b/sc/source/ui/styleui/styledlg.cxx @@ -58,7 +58,7 @@ #include <svx/svxids.hrc> //CHINA001 #include <svx/dialogs.hrc> //CHINA001 #include <svl/intitem.hxx> //CHINA001 -#include <svx/flstitem.hxx> //CHINA001 +#include <editeng/flstitem.hxx> //CHINA001 #include <svl/aeitem.hxx> //CHINA001 #include <svx/flagsdef.hxx> //CHINA001 //================================================================== diff --git a/sc/source/ui/undo/areasave.cxx b/sc/source/ui/undo/areasave.cxx index 3dabfb319..77cae60a8 100644 --- a/sc/source/ui/undo/areasave.cxx +++ b/sc/source/ui/undo/areasave.cxx @@ -34,7 +34,7 @@ // INCLUDE --------------------------------------------------------------- -#include <svx/linkmgr.hxx> +#include <sfx2/linkmgr.hxx> #include <tools/debug.hxx> #include "areasave.hxx" @@ -97,7 +97,7 @@ void ScAreaLinkSaver::InsertNewLink( ScDocument* pDoc ) const { // (see ScUndoRemoveAreaLink::Undo) - SvxLinkManager* pLinkManager = pDoc->GetLinkManager(); + sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); SfxObjectShell* pObjSh = pDoc->GetDocumentShell(); if ( pLinkManager && pObjSh ) @@ -137,7 +137,7 @@ BOOL ScAreaLinkSaveCollection::IsEqual( const ScDocument* pDoc ) const // IsEqual can be checked in sequence. // Neither ref-update nor removing links will change the order. - SvxLinkManager* pLinkManager = const_cast<ScDocument*>(pDoc)->GetLinkManager(); + sfx2::LinkManager* pLinkManager = const_cast<ScDocument*>(pDoc)->GetLinkManager(); if (pLinkManager) { USHORT nPos = 0; @@ -183,7 +183,7 @@ void ScAreaLinkSaveCollection::Restore( ScDocument* pDoc ) const // Entries from the save collection must be searched via source data, as the order // of links changes if deleted entries are re-added to the link manager (always at the end). - SvxLinkManager* pLinkManager = pDoc->GetLinkManager(); + sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); if (pLinkManager) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); @@ -205,7 +205,7 @@ ScAreaLinkSaveCollection* ScAreaLinkSaveCollection::CreateFromDoc( const ScDocum { ScAreaLinkSaveCollection* pColl = NULL; - SvxLinkManager* pLinkManager = const_cast<ScDocument*>(pDoc)->GetLinkManager(); + sfx2::LinkManager* pLinkManager = const_cast<ScDocument*>(pDoc)->GetLinkManager(); if (pLinkManager) { const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks(); diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx index 99e8612e4..3798d7f76 100644 --- a/sc/source/ui/undo/undobase.cxx +++ b/sc/source/ui/undo/undobase.cxx @@ -42,6 +42,7 @@ #include "undodraw.hxx" #include "dbcolect.hxx" #include "attrib.hxx" +#include "queryparam.hxx" #include "globstr.hrc" // STATIC DATA ----------------------------------------------------------- diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index ac81ec546..8be395f95 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -37,7 +37,7 @@ #include "scitems.hxx" #include <vcl/virdev.hxx> #include <vcl/waitobj.hxx> -#include <svx/boxitem.hxx> +#include <editeng/boxitem.hxx> #include <sfx2/app.hxx> #include "undoblk.hxx" diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index b3ae2cf1f..b08a6141f 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -31,9 +31,9 @@ // INCLUDE ------------------------------------------------------------------- #include "scitems.hxx" -#include <svx/boxitem.hxx> -#include <svx/srchitem.hxx> -#include <svx/linkmgr.hxx> +#include <editeng/boxitem.hxx> +#include <svl/srchitem.hxx> +#include <sfx2/linkmgr.hxx> #include <sfx2/bindings.hxx> #include <vcl/virdev.hxx> #include <sfx2/app.hxx> @@ -1752,7 +1752,7 @@ BOOL __EXPORT ScUndoRefreshLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const //---------------------------------------------------------------------------- -ScAreaLink* lcl_FindAreaLink( SvxLinkManager* pLinkManager, const String& rDoc, +ScAreaLink* lcl_FindAreaLink( sfx2::LinkManager* pLinkManager, const String& rDoc, const String& rFlt, const String& rOpt, const String& rSrc, const ScRange& rDest ) { @@ -1816,7 +1816,7 @@ String __EXPORT ScUndoInsertAreaLink::GetComment() const void __EXPORT ScUndoInsertAreaLink::Undo() { ScDocument* pDoc = pDocShell->GetDocument(); - SvxLinkManager* pLinkManager = pDoc->GetLinkManager(); + sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); ScAreaLink* pLink = lcl_FindAreaLink( pLinkManager, aDocName, aFltName, aOptions, aAreaName, aRange ); @@ -1832,7 +1832,7 @@ void __EXPORT ScUndoInsertAreaLink::Undo() void __EXPORT ScUndoInsertAreaLink::Redo() { ScDocument* pDoc = pDocShell->GetDocument(); - SvxLinkManager* pLinkManager = pDoc->GetLinkManager(); + sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); ScAreaLink* pLink = new ScAreaLink( pDocShell, aDocName, aFltName, aOptions, aAreaName, aRange.aStart, nRefreshDelay ); @@ -1906,7 +1906,7 @@ String __EXPORT ScUndoRemoveAreaLink::GetComment() const void __EXPORT ScUndoRemoveAreaLink::Undo() { ScDocument* pDoc = pDocShell->GetDocument(); - SvxLinkManager* pLinkManager = pDoc->GetLinkManager(); + sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); ScAreaLink* pLink = new ScAreaLink( pDocShell, aDocName, aFltName, aOptions, aAreaName, aRange.aStart, nRefreshDelay ); @@ -1925,7 +1925,7 @@ void __EXPORT ScUndoRemoveAreaLink::Undo() void __EXPORT ScUndoRemoveAreaLink::Redo() { ScDocument* pDoc = pDocShell->GetDocument(); - SvxLinkManager* pLinkManager = pDoc->GetLinkManager(); + sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); ScAreaLink* pLink = lcl_FindAreaLink( pLinkManager, aDocName, aFltName, aOptions, aAreaName, aRange ); @@ -2071,7 +2071,7 @@ void ScUndoUpdateAreaLink::DoChange( const BOOL bUndo ) const void __EXPORT ScUndoUpdateAreaLink::Undo() { ScDocument* pDoc = pDocShell->GetDocument(); - SvxLinkManager* pLinkManager = pDoc->GetLinkManager(); + sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); ScAreaLink* pLink = lcl_FindAreaLink( pLinkManager, aNewDoc, aNewFlt, aNewOpt, aNewArea, aNewRange ); if (pLink) @@ -2090,7 +2090,7 @@ void __EXPORT ScUndoUpdateAreaLink::Undo() void __EXPORT ScUndoUpdateAreaLink::Redo() { ScDocument* pDoc = pDocShell->GetDocument(); - SvxLinkManager* pLinkManager = pDoc->GetLinkManager(); + sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); ScAreaLink* pLink = lcl_FindAreaLink( pLinkManager, aOldDoc, aOldFlt, aOldOpt, aOldArea, aOldRange ); if (pLink) diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx index c67cdc6e8..f433df5c0 100644 --- a/sc/source/ui/undo/undocell.cxx +++ b/sc/source/ui/undo/undocell.cxx @@ -29,9 +29,9 @@ #include "precompiled_sc.hxx" #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> -#include <svx/editobj.hxx> +#include <editeng/editobj.hxx> #include <svl/zforlist.hxx> #include <sfx2/app.hxx> diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx index f56619734..0a174c00f 100644 --- a/sc/source/ui/unoobj/afmtuno.cxx +++ b/sc/source/ui/unoobj/afmtuno.cxx @@ -31,6 +31,7 @@ #include "scitems.hxx" +#include <editeng/memberids.hrc> #include <tools/debug.hxx> #include <tools/shl.hxx> #include <svl/poolitem.hxx> diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index daea4ed52..4701d06f7 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -30,21 +30,21 @@ #include "scitems.hxx" -#include <svx/eeitem.hxx> - +#include <editeng/eeitem.hxx> +#include <svx/svdpool.hxx> #include <svx/algitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/brshitem.hxx> -#include <svx/editeng.hxx> -#include <svx/flditem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/editeng.hxx> +#include <editeng/flditem.hxx> #include <svx/fmdpage.hxx> -#include <svx/langitem.hxx> -#include <svx/linkmgr.hxx> -#include <svx/srchitem.hxx> +#include <editeng/langitem.hxx> +#include <sfx2/linkmgr.hxx> +#include <svl/srchitem.hxx> #include <svx/unomid.hxx> -#include <svx/unoprnms.hxx> -#include <svx/unotext.hxx> +#include <editeng/unoprnms.hxx> +#include <editeng/unotext.hxx> #include <svx/svdpage.hxx> #include <sfx2/bindings.hxx> #include <svl/zforlist.hxx> @@ -791,7 +791,7 @@ const SfxItemPropertyMapEntry* lcl_GetEditPropertyMap() } const SvxItemPropertySet* lcl_GetEditPropertySet() { - static SvxItemPropertySet aEditPropertySet( lcl_GetEditPropertyMap() ); + static SvxItemPropertySet aEditPropertySet( lcl_GetEditPropertyMap(), SdrObject::GetGlobalDrawObjectItemPool() ); return &aEditPropertySet; } @@ -1123,7 +1123,7 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, { // #87871# accept integer types because Basic passes a floating point // variable as byte, short or long if it's an integer number. - double fVal; + double fVal(0.0); rElement >>= fVal; pDoc->SetValue( nDocCol, nDocRow, nTab, fVal ); } @@ -7678,7 +7678,7 @@ void SAL_CALL ScTableSheetObj::link( const rtl::OUString& aUrl, const rtl::OUStr // Update immer, auch wenn der Link schon da war //! Update nur fuer die betroffene Tabelle??? - SvxLinkManager* pLinkManager = pDoc->GetLinkManager(); + sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); USHORT nCount = pLinkManager->GetLinks().Count(); for ( USHORT i=0; i<nCount; i++ ) { diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 62059739d..d1c3f7b5c 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -2932,6 +2932,9 @@ void ScChart2DataSequence::BuildDataCache() ::std::list<sal_Int32>::const_iterator itr = aHiddenValues.begin(), itrEnd = aHiddenValues.end(); for (;itr != itrEnd; ++itr, ++pArr) *pArr = *itr; + + // Clear the data series cache when the array is re-built. + m_aMixedDataCache.realloc(0); } void ScChart2DataSequence::RebuildDataCache() @@ -3124,7 +3127,6 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint if ( m_bGotDataChangedHint && m_pDocument ) { m_aDataArray.clear(); - m_aDataArray.clear(); lang::EventObject aEvent; aEvent.Source.set((cppu::OWeakObject*)this); @@ -3299,19 +3301,24 @@ uno::Sequence< uno::Any> SAL_CALL ScChart2DataSequence::getData() throw uno::RuntimeException(); BuildDataCache(); - sal_Int32 nCount = m_aDataArray.size(); - uno::Sequence<uno::Any> aSeq(nCount); - uno::Any* pArr = aSeq.getArray(); - ::std::list<Item>::const_iterator itr = m_aDataArray.begin(), itrEnd = m_aDataArray.end(); - for (; itr != itrEnd; ++itr, ++pArr) + + if (!m_aMixedDataCache.getLength()) { - if (itr->mbIsValue) - *pArr <<= itr->mfValue; - else - *pArr <<= itr->maString; - } + // Build a cache for the 1st time... - return aSeq; + sal_Int32 nCount = m_aDataArray.size(); + m_aMixedDataCache.realloc(nCount); + uno::Any* pArr = m_aMixedDataCache.getArray(); + ::std::list<Item>::const_iterator itr = m_aDataArray.begin(), itrEnd = m_aDataArray.end(); + for (; itr != itrEnd; ++itr, ++pArr) + { + if (itr->mbIsValue) + *pArr <<= itr->mfValue; + else + *pArr <<= itr->maString; + } + } + return m_aMixedDataCache; } // XNumericalDataSequence -------------------------------------------------- diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx index baed2d2b9..faa102b80 100644 --- a/sc/source/ui/unoobj/defltuno.cxx +++ b/sc/source/ui/unoobj/defltuno.cxx @@ -29,7 +29,7 @@ #include "precompiled_sc.hxx" - +#include <editeng/memberids.hrc> #include <svl/smplhint.hxx> #include <svl/itemprop.hxx> #include <svx/unomid.hxx> diff --git a/sc/source/ui/unoobj/editsrc.cxx b/sc/source/ui/unoobj/editsrc.cxx index 2b6130dc5..b7adabd64 100644 --- a/sc/source/ui/unoobj/editsrc.cxx +++ b/sc/source/ui/unoobj/editsrc.cxx @@ -31,14 +31,14 @@ #include "editsrc.hxx" #include "scitems.hxx" -#include <svx/eeitem.hxx> -#include <svx/unofored.hxx> +#include <editeng/eeitem.hxx> +#include <editeng/unofored.hxx> #include <svx/svdpage.hxx> #include <svx/svditer.hxx> #include <svx/svdocapt.hxx> -#include <svx/outlobj.hxx> -#include <svx/editobj.hxx> - +#include <editeng/outlobj.hxx> +#include <editeng/editobj.hxx> +#include <editeng/outliner.hxx> #include "textuno.hxx" #include "editutil.hxx" #include "docsh.hxx" diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index 98e98e35a..94e22b67c 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -30,11 +30,11 @@ #include <svl/smplhint.hxx> -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> -#include <svx/editeng.hxx> -#include <svx/editobj.hxx> -#include <svx/flditem.hxx> +#include <editeng/editeng.hxx> +#include <editeng/editobj.hxx> +#include <editeng/flditem.hxx> #include <rtl/uuid.h> #include <com/sun/star/beans/PropertyAttribute.hpp> diff --git a/sc/source/ui/unoobj/forbiuno.cxx b/sc/source/ui/unoobj/forbiuno.cxx index 4b2b14246..6333bafbd 100644 --- a/sc/source/ui/unoobj/forbiuno.cxx +++ b/sc/source/ui/unoobj/forbiuno.cxx @@ -30,7 +30,7 @@ -#include <svx/forbiddencharacterstable.hxx> +#include <editeng/forbiddencharacterstable.hxx> #include "forbiuno.hxx" #include "docsh.hxx" diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx index 69b2a36dd..25558892d 100644 --- a/sc/source/ui/unoobj/funcuno.cxx +++ b/sc/source/ui/unoobj/funcuno.cxx @@ -414,7 +414,7 @@ public: { // #87871# accept integer types because Basic passes a floating point // variable as byte, short or long if it's an integer number. - double fVal; + double fVal(0.0); rElement >>= fVal; visitElem( nCol, nRow, fVal ); } diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index bfbfb34a6..fb7e1f0a6 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -31,7 +31,7 @@ #include <svl/smplhint.hxx> -#include <svx/linkmgr.hxx> +#include <sfx2/linkmgr.hxx> #include "linkuno.hxx" #include "miscuno.hxx" @@ -128,7 +128,7 @@ ScTableLink* ScSheetLinkObj::GetLink_Impl() const { if (pDocShell) { - SvxLinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); + sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); USHORT nCount = pLinkManager->GetLinks().Count(); for (USHORT i=0; i<nCount; i++) { @@ -301,7 +301,7 @@ void ScSheetLinkObj::setFileName(const rtl::OUString& rNewName) ScTableLink* pLink = GetLink_Impl(); if (pLink) { - // pLink->Refresh mit neuem Dateinamen bringt SvxLinkManager durcheinander + // pLink->Refresh mit neuem Dateinamen bringt sfx2::LinkManager durcheinander // darum per Hand die Tabellen umsetzen und Link per UpdateLinks neu erzeugen String aNewStr(ScGlobal::GetAbsDocName( String(rNewName), pDocShell )); @@ -602,7 +602,7 @@ ScAreaLink* lcl_GetAreaLink( ScDocShell* pDocShell, USHORT nPos ) { if (pDocShell) { - SvxLinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); + sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); USHORT nTotalCount = pLinkManager->GetLinks().Count(); USHORT nAreaCount = 0; for (USHORT i=0; i<nTotalCount; i++) @@ -675,7 +675,7 @@ void ScAreaLinkObj::Modify_Impl( const rtl::OUString* pNewFile, const rtl::OUStr //! Undo fuer Loeschen //! Undo zusammenfassen - SvxLinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); + sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); pLinkManager->Remove( pLink ); pLink = NULL; // bei Remove geloescht @@ -1001,7 +1001,7 @@ void SAL_CALL ScAreaLinksObj::removeByIndex( sal_Int32 nIndex ) throw(uno::Runti { //! SetAddUndo oder so - SvxLinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); + sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); pLinkManager->Remove( pLink ); } } @@ -1023,7 +1023,7 @@ sal_Int32 SAL_CALL ScAreaLinksObj::getCount() throw(uno::RuntimeException) INT32 nAreaCount = 0; if (pDocShell) { - SvxLinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); + sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); USHORT nTotalCount = pLinkManager->GetLinks().Count(); for (USHORT i=0; i<nTotalCount; i++) { diff --git a/sc/source/ui/unoobj/notesuno.cxx b/sc/source/ui/unoobj/notesuno.cxx index 38bfaa3bb..a6fa9fe16 100644 --- a/sc/source/ui/unoobj/notesuno.cxx +++ b/sc/source/ui/unoobj/notesuno.cxx @@ -31,8 +31,9 @@ #include "rangelst.hxx" -#include <svx/unotext.hxx> - +#include <editeng/unotext.hxx> +#include <svx/svdpool.hxx> +#include <svx/svdobj.hxx> #include "notesuno.hxx" #include "textuno.hxx" #include "cellsuno.hxx" // getParent @@ -49,7 +50,7 @@ #include "undocell.hxx" #include "unoguard.hxx" #include "userdat.hxx" -#include <svx/outlobj.hxx> +#include <editeng/outlobj.hxx> #include <svx/unoshape.hxx> #include <svx/svdocapt.hxx> #include <svx/svditer.hxx> @@ -67,7 +68,7 @@ const SvxItemPropertySet* lcl_GetAnnotationPropertySet() { {0,0,0,0,0,0} }; - static SvxItemPropertySet aAnnotationPropertySet_Impl( aAnnotationPropertyMap_Impl ); + static SvxItemPropertySet aAnnotationPropertySet_Impl( aAnnotationPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); return &aAnnotationPropertySet_Impl; } diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx index 65fd768d4..733939017 100644 --- a/sc/source/ui/unoobj/servuno.cxx +++ b/sc/source/ui/unoobj/servuno.cxx @@ -33,7 +33,7 @@ #include <tools/debug.hxx> #include <svtools/unoimap.hxx> #include <svx/unofill.hxx> -#include <svx/unonrule.hxx> +#include <editeng/unonrule.hxx> #include <com/sun/star/sheet/XSpreadsheetDocument.hpp> #include "servuno.hxx" @@ -57,9 +57,65 @@ // #100263# Support creation of GraphicObjectResolver and EmbeddedObjectResolver #include <svx/xmleohlp.hxx> #include <svx/xmlgrhlp.hxx> +#include <sfx2/docfile.hxx> +#include <sfx2/docfilt.hxx> +#include <com/sun/star/script/ScriptEventDescriptor.hpp> +#include <com/sun/star/document/XCodeNameQuery.hpp> +#include <com/sun/star/drawing/XDrawPagesSupplier.hpp> +#include <com/sun/star/form/XFormsSupplier.hpp> +#include <svx/unomod.hxx> using namespace ::com::sun::star; +class ScVbaCodeNameProvider : public ::cppu::WeakImplHelper1< document::XCodeNameQuery > +{ +ScDocShell* mpDocShell; +public: + ScVbaCodeNameProvider( ScDocShell* pDocShell ) : mpDocShell( pDocShell ) {} + // XCodeNameQuery + rtl::OUString SAL_CALL getCodeNameForObject( const uno::Reference< uno::XInterface >& xIf ) throw( uno::RuntimeException ) + { + rtl::OUString sCodeName; + if ( mpDocShell ) + { + OSL_TRACE( "*** In ScVbaCodeNameProvider::getCodeNameForObject"); + // need to find the page ( and index ) for this control + uno::Reference< drawing::XDrawPagesSupplier > xSupplier( mpDocShell->GetModel(), uno::UNO_QUERY_THROW ); + uno::Reference< container::XIndexAccess > xIndex( xSupplier->getDrawPages(), uno::UNO_QUERY_THROW ); + sal_Int32 nLen = xIndex->getCount(); + bool bMatched = false; + uno::Sequence< script::ScriptEventDescriptor > aFakeEvents; + for ( sal_Int32 index = 0; index < nLen; ++index ) + { + try + { + uno::Reference< form::XFormsSupplier > xFormSupplier( xIndex->getByIndex( index ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XIndexAccess > xFormIndex( xFormSupplier->getForms(), uno::UNO_QUERY_THROW ); + // get the www-standard container + uno::Reference< container::XIndexAccess > xFormControls( xFormIndex->getByIndex(0), uno::UNO_QUERY_THROW ); + sal_Int32 nCntrls = xFormControls->getCount(); + for( sal_Int32 cIndex = 0; cIndex < nCntrls; ++cIndex ) + { + uno::Reference< uno::XInterface > xControl( xFormControls->getByIndex( cIndex ), uno::UNO_QUERY_THROW ); + bMatched = ( xControl == xIf ); + if ( bMatched ) + { + String sName; + mpDocShell->GetDocument()->GetCodeName( static_cast<SCTAB>( index ), sName ); + sCodeName = sName; + } + } + } + catch( uno::Exception& ) {} + if ( bMatched ) + break; + } + } + // Probably should throw here ( if !bMatched ) + return sCodeName; + } + +}; //------------------------------------------------------------------------ // @@ -116,6 +172,7 @@ static const ProvNamesId_Type __FAR_DATA aProvNamesId[] = { SC_SERVICENAME_CHDATAPROV, SC_SERVICE_CHDATAPROV }, { SC_SERVICENAME_FORMULAPARS, SC_SERVICE_FORMULAPARS }, { SC_SERVICENAME_OPCODEMAPPER, SC_SERVICE_OPCODEMAPPER }, + { "ooo.vba.VBACodeNameProvider", SC_SERVICE_VBACODENAMEPROVIDER }, // case-correct versions of the service names (#i102468#) { "com.sun.star.text.textfield.URL", SC_SERVICE_URLFIELD }, @@ -177,7 +234,8 @@ static const sal_Char* __FAR_DATA aOldNames[SC_SERVICE_COUNT] = "", // SC_SERVICE_SHEETDOCSET "", // SC_SERVICE_CHDATAPROV "", // SC_SERVICE_FORMULAPARS - "" // SC_SERVICE_OPCODEMAPPER + "", // SC_SERVICE_OPCODEMAPPER + "", // SC_SERVICE_VBACODENAMEPROVIDER }; @@ -380,9 +438,23 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance( ScCompiler* pComp = new ScCompiler(pDoc,aAddress); pComp->SetGrammar( pDoc->GetGrammar() ); xRet.set(static_cast<sheet::XFormulaOpCodeMapper*>(new ScFormulaOpCodeMapperObj(::std::auto_ptr<formula::FormulaCompiler> (pComp)))); + break; + } + case SC_SERVICE_VBACODENAMEPROVIDER: + { + // Only create the excel faking service for excel docs + const SfxFilter *pFilt = pDocShell->GetMedium()->GetFilter(); + if ( pFilt && pFilt->IsAlienFormat() ) + { + // application/vnd.ms-excel is the mime type for Excel + static const rtl::OUString sExcelMimeType( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.ms-excel" ) ); + if ( sExcelMimeType.equals( pFilt->GetMimeType() ) ) + xRet.set(static_cast<document::XCodeNameQuery*>(new ScVbaCodeNameProvider( pDocShell ))); + } + break; } - break; } + return xRet; } diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx index 24ccee9c0..253335403 100644 --- a/sc/source/ui/unoobj/shapeuno.cxx +++ b/sc/source/ui/unoobj/shapeuno.cxx @@ -35,7 +35,7 @@ #include <svtools/unoimap.hxx> #include <svx/svdobj.hxx> #include <svx/unoshape.hxx> -#include <svx/unofield.hxx> +#include <editeng/unofield.hxx> #include <svx/shapepropertynotifier.hxx> #include <toolkit/helper/convert.hxx> #include <cppuhelper/implbase2.hxx> diff --git a/sc/source/ui/unoobj/srchuno.cxx b/sc/source/ui/unoobj/srchuno.cxx index efccc90d5..15f45ce70 100644 --- a/sc/source/ui/unoobj/srchuno.cxx +++ b/sc/source/ui/unoobj/srchuno.cxx @@ -31,7 +31,7 @@ #include "scitems.hxx" -#include <svx/srchitem.hxx> +#include <svl/srchitem.hxx> #include <osl/mutex.hxx> #include <rtl/uuid.h> diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index a2e7cf6b1..3ddccdb5b 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -31,14 +31,15 @@ #include "scitems.hxx" +#include <editeng/memberids.hrc> #include <svx/algitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/langitem.hxx> -#include <svx/numitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/langitem.hxx> +#include <editeng/numitem.hxx> #include <svx/pageitem.hxx> -#include <svx/pbinitem.hxx> +#include <editeng/pbinitem.hxx> #include <svx/unomid.hxx> -#include <svx/unonrule.hxx> +#include <editeng/unonrule.hxx> #include <sfx2/bindings.hxx> #include <sfx2/printer.hxx> #include <vcl/virdev.hxx> diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index ebc253cdb..e8e1295c8 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -31,21 +31,21 @@ #include "scitems.hxx" -#include <svx/eeitem.hxx> - - -#include <svx/editeng.hxx> -#include <svx/editobj.hxx> -#include <svx/flditem.hxx> +#include <editeng/eeitem.hxx> +#include <svx/svdpool.hxx> +#include <svx/svdobj.hxx> +#include <editeng/editeng.hxx> +#include <editeng/editobj.hxx> +#include <editeng/flditem.hxx> #include <svx/unomid.hxx> -#include <svx/unoprnms.hxx> -#include <svx/unofored.hxx> +#include <editeng/unoprnms.hxx> +#include <editeng/unofored.hxx> #include <rtl/uuid.h> #include <vcl/virdev.hxx> #include <com/sun/star/awt/FontSlant.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> - +#include <editeng/unoipset.hxx> #include "textuno.hxx" #include "fielduno.hxx" #include "servuno.hxx" @@ -97,7 +97,7 @@ const SvxItemPropertySet * lcl_GetHdFtPropertySet() } bTwipsSet = TRUE; } - static SvxItemPropertySet aHdFtPropertySet_Impl( aHdFtPropertyMap_Impl ); + static SvxItemPropertySet aHdFtPropertySet_Impl( aHdFtPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); return &aHdFtPropertySet_Impl; } diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index b8e2254af..6617b4e63 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -29,7 +29,7 @@ #include "precompiled_sc.hxx" - +#include <editeng/outliner.hxx> #include <svx/fmdpage.hxx> #include <svx/svditer.hxx> #include <svx/svdmark.hxx> diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 6b6b55e5e..cec0626f0 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -118,7 +118,7 @@ #include <ooo/vba/excel/XlSearchDirection.hpp> #include <scitems.hxx> -#include <svx/srchitem.hxx> +#include <svl/srchitem.hxx> #include <cellsuno.hxx> #include <dbcolect.hxx> #include "docfunc.hxx" diff --git a/sc/source/ui/view/auditsh.cxx b/sc/source/ui/view/auditsh.cxx index 2753c3844..ab2159b50 100644 --- a/sc/source/ui/view/auditsh.cxx +++ b/sc/source/ui/view/auditsh.cxx @@ -33,7 +33,7 @@ //------------------------------------------------------------------ #include "scitems.hxx" -#include <svx/srchitem.hxx> +#include <svl/srchitem.hxx> #include <sfx2/bindings.hxx> #include <sfx2/objface.hxx> #include <sfx2/objsh.hxx> diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index 83ae5fbe9..172b6e6ca 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -46,7 +46,7 @@ #include <sfx2/request.hxx> #include <sfx2/viewfrm.hxx> #include <svx/clipfmtitem.hxx> -#include <svx/langitem.hxx> +#include <editeng/langitem.hxx> #include "cellsh.hxx" #include "sc.hrc" diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 90f75c08a..4171fdd73 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -62,7 +62,7 @@ #include <svx/svxdlg.hxx> #include <sot/formats.hxx> #include <svx/postattr.hxx> -#include <svx/fontitem.hxx> +#include <editeng/fontitem.hxx> #include <svx/clipfmtitem.hxx> #include <sfx2/passwd.hxx> #include <svx/hlnkitem.hxx> diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index 7cf4a000e..21c8c0fff 100644 --- a/sc/source/ui/view/drawview.cxx +++ b/sc/source/ui/view/drawview.cxx @@ -41,8 +41,8 @@ #include <svx/svdpage.hxx> #include <svx/svdundo.hxx> #include <svx/svdocapt.hxx> -#include <svx/outlobj.hxx> -#include <svx/writingmodeitem.hxx> +#include <editeng/outlobj.hxx> +#include <editeng/writingmodeitem.hxx> #include <svx/sdrpaintwindow.hxx> #include <sfx2/bindings.hxx> #include <sfx2/viewfrm.hxx> diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 624c6b6dc..152b767f0 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -33,25 +33,25 @@ //------------------------------------------------------------------ #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svx/clipfmtitem.hxx> #include <svx/svxdlg.hxx> -#include <svx/cntritem.hxx> +#include <editeng/cntritem.hxx> //CHINA001 #include <svx/chardlg.hxx> -#include <svx/crsditem.hxx> -#include <svx/editeng.hxx> -#include <svx/editview.hxx> -#include <svx/escpitem.hxx> -#include <svx/flditem.hxx> -#include <svx/fontitem.hxx> +#include <editeng/crsditem.hxx> +#include <editeng/editeng.hxx> +#include <editeng/editview.hxx> +#include <editeng/escpitem.hxx> +#include <editeng/flditem.hxx> +#include <editeng/fontitem.hxx> #include <svx/hlnkitem.hxx> -#include <svx/postitem.hxx> -#include <svx/scripttypeitem.hxx> -#include <svx/shdditem.hxx> -#include <svx/srchitem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/wghtitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/scripttypeitem.hxx> +#include <editeng/shdditem.hxx> +#include <svl/srchitem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/wghtitem.hxx> #include <sfx2/basedlgs.hxx> #include <sfx2/bindings.hxx> #include <sfx2/msg.hxx> diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index fdbee1444..9f6bf0d13 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -51,7 +51,7 @@ //------------------------------------------------------------------ #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <sfx2/app.hxx> #include <sfx2/viewfrm.hxx> @@ -64,24 +64,24 @@ #include <svl/stritem.hxx> #include <svl/zformat.hxx> #include <svl/languageoptions.hxx> -#include <svx/boxitem.hxx> -#include <svx/langitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/langitem.hxx> #include <svx/numinf.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/templdlg.hxx> #include <sfx2/tplpitem.hxx> -#include <svx/svxenum.hxx> +#include <editeng/svxenum.hxx> #include <svx/algitem.hxx> -#include <svx/wghtitem.hxx> -#include <svx/postitem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/bolnitem.hxx> -#include <svx/colritem.hxx> -#include <svx/brshitem.hxx> -#include <svx/frmdiritem.hxx> -#include <svx/scripttypeitem.hxx> +#include <editeng/wghtitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/bolnitem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/frmdiritem.hxx> +#include <editeng/scripttypeitem.hxx> #include <svtools/colorcfg.hxx> -#include <svx/shaditem.hxx> +#include <editeng/shaditem.hxx> #include "formatsh.hxx" #include "sc.hrc" diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 10a4c81ed..5411d0469 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -31,14 +31,14 @@ #include "scitems.hxx" #include <memory> //auto_ptr -#include <svx/adjitem.hxx> +#include <editeng/adjitem.hxx> #include <svx/algitem.hxx> #include <svx/dbexch.hrc> -#include <svx/editview.hxx> -#include <svx/editstat.hxx> -#include <svx/flditem.hxx> +#include <editeng/editview.hxx> +#include <editeng/editstat.hxx> +#include <editeng/flditem.hxx> #include <svx/svdetc.hxx> -#include <svx/editobj.hxx> +#include <editeng/editobj.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/docfile.hxx> @@ -55,7 +55,7 @@ #include <sot/clsids.hxx> #include <svx/svdview.hxx> // fuer Command-Handler (COMMAND_INSERTTEXT) -#include <svx/outliner.hxx> // fuer Command-Handler (COMMAND_INSERTTEXT) +#include <editeng/outliner.hxx> // fuer Command-Handler (COMMAND_INSERTTEXT) #include <svx/svditer.hxx> #include <svx/svdocapt.hxx> #include <svx/svdpagv.hxx> diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx index e0813cac8..003ff5121 100755..100644 --- a/sc/source/ui/view/gridwin3.cxx +++ b/sc/source/ui/view/gridwin3.cxx @@ -29,12 +29,12 @@ #include "precompiled_sc.hxx" #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svx/svdoutl.hxx> #include <svx/svdotext.hxx> #include <svx/svdpagv.hxx> -#include <svx/sizeitem.hxx> +#include <editeng/sizeitem.hxx> #include <sfx2/bindings.hxx> #include <svl/ptitem.hxx> diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 216ab426b..2dbe364ba 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -33,14 +33,14 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svtools/colorcfg.hxx> -#include <svx/colritem.hxx> -#include <svx/editview.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/scripttypeitem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/editview.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/scripttypeitem.hxx> #include <sfx2/bindings.hxx> #include <sfx2/printer.hxx> @@ -71,6 +71,7 @@ #include "inputopt.hxx" #include "fillinfo.hxx" #include "dpcontrol.hxx" +#include "queryparam.hxx" #include "sc.hrc" #include <vcl/virdev.hxx> diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx index 78ccdc23a..821d5da30 100644 --- a/sc/source/ui/view/gridwin5.cxx +++ b/sc/source/ui/view/gridwin5.cxx @@ -30,11 +30,11 @@ // INCLUDE --------------------------------------------------------------- -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> -#include <svx/flditem.hxx> +#include <editeng/flditem.hxx> -#include <svx/editview.hxx> +#include <editeng/editview.hxx> #include <svx/svdobj.hxx> #include <svx/svdpagv.hxx> #include <svtools/imapobj.hxx> diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index f0242deaa..daaad2538 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -33,13 +33,13 @@ #include <com/sun/star/embed/EmbedMisc.hpp> #include "scitems.hxx" -#include <svx/boxitem.hxx> -#include <svx/brshitem.hxx> -#include <svx/editdata.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/editdata.hxx> #include <svtools/colorcfg.hxx> #include <svx/rotmodit.hxx> -#include <svx/shaditem.hxx> -#include <svx/svxfont.hxx> +#include <editeng/shaditem.hxx> +#include <editeng/svxfont.hxx> #include <svx/svdoole2.hxx> #include <tools/poly.hxx> #include <vcl/svapp.hxx> diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 9d30c90f0..03c193b42 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -34,24 +34,24 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> -#include <svx/adjitem.hxx> +#include <editeng/adjitem.hxx> #include <svx/algitem.hxx> -#include <svx/brshitem.hxx> +#include <editeng/brshitem.hxx> #include <svtools/colorcfg.hxx> -#include <svx/colritem.hxx> -#include <svx/editobj.hxx> -#include <svx/editstat.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/forbiddencharacterstable.hxx> -#include <svx/frmdiritem.hxx> -#include <svx/langitem.hxx> +#include <editeng/colritem.hxx> +#include <editeng/editobj.hxx> +#include <editeng/editstat.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/forbiddencharacterstable.hxx> +#include <editeng/frmdiritem.hxx> +#include <editeng/langitem.hxx> #include <svx/rotmodit.hxx> -#include <svx/scripttypeitem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/unolingu.hxx> +#include <editeng/scripttypeitem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/unolingu.hxx> #include <svl/zforlist.hxx> #include <vcl/svapp.hxx> #include <vcl/metric.hxx> diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx index 7b65ebfd4..953e648e0 100755..100644 --- a/sc/source/ui/view/output3.cxx +++ b/sc/source/ui/view/output3.cxx @@ -32,7 +32,7 @@ // INCLUDE --------------------------------------------------------------- -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svx/svdograf.hxx> #include <svx/svdoole2.hxx> #include <svx/svdoutl.hxx> diff --git a/sc/source/ui/view/pgbrksh.cxx b/sc/source/ui/view/pgbrksh.cxx index 31b4efcf3..472d3457d 100644 --- a/sc/source/ui/view/pgbrksh.cxx +++ b/sc/source/ui/view/pgbrksh.cxx @@ -33,7 +33,7 @@ //------------------------------------------------------------------ #include "scitems.hxx" -#include <svx/srchitem.hxx> +#include <svl/srchitem.hxx> #include <sfx2/app.hxx> #include <sfx2/objface.hxx> #include <sfx2/objsh.hxx> diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx index 73ec29bfa..82f0c62da 100644 --- a/sc/source/ui/view/pivotsh.cxx +++ b/sc/source/ui/view/pivotsh.cxx @@ -33,7 +33,7 @@ //------------------------------------------------------------------ #include "scitems.hxx" -#include <svx/srchitem.hxx> +#include <svl/srchitem.hxx> #include <sfx2/app.hxx> #include <sfx2/objface.hxx> #include <sfx2/objsh.hxx> diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index 842171f3e..f96aa09cd 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -33,12 +33,12 @@ // INCLUDE --------------------------------------------------------------- #include <tools/pstm.hxx> #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svtools/colorcfg.hxx> #include <svx/fmview.hxx> -#include <svx/sizeitem.hxx> +#include <editeng/sizeitem.hxx> #include <svx/svdpagv.hxx> #include <sfx2/bindings.hxx> #include <sfx2/viewfrm.hxx> @@ -65,9 +65,9 @@ #include "AccessibleDocumentPagePreview.hxx" #include <vcl/lineinfo.hxx> #include <svx/algitem.hxx> -#include <svx/lrspitem.hxx> -#include <svx/ulspitem.hxx> -#include <svx/sizeitem.hxx> +#include <editeng/lrspitem.hxx> +#include <editeng/ulspitem.hxx> +#include <editeng/sizeitem.hxx> #include "attrib.hxx" #include "pagepar.hxx" #include <com/sun/star/accessibility/XAccessible.hpp> diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 64971db77..5f789034f 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -33,11 +33,11 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <sfx2/app.hxx> -#include <svx/sizeitem.hxx> -#include <svx/srchitem.hxx> +#include <editeng/sizeitem.hxx> +#include <svl/srchitem.hxx> #include <svx/zoomslideritem.hxx> #include <svx/svdview.hxx> //CHINA001 #include <svx/zoom.hxx> diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index b55b674df..9e1d6539d 100755..100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -31,25 +31,25 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include "printfun.hxx" #include <svx/svxids.hrc> -#include <svx/adjitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/brshitem.hxx> +#include <editeng/adjitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/brshitem.hxx> #include <svtools/colorcfg.hxx> -#include <svx/editstat.hxx> // EE_CNTRL_RTFSTYLESHEETS +#include <editeng/editstat.hxx> // EE_CNTRL_RTFSTYLESHEETS #include <svx/fmview.hxx> -#include <svx/frmdiritem.hxx> -#include <svx/lrspitem.hxx> -#include <svx/paperinf.hxx> -#include <svx/pbinitem.hxx> -#include <svx/shaditem.hxx> -#include <svx/sizeitem.hxx> +#include <editeng/frmdiritem.hxx> +#include <editeng/lrspitem.hxx> +#include <editeng/paperinf.hxx> +#include <editeng/pbinitem.hxx> +#include <editeng/shaditem.hxx> +#include <editeng/sizeitem.hxx> #include <svx/svdpagv.hxx> -#include <svx/ulspitem.hxx> +#include <editeng/ulspitem.hxx> #include <sfx2/app.hxx> #include <sfx2/printer.hxx> #include <sfx2/progress.hxx> diff --git a/sc/source/ui/view/selectionstate.cxx b/sc/source/ui/view/selectionstate.cxx index 488879d95..43ef60b3e 100644 --- a/sc/source/ui/view/selectionstate.cxx +++ b/sc/source/ui/view/selectionstate.cxx @@ -29,7 +29,7 @@ #include "precompiled_sc.hxx" #include "selectionstate.hxx" -#include <svx/editview.hxx> +#include <editeng/editview.hxx> #include "viewdata.hxx" // ============================================================================ diff --git a/sc/source/ui/view/spelldialog.cxx b/sc/source/ui/view/spelldialog.cxx index 03c9e96ef..116194b60 100644 --- a/sc/source/ui/view/spelldialog.cxx +++ b/sc/source/ui/view/spelldialog.cxx @@ -33,9 +33,9 @@ #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> #include <svx/svxids.hrc> -#include <svx/editstat.hxx> -#include <svx/editview.hxx> -#include <svx/unolingu.hxx> +#include <editeng/editstat.hxx> +#include <editeng/editview.hxx> +#include <editeng/unolingu.hxx> #include "selectionstate.hxx" #include "spelleng.hxx" diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx index 595ea9c8d..d336e5bbb 100644 --- a/sc/source/ui/view/spelleng.cxx +++ b/sc/source/ui/view/spelleng.cxx @@ -33,12 +33,12 @@ #include <memory> #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> -#include <svx/langitem.hxx> -#include <svx/editobj.hxx> -#include <svx/editview.hxx> +#include <editeng/langitem.hxx> +#include <editeng/editobj.hxx> +#include <editeng/editview.hxx> #include <sfx2/viewfrm.hxx> #include <vcl/msgbox.hxx> #include <vcl/svapp.hxx> diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx index b13bafe52..445665a1b 100644 --- a/sc/source/ui/view/tabview2.cxx +++ b/sc/source/ui/view/tabview2.cxx @@ -33,7 +33,7 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <vcl/timer.hxx> diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index f6b30cdb3..70e58b3a8 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -35,11 +35,11 @@ // INCLUDE --------------------------------------------------------------- #include <rangelst.hxx> #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> -#include <svx/brshitem.hxx> -#include <svx/editview.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/editview.hxx> #include <svx/fmshell.hxx> #include <svx/svdoole2.hxx> #include <sfx2/bindings.hxx> diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx index b97c820d3..ae98e3e4e 100644 --- a/sc/source/ui/view/tabview5.cxx +++ b/sc/source/ui/view/tabview5.cxx @@ -33,7 +33,7 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svx/fmshell.hxx> diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx index 8951d342b..3f86d81e6 100644 --- a/sc/source/ui/view/tabvwsh.cxx +++ b/sc/source/ui/view/tabvwsh.cxx @@ -36,9 +36,11 @@ #include "scitems.hxx" #include <svx/galbrws.hxx> #include <svx/imapdlg.hxx> -#include <svx/srchitem.hxx> +#include <svl/srchitem.hxx> #include <sfx2/templdlg.hxx> #include <sfx2/objface.hxx> +#include <sfx2/viewfrm.hxx> +#include <sfx2/bindings.hxx> #include <sfx2/app.hxx> #include <avmedia/mediaplayer.hxx> @@ -106,4 +108,9 @@ SFX_IMPL_VIEWFACTORY( ScTabViewShell, ScResId(STR_NONAME) ) //------------------------------------------------------------------ - +IMPL_LINK( ScTabViewShell, HtmlOptionsHdl, void*, EMPTYARG ) +{ + // Invalidierung, falls blinkender Text erlaubt/verboten wurde + GetViewFrame()->GetBindings().Invalidate(SID_DRAW_TEXT_MARQUEE); + return 0; +} diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index a12f31e7e..e4fe8763c 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -33,7 +33,7 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <sfx2/app.hxx> //CHINA001 #include <svx/zoom.hxx> diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 5ff0a9c7c..acbf50365 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -34,15 +34,15 @@ #include <sfx2/topfrm.hxx> #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <sfx2/app.hxx> #include <svx/extrusionbar.hxx> #include <svx/fontworkbar.hxx> -#include <svx/boxitem.hxx> +#include <editeng/boxitem.hxx> #include <svx/fmshell.hxx> -#include <svx/sizeitem.hxx> -#include <svx/boxitem.hxx> +#include <editeng/sizeitem.hxx> +#include <editeng/boxitem.hxx> #include <svx/prtqry.hxx> #include <sfx2/request.hxx> #include <sfx2/printer.hxx> diff --git a/sc/source/ui/view/tabvwsh8.cxx b/sc/source/ui/view/tabvwsh8.cxx index 3cd65d9b2..da9809db7 100644 --- a/sc/source/ui/view/tabvwsh8.cxx +++ b/sc/source/ui/view/tabvwsh8.cxx @@ -33,7 +33,7 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/boxitem.hxx> +#include <editeng/boxitem.hxx> #include "tabvwsh.hxx" #include "document.hxx" diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 963807514..90ccd3845 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -38,9 +38,9 @@ #include <svl/stritem.hxx> #include <svl/whiter.hxx> #include <svl/zformat.hxx> -#include <svx/boxitem.hxx> +#include <editeng/boxitem.hxx> #include <svx/numinf.hxx> -#include <svx/srchitem.hxx> +#include <svl/srchitem.hxx> #include <svx/zoomslideritem.hxx> #include <sfx2/bindings.hxx> #include <sfx2/viewfrm.hxx> diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index 513a3a558..3021e086b 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -54,7 +54,7 @@ #include <svx/svdoole2.hxx> #include <svx/svdouno.hxx> #include <svx/svdview.hxx> -#include <svx/linkmgr.hxx> +#include <sfx2/linkmgr.hxx> #include <svx/fontworkbar.hxx> #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx index cb1642dbc..e2fad3ab5 100644 --- a/sc/source/ui/view/tabvwshe.cxx +++ b/sc/source/ui/view/tabvwshe.cxx @@ -31,13 +31,13 @@ // INCLUDE --------------------------------------------------------------- -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include "scitems.hxx" -#include <svx/editview.hxx> -#include <svx/flditem.hxx> +#include <editeng/editview.hxx> +#include <editeng/flditem.hxx> #include <svx/hlnkitem.hxx> -#include <svx/srchitem.hxx> +#include <svl/srchitem.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/request.hxx> diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 0dc49d8d1..ccc26e6fc 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -33,18 +33,18 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <sfx2/viewfrm.hxx> -#include <svx/adjitem.hxx> +#include <editeng/adjitem.hxx> #include <svx/algitem.hxx> -#include <svx/brshitem.hxx> +#include <editeng/brshitem.hxx> #include <svtools/colorcfg.hxx> -#include <svx/editview.hxx> -#include <svx/editstat.hxx> -#include <svx/outliner.hxx> -#include <svx/unolingu.hxx> +#include <editeng/editview.hxx> +#include <editeng/editstat.hxx> +#include <editeng/outliner.hxx> +#include <editeng/unolingu.hxx> #include <vcl/svapp.hxx> #include <rtl/math.hxx> diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 859453ceb..9e65c5d33 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -33,15 +33,15 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <sfx2/app.hxx> #define _SVSTDARR_STRINGS -#include <svx/boxitem.hxx> -#include <svx/fontitem.hxx> -#include <svx/scripttypeitem.hxx> -#include <svx/srchitem.hxx> -#include <svx/linkmgr.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/scripttypeitem.hxx> +#include <svl/srchitem.hxx> +#include <sfx2/linkmgr.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/docfilt.hxx> #include <sfx2/docfile.hxx> @@ -2405,7 +2405,7 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell, if (bLink) { - SvxLinkManager* pLinkManager = pDoc->GetLinkManager(); + sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); SfxMedium* pMed = pSrcShell->GetMedium(); String aFileName = pMed->GetName(); diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx index c674ddac5..5b997d2e9 100644 --- a/sc/source/ui/view/viewfun4.cxx +++ b/sc/source/ui/view/viewfun4.cxx @@ -33,17 +33,16 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> -#include <svx/editobj.hxx> -#include <svx/editstat.hxx> -#include <svx/editview.hxx> -#include <svx/flditem.hxx> +#include <editeng/editobj.hxx> +#include <editeng/editstat.hxx> +#include <editeng/editview.hxx> +#include <editeng/flditem.hxx> #include <svx/hlnkitem.hxx> -#include <svx/langitem.hxx> +#include <editeng/langitem.hxx> #include <svx/svxerr.hxx> -#include <svx/impgrf.hxx> -#include <svx/unolingu.hxx> +#include <editeng/unolingu.hxx> #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> @@ -673,7 +672,7 @@ BOOL ScViewFunc::PasteFile( const Point& rPos, const String& rFile, BOOL bLink ) USHORT nFilterFormat; Graphic aGraphic; - GraphicFilter* pGraphicFilter = ::GetGrfFilter(); + GraphicFilter* pGraphicFilter = GraphicFilter::GetGraphicFilter(); // GraphicProgress aGraphicProgress(&aGraphicFilter); diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index ed9d6e9db..1ecfd75a8 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -35,15 +35,15 @@ // INCLUDE --------------------------------------------------------------- #include "scitems.hxx" -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <sfx2/app.hxx> #include <svx/algitem.hxx> -#include <svx/boxitem.hxx> -#include <svx/editobj.hxx> -#include <svx/editview.hxx> -#include <svx/langitem.hxx> -#include <svx/scripttypeitem.hxx> +#include <editeng/boxitem.hxx> +#include <editeng/editobj.hxx> +#include <editeng/editview.hxx> +#include <editeng/langitem.hxx> +#include <editeng/scripttypeitem.hxx> #include <sfx2/bindings.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx index 9d832b124..9d46c45b8 100644 --- a/sc/source/ui/view/viewutil.cxx +++ b/sc/source/ui/view/viewutil.cxx @@ -36,10 +36,9 @@ #include <sfx2/bindings.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/dispatch.hxx> -#include <svx/charmap.hxx> -#include <svx/fontitem.hxx> -#include <svx/langitem.hxx> -#include <svx/scripttypeitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/langitem.hxx> +#include <editeng/scripttypeitem.hxx> #include <svl/itempool.hxx> #include <svl/itemset.hxx> #include <svl/cjkoptions.hxx> diff --git a/sc/util/makefile.mk b/sc/util/makefile.mk index 1c3e87774..0635ca473 100644 --- a/sc/util/makefile.mk +++ b/sc/util/makefile.mk @@ -77,8 +77,8 @@ SHL1STDLIBS= \ $(SVTOOLLIB) \ $(SVLLIB) \ $(SVXCORELIB) \ + $(EDITENGLIB) \ $(SVXLIB) \ - $(GOODIESLIB) \ $(BASEGFXLIB) \ $(DRAWINGLAYERLIB) \ $(VCLLIB) \ @@ -183,6 +183,7 @@ SHL6STDLIBS= \ $(SVTOOLLIB) \ $(SVLLIB) \ $(SVXCORELIB) \ + $(EDITENGLIB) \ $(MSFILTERLIB) \ $(SVXLIB) \ $(BASEGFXLIB) \ @@ -211,6 +212,7 @@ DEF8NAME=$(SHL8TARGET) SHL8STDLIBS= \ $(ISCLIB) \ + $(EDITENGLIB) \ $(SVXCORELIB) \ $(SVXLIB) \ $(SFX2LIB) \ @@ -305,6 +307,7 @@ SHL9STDLIBS= \ $(SALLIB)\ $(BASICLIB) \ $(SFXLIB) \ + $(EDITENGLIB) \ $(SVXCORELIB) \ $(SVTOOLLIB) \ $(SVLLIB) \ |