diff options
19 files changed, 107 insertions, 67 deletions
diff --git a/dbaccess/inc/pch/precompiled_dbaccess.hxx b/dbaccess/inc/pch/precompiled_dbaccess.hxx index 2cb5d3309045..099adaf03988 100644 --- a/dbaccess/inc/pch/precompiled_dbaccess.hxx +++ b/dbaccess/inc/pch/precompiled_dbaccess.hxx @@ -473,7 +473,7 @@ #include "svx/dbexch.hrc" #include "svx/dialogs.hrc" #include "svx/globlmn.hrc" -#include "svx/svxenum.hxx" +#include "editeng/svxenum.hxx" #include "svx/svxids.hrc" diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx index 3c590518ac9f..5ade6b687949 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx @@ -63,7 +63,7 @@ #include <vcl/graph.hxx> #endif #ifndef _GRFMGR_HXX -#include <goodies/grfmgr.hxx> +#include <svtools/grfmgr.hxx> #endif #include "callbacks.hxx" #include <memory> diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index e596cf4b6fa2..1b212591bfdd 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -621,6 +621,7 @@ DBG_NAME(SbaXDataBrowserController) //------------------------------------------------------------------------------ SbaXDataBrowserController::SbaXDataBrowserController(const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM) :SbaXDataBrowserController_Base(_rM) + ,m_nRowSetPrivileges(0) ,m_pClipbordNotifier( NULL ) ,m_aAsyncGetCellFocus(LINK(this, SbaXDataBrowserController, OnAsyncGetCellFocus)) ,m_aAsyncDisplayError( LINK( this, SbaXDataBrowserController, OnAsyncDisplayError ) ) @@ -1412,19 +1413,21 @@ void SbaXDataBrowserController::disposing() m_xRowSet = NULL; m_xColumnsSupplier = NULL; m_xLoadable = NULL; + + m_nRowSetPrivileges = 0; } - catch(Exception&) + catch(const Exception&) { - OSL_ENSURE(0,"Exception thrown by dispose"); + DBG_UNHANDLED_EXCEPTION(); } } try { ::comphelper::disposeComponent(m_xParser); } - catch(Exception&) + catch(const Exception&) { - OSL_ENSURE(0,"Exception thrown by dispose"); + DBG_UNHANDLED_EXCEPTION(); } } //------------------------------------------------------------------------------ @@ -1653,21 +1656,39 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const case ID_BROWSER_INSERT_ROW: { // check if it is available - Reference< XPropertySet > xDataSourceSet(getRowSet(), UNO_QUERY); - if (!xDataSourceSet.is()) - break; // no datasource -> no edit mode - - sal_Int32 nDataSourcePrivileges = ::comphelper::getINT32(xDataSourceSet->getPropertyValue(PROPERTY_PRIVILEGES)); - aReturn.bEnabled = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::INSERT) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(::rtl::OUString::createFromAscii("AllowInserts"))); + sal_Bool bInsertPrivilege = ( m_nRowSetPrivileges & Privilege::INSERT) != 0; + sal_Bool bAllowInsertions = sal_True; + try + { + Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW ); + OSL_VERIFY( xRowSetProps->getPropertyValue( ::rtl::OUString::createFromAscii( "AllowInserts" ) ) >>= bAllowInsertions ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + aReturn.bEnabled = bInsertPrivilege && bAllowInsertions; } break; case SID_FM_DELETEROWS: { - Reference< XPropertySet > xFormSet(getRowSet(), UNO_QUERY); - sal_Int32 nCount = ::comphelper::getINT32(xFormSet->getPropertyValue(PROPERTY_ROWCOUNT)); - sal_Bool bNew = sal_False; - xFormSet->getPropertyValue(PROPERTY_ISNEW) >>= bNew; - aReturn.bEnabled = nCount != 0 && !bNew; + // check if it is available + sal_Bool bDeletePrivilege = ( m_nRowSetPrivileges & Privilege::INSERT) != 0; + sal_Bool bAllowDeletions = sal_True; + sal_Int32 nRowCount = 0; + sal_Bool bInsertionRow = sal_False; + try + { + Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW ); + OSL_VERIFY( xRowSetProps->getPropertyValue( ::rtl::OUString::createFromAscii( "AllowDeletes" ) ) >>= bAllowDeletions ); + OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ROWCOUNT ) >>= nRowCount ); + OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ISNEW ) >>= bInsertionRow ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + aReturn.bEnabled = bDeletePrivilege && bAllowDeletions && ( nRowCount != 0 ) && !bInsertionRow; } break; @@ -2698,14 +2719,28 @@ void SbaXDataBrowserController::criticalFail() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::criticalFail" ); InvalidateAll(); + m_nRowSetPrivileges = 0; } //------------------------------------------------------------------------------ void SbaXDataBrowserController::LoadFinished(sal_Bool /*bWasSynch*/) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaui", "Ocke.Janssen@sun.com", "SbaXDataBrowserController::LoadFinished" ); + m_nRowSetPrivileges = 0; + if (isValid() && !loadingCancelled()) { + // obtain cached values + try + { + Reference< XPropertySet > xFormProps( m_xLoadable, UNO_QUERY_THROW ); + OSL_VERIFY( xFormProps->getPropertyValue( PROPERTY_PRIVILEGES ) >>= m_nRowSetPrivileges ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + // -------------------------------- // switch the control to alive mode getBrowserView()->getGridControl()->setDesignMode(sal_False); diff --git a/dbaccess/source/ui/inc/FieldDescriptions.hxx b/dbaccess/source/ui/inc/FieldDescriptions.hxx index 57134d85dab9..5bac9873e921 100644 --- a/dbaccess/source/ui/inc/FieldDescriptions.hxx +++ b/dbaccess/source/ui/inc/FieldDescriptions.hxx @@ -31,7 +31,7 @@ #include "QEnumTypes.hxx" #endif #ifndef _SVX_SVXENUM_HXX -#include <svx/svxenum.hxx> +#include <editeng/svxenum.hxx> #endif #ifndef DBAUI_TYPEINFO_HXX #include "TypeInfo.hxx" diff --git a/dbaccess/source/ui/inc/HtmlReader.hxx b/dbaccess/source/ui/inc/HtmlReader.hxx index 4a662de5efb8..18af2d2d9e4f 100644 --- a/dbaccess/source/ui/inc/HtmlReader.hxx +++ b/dbaccess/source/ui/inc/HtmlReader.hxx @@ -34,7 +34,7 @@ #include <svtools/parhtml.hxx> #endif #ifndef _SVX_SVXENUM_HXX -#include <svx/svxenum.hxx> +#include <editeng/svxenum.hxx> #endif #ifndef _STREAM_HXX #include <tools/stream.hxx> diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx index c3ea10335131..df7208aba9b7 100644 --- a/dbaccess/source/ui/inc/UITools.hxx +++ b/dbaccess/source/ui/inc/UITools.hxx @@ -37,7 +37,7 @@ #include "TypeInfo.hxx" #endif #ifndef _SVX_SVXENUM_HXX -#include <svx/svxenum.hxx> +#include <editeng/svxenum.hxx> #endif #ifndef _SV_TASKPANELIST_HXX #include <vcl/taskpanelist.hxx> diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx index 90b62f552a4f..5f079796c899 100644 --- a/dbaccess/source/ui/inc/brwctrlr.hxx +++ b/dbaccess/source/ui/inc/brwctrlr.hxx @@ -102,6 +102,8 @@ namespace dbaui mutable ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer > m_xParser; // for sorting 'n filtering + sal_Int32 m_nRowSetPrivileges; // cached Privileges property of m_xRowSet + AutoTimer m_aInvalidateClipboard; // for testing the state of the CUT/COPY/PASTE-slots TransferableDataHelper m_aSystemClipboard; // content of the clipboard diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index f53f84082ed9..0e949c975065 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -58,7 +58,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <vcl/outdev.hxx> #include <svtools/rtfout.hxx> -#include <svx/htmlcfg.hxx> +#include <svtools/htmlcfg.hxx> #include <connectivity/formattedcolumnvalue.hxx> #include <unotools/syslocale.hxx> #include <comphelper/componentcontext.hxx> diff --git a/dbaccess/util/makefile.mk b/dbaccess/util/makefile.mk index ece74d1ac374..55a267ed216a 100644 --- a/dbaccess/util/makefile.mk +++ b/dbaccess/util/makefile.mk @@ -116,7 +116,6 @@ SHL2STDLIBS= \ $(FWELIB) \ $(TKLIB) \ $(VCLLIB) \ - $(GOODIESLIB) \ $(SVLLIB) \ $(SOTLIB) \ $(UNOTOOLSLIB) \ diff --git a/reportdesign/source/core/api/ReportComponent.cxx b/reportdesign/source/core/api/ReportComponent.cxx index 20a2e4bbfdbd..f9ab9471ce3b 100644 --- a/reportdesign/source/core/api/ReportComponent.cxx +++ b/reportdesign/source/core/api/ReportComponent.cxx @@ -40,7 +40,7 @@ #include <com/sun/star/text/ParagraphVertAlign.hpp> #include <com/sun/star/style/ParagraphAdjust.hpp> #include <com/sun/star/i18n/ScriptType.hpp> -#include <svx/unolingu.hxx> +#include <editeng/unolingu.hxx> #include <unotools/syslocale.hxx> #include <unotools/lingucfg.hxx> #include <i18npool/mslangid.hxx> diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index e2d58f7b2e8d..0c9bb751583f 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -111,7 +111,7 @@ #include <unotools/moduleoptions.hxx> #include <osl/thread.hxx> -#include <svx/paperinf.hxx> +#include <editeng/paperinf.hxx> #include <svx/svdlayer.hxx> #include <svx/xmleohlp.hxx> #include <svx/xmlgrhlp.hxx> diff --git a/reportdesign/source/ui/dlg/dlgpage.cxx b/reportdesign/source/ui/dlg/dlgpage.cxx index 8d3d230e887d..0f6d328de729 100644 --- a/reportdesign/source/ui/dlg/dlgpage.cxx +++ b/reportdesign/source/ui/dlg/dlgpage.cxx @@ -31,7 +31,7 @@ #include <svx/tabarea.hxx> #include <svx/flagsdef.hxx> #include <svx/svxdlg.hxx> -#include <svx/svxenum.hxx> +#include <editeng/svxenum.hxx> #include "dlgpage.hxx" #include "ModuleHelper.hxx" #include "RptResId.hrc" diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index 2d1dfcccd24a..cc4a4d709941 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -108,7 +108,7 @@ #define ITEMID_LINEEND_LIST SID_LINEEND_LIST #include <svx/drawitem.hxx> #define ITEMID_BRUSH SID_ATTR_BRUSH -#include <svx/brshitem.hxx> +#include <editeng/brshitem.hxx> #include <sfx2/docfilt.hxx> #include "dlgpage.hxx" diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index ee2cab9b0a93..209017ed062e 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -43,36 +43,37 @@ #include <com/sun/star/lang/NullPointerException.hpp> #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> +#include <svx/svdpool.hxx> -#include <svx/charscaleitem.hxx> +#include <editeng/charscaleitem.hxx> #include <svx/algitem.hxx> #include <svx/svdpagv.hxx> #include <svx/xtable.hxx> // XColorTable -#include <svx/brshitem.hxx> -#include <svx/fontitem.hxx> -#include <svx/emphitem.hxx> -#include <svx/postitem.hxx> -#include <svx/udlnitem.hxx> -#include <svx/crsditem.hxx> -#include <svx/cntritem.hxx> -#include <svx/langitem.hxx> -#include <svx/wghtitem.hxx> -#include <svx/fhgtitem.hxx> -#include <svx/shdditem.hxx> -#include <svx/escpitem.hxx> -#include <svx/prszitem.hxx> -#include <svx/wrlmitem.hxx> -#include <svx/cmapitem.hxx> -#include <svx/kernitem.hxx> -#include <svx/blnkitem.hxx> -#include <svx/flstitem.hxx> -#include <svx/akrnitem.hxx> -#include <svx/colritem.hxx> +#include <editeng/brshitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/emphitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/udlnitem.hxx> +#include <editeng/crsditem.hxx> +#include <editeng/cntritem.hxx> +#include <editeng/langitem.hxx> +#include <editeng/wghtitem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/shdditem.hxx> +#include <editeng/escpitem.hxx> +#include <editeng/prszitem.hxx> +#include <editeng/wrlmitem.hxx> +#include <editeng/cmapitem.hxx> +#include <editeng/kernitem.hxx> +#include <editeng/blnkitem.hxx> +#include <editeng/flstitem.hxx> +#include <editeng/akrnitem.hxx> +#include <editeng/colritem.hxx> #include <svx/drawitem.hxx> -#include <svx/twolinesitem.hxx> -#include <svx/charreliefitem.hxx> -#include <svx/charrotateitem.hxx> -#include <svx/charhiddenitem.hxx> +#include <editeng/twolinesitem.hxx> +#include <editeng/charreliefitem.hxx> +#include <editeng/charrotateitem.hxx> +#include <editeng/charhiddenitem.hxx> #include <svx/xgrscit.hxx> #include <svx/svditer.hxx> #include <svx/xtable.hxx> @@ -270,7 +271,7 @@ namespace { uno::Reference< beans::XPropertySetInfo> xInfo = _xShape->getPropertySetInfo(); SvxUnoPropertyMapProvider aMap; - const SfxItemPropertyMap* pPropertyMap = aMap.GetPropertySet(SVXMAP_CUSTOMSHAPE)->getPropertyMap(); + const SfxItemPropertyMap* pPropertyMap = aMap.GetPropertySet(SVXMAP_CUSTOMSHAPE, SdrObject::GetGlobalDrawObjectItemPool())->getPropertyMap(); PropertyEntryVector_t aPropVector = pPropertyMap->getPropertyEntries(); PropertyEntryVector_t::const_iterator aIt = aPropVector.begin(); while( aIt != aPropVector.end() ) @@ -293,7 +294,7 @@ namespace { const uno::Reference< beans::XPropertySetInfo> xInfo = _xShape->getPropertySetInfo(); SvxUnoPropertyMapProvider aMap; - const SfxItemPropertyMap* pPropertyMap = aMap.GetPropertySet(SVXMAP_CUSTOMSHAPE)->getPropertyMap(); + const SfxItemPropertyMap* pPropertyMap = aMap.GetPropertySet(SVXMAP_CUSTOMSHAPE, SdrObject::GetGlobalDrawObjectItemPool())->getPropertyMap(); PropertyEntryVector_t aPropVector = pPropertyMap->getPropertyEntries(); PropertyEntryVector_t::const_iterator aIt = aPropVector.begin(); while( aIt != aPropVector.end() ) diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx index 3cb8c4d65e2f..cf5561ba4758 100644 --- a/reportdesign/source/ui/misc/toolboxcontroller.cxx +++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx @@ -48,10 +48,10 @@ #define ITEMID_BRUSH 2 #define ITEMID_FONT 3 #define ITEMID_FONTHEIGHT 4 -#include <svx/fontitem.hxx> -#include <svx/fhgtitem.hxx> +#include <editeng/fontitem.hxx> +#include <editeng/fhgtitem.hxx> #include <svx/tbcontrl.hxx> -#include <svx/colritem.hxx> +#include <editeng/colritem.hxx> #include <svx/tbxcustomshapes.hxx> #include <comphelper/sequence.hxx> diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 6d0152b1deb9..fe6c10af0418 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -105,18 +105,18 @@ #include <vcl/waitobj.hxx> #include <svx/fmview.hxx> -#include <svx/paperinf.hxx> +#include <editeng/paperinf.hxx> #include <svx/svxids.hrc> #include <svx/svdobj.hxx> #include <svx/dataaccessdescriptor.hxx> -#include <svx/svxenum.hxx> +#include <editeng/svxenum.hxx> #include <svx/pageitem.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 <svx/zoomitem.hxx> #include <svx/zoomslideritem.hxx> -#include <svx/brshitem.hxx> +#include <editeng/brshitem.hxx> #include <svx/flagsdef.hxx> //CHINA001 #include <svx/svdpagv.hxx> #include <svx/svxdlg.hxx> diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index eac0e2fd785b..04222d6e2f1e 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -38,8 +38,8 @@ #include "ViewsWindow.hxx" #include <svx/svdpagv.hxx> -#include <svx/eeitemid.hxx> -#include <svx/adjitem.hxx> +#include <editeng/eeitemid.hxx> +#include <editeng/adjitem.hxx> #include <svx/sdrpaintwindow.hxx> #include <svx/unoshape.hxx> #include <svx/gallery.hxx> diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index 51ea2fec4009..1535ce7d6ee1 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -34,10 +34,10 @@ #include <svx/svdview.hxx> #include <svx/svdpagv.hxx> -#include <svx/outlobj.hxx> -#include <svx/unolingu.hxx> +#include <editeng/outlobj.hxx> +#include <editeng/unolingu.hxx> #include <svx/svdetc.hxx> -#include <svx/editstat.hxx> +#include <editeng/editstat.hxx> #include <svx/svdoutl.hxx> #include <svx/svddrgmt.hxx> #include <svx/svdoashp.hxx> diff --git a/reportdesign/util/makefile.mk b/reportdesign/util/makefile.mk index 4b1628b6518b..3a0e89134ddf 100644 --- a/reportdesign/util/makefile.mk +++ b/reportdesign/util/makefile.mk @@ -52,6 +52,7 @@ LIB1FILES=\ SHL1TARGET=$(TARGET)$(DLLPOSTFIX) SHL1STDLIBS= \ + $(EDITENGLIB) \ $(SVXCORELIB) \ $(SVXLIB) \ $(FWELIB) \ @@ -111,6 +112,7 @@ LIB2FILES=\ SHL2TARGET=$(TARGET2)$(DLLPOSTFIX) SHL2STDLIBS= \ + $(EDITENGLIB) \ $(SVXCORELIB) \ $(SVXLIB) \ $(SFXLIB) \ @@ -186,6 +188,7 @@ LIB3FILES=\ SHL3TARGET=$(TARGET3)$(DLLPOSTFIX) SHL3STDLIBS=\ + $(EDITENGLIB) \ $(SVXCORELIB) \ $(XMLOFFLIB) \ $(VCLLIB) \ |