diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-02-19 13:52:10 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-02-19 13:52:10 +0100 |
commit | 4107ff94b0446bca97e03dfbcc4db3654b9b9118 (patch) | |
tree | e5d0c9fad2118b6c34da67ff495421b2df862cbe | |
parent | 15649b045dfbd4b0adc6f270fc53352119ae021b (diff) | |
parent | 9c5f039ce227402f6cb1e133368c5b63e5ab3757 (diff) |
Automated merge with ssh://hg@hg.services.openoffice.org/cws/dba33e
-rwxr-xr-x | canvas/source/directx/dx_5rm.cxx | 2 | ||||
-rwxr-xr-x | canvas/source/directx/dx_9rm.cxx | 2 | ||||
-rwxr-xr-x | canvas/source/directx/dx_canvashelper_texturefill.cxx | 2 | ||||
-rw-r--r-- | canvas/source/vcl/canvashelper.cxx | 2 | ||||
-rw-r--r-- | comphelper/inc/comphelper/namedvaluecollection.hxx | 7 | ||||
-rw-r--r-- | comphelper/source/misc/namedvaluecollection.cxx | 9 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/implrenderer.cxx | 30 | ||||
-rw-r--r-- | svl/inc/svl/smplhint.hxx | 10 | ||||
-rw-r--r-- | svl/source/notify/makefile.mk | 1 | ||||
-rw-r--r-- | svtools/source/contnr/templwin.cxx | 21 | ||||
-rw-r--r-- | svtools/source/control/inettbc.cxx | 1 | ||||
-rw-r--r-- | svtools/source/dialogs/addresstemplate.cxx | 2 | ||||
-rw-r--r-- | tools/inc/tools/diagnose_ex.h | 23 | ||||
-rw-r--r-- | unotools/inc/unotools/saveopt.hxx | 4 | ||||
-rw-r--r-- | unotools/source/config/saveopt.cxx | 60 |
15 files changed, 70 insertions, 106 deletions
diff --git a/canvas/source/directx/dx_5rm.cxx b/canvas/source/directx/dx_5rm.cxx index 4937934732cd..71c65feb3b6f 100755 --- a/canvas/source/directx/dx_5rm.cxx +++ b/canvas/source/directx/dx_5rm.cxx @@ -1008,7 +1008,7 @@ namespace dxcanvas break; default: - ENSURE_OR_RETURN(false, + ENSURE_OR_RETURN_FALSE(false, "DXSurface::update(): Unknown/unimplemented buffer format" ); break; } diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx index acef323ddc1b..a50d0d5abeb7 100755 --- a/canvas/source/directx/dx_9rm.cxx +++ b/canvas/source/directx/dx_9rm.cxx @@ -544,7 +544,7 @@ namespace dxcanvas break; default: - ENSURE_OR_RETURN(false, + ENSURE_OR_RETURN_FALSE(false, "DXSurface::update(): Unknown/unimplemented buffer format" ); break; } diff --git a/canvas/source/directx/dx_canvashelper_texturefill.cxx b/canvas/source/directx/dx_canvashelper_texturefill.cxx index 73a2d49bfb62..f5836e56d668 100755 --- a/canvas/source/directx/dx_canvashelper_texturefill.cxx +++ b/canvas/source/directx/dx_canvashelper_texturefill.cxx @@ -345,7 +345,7 @@ namespace dxcanvas GraphicsPathSharedPtr pGradientPath( tools::graphicsPathFromB2DPolygon( rValues.maGradientPoly ) ); - ENSURE_OR_RETURN( pGradientPath.get(), + ENSURE_OR_RETURN_FALSE( pGradientPath.get(), "ParametricPolyPolygon::fillPolygonalGradient(): Could not clone path" ); PathGradientBrushSharedPtr pGradientBrush; diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index 20b489144d0e..144a41fb0212 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -1390,7 +1390,7 @@ namespace vclcanvas const ::Size& rSz, const GraphicAttr& rAttr ) const { - ENSURE_OR_RETURN( rGrf, + ENSURE_OR_RETURN_FALSE( rGrf, "Invalid Graphic" ); if( !mpOutDev ) diff --git a/comphelper/inc/comphelper/namedvaluecollection.hxx b/comphelper/inc/comphelper/namedvaluecollection.hxx index e84f29f02580..c76f06e99671 100644 --- a/comphelper/inc/comphelper/namedvaluecollection.hxx +++ b/comphelper/inc/comphelper/namedvaluecollection.hxx @@ -64,6 +64,8 @@ namespace comphelper NamedValueCollection( const NamedValueCollection& _rCopySource ); + NamedValueCollection& operator=( const NamedValueCollection& i_rCopySource ); + /** constructs a collection @param _rElements the wrapped elements of the collection. The <code>Any</code> might contain a sequence of @@ -107,6 +109,11 @@ namespace comphelper impl_assign( _rArguments ); } + inline void clear() + { + impl_assign( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >() ); + } + /// returns the number of elements in the collection size_t size() const; diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx index a644b072d303..6278c456e471 100644 --- a/comphelper/source/misc/namedvaluecollection.cxx +++ b/comphelper/source/misc/namedvaluecollection.cxx @@ -88,7 +88,14 @@ namespace comphelper NamedValueCollection::NamedValueCollection( const NamedValueCollection& _rCopySource ) :m_pImpl( new NamedValueCollection_Impl ) { - m_pImpl->aValues = _rCopySource.m_pImpl->aValues; + *this = _rCopySource; + } + + //-------------------------------------------------------------------- + NamedValueCollection& NamedValueCollection::operator=( const NamedValueCollection& i_rCopySource ) + { + m_pImpl->aValues = i_rCopySource.m_pImpl->aValues; + return *this; } //-------------------------------------------------------------------- diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 8ea2ae453a97..0f51216b190e 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -1876,16 +1876,16 @@ namespace cppcanvas ::vcl::unotools::xBitmapFromBitmapEx( rCanvas->getUNOCanvas()->getDevice(), aBmpEx ); - if( aFill.isTiling() )
- {
- aTexture.RepeatModeX = rendering::TexturingMode::REPEAT;
- aTexture.RepeatModeY = rendering::TexturingMode::REPEAT;
- }
- else
- {
- aTexture.RepeatModeX = rendering::TexturingMode::CLAMP;
- aTexture.RepeatModeY = rendering::TexturingMode::CLAMP;
- }
+ if( aFill.isTiling() ) + { + aTexture.RepeatModeX = rendering::TexturingMode::REPEAT; + aTexture.RepeatModeY = rendering::TexturingMode::REPEAT; + } + else + { + aTexture.RepeatModeX = rendering::TexturingMode::CLAMP; + aTexture.RepeatModeY = rendering::TexturingMode::CLAMP; + } ::PolyPolygon aPath; aFill.getPath( aPath ); @@ -2877,7 +2877,7 @@ namespace cppcanvas aSubset.mnSubsetEnd = ::std::min( aRangeBegin->mpAction->getActionCount(), nEndIndex - aRangeBegin->mnOrigIndex ); - ENSURE_OR_RETURN( aSubset.mnSubsetBegin >= 0 && aSubset.mnSubsetEnd >= 0, + ENSURE_OR_RETURN_FALSE( aSubset.mnSubsetBegin >= 0 && aSubset.mnSubsetEnd >= 0, "ImplRenderer::forSubsetRange(): Invalid indices" ); rFunctor( *aRangeBegin, aSubset ); @@ -2893,7 +2893,7 @@ namespace cppcanvas nStartIndex - aRangeBegin->mnOrigIndex ); aSubset.mnSubsetEnd = aRangeBegin->mpAction->getActionCount(); - ENSURE_OR_RETURN( aSubset.mnSubsetBegin >= 0 && aSubset.mnSubsetEnd >= 0, + ENSURE_OR_RETURN_FALSE( aSubset.mnSubsetBegin >= 0 && aSubset.mnSubsetEnd >= 0, "ImplRenderer::forSubsetRange(): Invalid indices" ); rFunctor( *aRangeBegin, aSubset ); @@ -2922,7 +2922,7 @@ namespace cppcanvas aSubset.mnSubsetBegin = 0; aSubset.mnSubsetEnd = nEndIndex - aRangeEnd->mnOrigIndex; - ENSURE_OR_RETURN( aSubset.mnSubsetBegin >= 0 && aSubset.mnSubsetEnd >= 0, + ENSURE_OR_RETURN_FALSE( aSubset.mnSubsetBegin >= 0 && aSubset.mnSubsetEnd >= 0, "ImplRenderer::forSubsetRange(): Invalid indices" ); rFunctor( *aRangeEnd, aSubset ); @@ -2937,10 +2937,10 @@ namespace cppcanvas ActionVector::const_iterator& o_rRangeBegin, ActionVector::const_iterator& o_rRangeEnd ) const { - ENSURE_OR_RETURN( io_rStartIndex<=io_rEndIndex, + ENSURE_OR_RETURN_FALSE( io_rStartIndex<=io_rEndIndex, "ImplRenderer::getSubsetIndices(): invalid action range" ); - ENSURE_OR_RETURN( !maActions.empty(), + ENSURE_OR_RETURN_FALSE( !maActions.empty(), "ImplRenderer::getSubsetIndices(): no actions to render" ); const sal_Int32 nMinActionIndex( maActions.front().mnOrigIndex ); diff --git a/svl/inc/svl/smplhint.hxx b/svl/inc/svl/smplhint.hxx index 089a86dae3f2..f8f4b45375f5 100644 --- a/svl/inc/svl/smplhint.hxx +++ b/svl/inc/svl/smplhint.hxx @@ -42,14 +42,14 @@ #define SFX_HINT_UPDATEDONE 0x00000020 #define SFX_HINT_DEINITIALIZING 0x00000040 #define SFX_HINT_MODECHANGED 0x00000080 -#define SFX_HINT_CANCELLABLE 0x00000100 -#define SFX_HINT_DATAAVAILABLE 0x00000200 -#define SFX_HINT_SAVECOMPLETED 0x00000400 -#define SFX_HINT_RELEASEREF 0x00000800 + // unused, formerly SFX_HINT_CANCELLABLE + // unused, formerly SFX_HINT_DATAAVAILABLE + // unused, formerly SFX_HINT_SAVECOMPLETED + // unused, formerly SFX_HINT_RELEASEREF #define SFX_HINT_COLORS_CHANGED 0x00001000 #define SFX_HINT_CTL_SETTINGS_CHANGED 0x00002000 #define SFX_HINT_ACCESSIBILITY_CHANGED 0x00004000 -#define SFX_HINT_VIEWCREATED 0x00008000 + // unused, formerly SFX_HINT_VIEWCREATED #define SFX_HINT_USER00 0x00010000 #define SFX_HINT_USER01 0x00020000 #define SFX_HINT_USER02 0x00040000 diff --git a/svl/source/notify/makefile.mk b/svl/source/notify/makefile.mk index 0d26860d02b5..58712b93fa9f 100644 --- a/svl/source/notify/makefile.mk +++ b/svl/source/notify/makefile.mk @@ -46,7 +46,6 @@ SLOFILES = \ $(SLO)$/hint.obj \ $(SLO)$/lstner.obj \ $(SLO)$/isethint.obj \ - $(SLO)$/cancel.obj \ $(SLO)$/brdcst.obj \ $(SLO)$/listener.obj \ $(SLO)$/listenerbase.obj \ diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx index 06de35ba19aa..74146d5b2a61 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -1843,26 +1843,7 @@ sal_Bool SvtDocumentTemplateDialog::CanEnableEditBtn() const if ( pImpl->pWin->IsFileSelected() && aFolderURL.getLength() ) { ::rtl::OUString aFileTargetURL = pImpl->pWin->GetSelectedFile(); - ::rtl::OUString aFolderTargetURL; - - ::ucbhelper::Content aFolderContent; - Reference< XCommandEnvironment > xEnv; - if ( ::ucbhelper::Content::create( aFolderURL, xEnv, aFolderContent ) ) - try - { - ::rtl::OUString aTmpURL; - uno::Any aValue = aFolderContent.getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TargetDirURL") ) ); - aValue >>= aTmpURL; - - uno::Reference< util::XOfficeInstallationDirectories > xOffInstDirs = pImpl->getOfficeInstDirs(); - if ( xOffInstDirs.is() ) - aFolderTargetURL = xOffInstDirs->makeAbsoluteURL( aTmpURL ); - } - catch( uno::Exception& ) - {} - - if ( aFolderTargetURL.getLength() && ::utl::UCBContentHelper::IsSubPath( aFolderTargetURL, aFileTargetURL ) ) - bEnable = sal_True; + bEnable = aFileTargetURL.getLength() > 0; } return bEnable; diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index b4904afee418..b00a9b95c1a4 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -69,7 +69,6 @@ #include <unotools/historyoptions.hxx> #include <svl/eitem.hxx> #include <svl/stritem.hxx> -#include <svl/cancel.hxx> #include <svl/itemset.hxx> #include "svl/urihelper.hxx" #include <unotools/pathoptions.hxx> diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index aa18a3683916..ed761194bd3d 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -857,7 +857,7 @@ void AssignmentPersistentData::Commit() m_aDatasource.SaveValue(); // create an interaction handler (may be needed for connecting) - const String sInteractionHandlerServiceName = String::CreateFromAscii("com.sun.star.sdb.InteractionHandler"); + const String sInteractionHandlerServiceName = String::CreateFromAscii("com.sun.star.task.InteractionHandler"); Reference< XInteractionHandler > xHandler; try { diff --git a/tools/inc/tools/diagnose_ex.h b/tools/inc/tools/diagnose_ex.h index 5ca7a71cf62c..0d74195d6437 100644 --- a/tools/inc/tools/diagnose_ex.h +++ b/tools/inc/tools/diagnose_ex.h @@ -121,11 +121,28 @@ ifc ); } /** This macro asserts the given condition (in debug mode), and - returns false afterwards. + returns the given value afterwards. */ -#define ENSURE_OR_RETURN(c, m) if( !(c) ) { \ +#define ENSURE_OR_RETURN(c, m, r) if( !(c) ) { \ OSL_ENSURE(c, m); \ - return false; } + return r; } + +/** This macro asserts the given condition (in debug mode), and + returns false afterwards. + */ +#define ENSURE_OR_RETURN_FALSE(c, m) \ + ENSURE_OR_RETURN(c, m, false) + + +/** This macro asserts the given condition (in debug mode), and + returns afterwards, without return value "void". + */ +#define ENSURE_OR_RETURN_VOID( c, m ) \ + if( !(c) ) \ + { \ + OSL_ENSURE( c, m ); \ + return; \ + } diff --git a/unotools/inc/unotools/saveopt.hxx b/unotools/inc/unotools/saveopt.hxx index bb50cadafb1d..fdb27319e503 100644 --- a/unotools/inc/unotools/saveopt.hxx +++ b/unotools/inc/unotools/saveopt.hxx @@ -49,7 +49,6 @@ public: E_AUTOSAVEPROMPT, E_DOCINFSAVE, E_SAVEWORKINGSET, - E_SAVEDOCWINS, E_SAVEDOCVIEW, E_SAVERELINET, E_SAVERELFSYS, @@ -96,9 +95,6 @@ public: void SetSaveWorkingSet( sal_Bool b ); sal_Bool IsSaveWorkingSet() const; - void SetSaveDocWins( sal_Bool b ); - sal_Bool IsSaveDocWins() const; - void SetSaveDocView( sal_Bool b ); sal_Bool IsSaveDocView() const; diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx index 49e01c0457e9..7c00b35fa14c 100644 --- a/unotools/source/config/saveopt.cxx +++ b/unotools/source/config/saveopt.cxx @@ -76,7 +76,6 @@ class SvtSaveOptions_Impl : public utl::ConfigItem bAutoSavePrompt, bDocInfSave, bSaveWorkingSet, - bSaveDocWins, bSaveDocView, bSaveRelINet, bSaveRelFSys, @@ -92,7 +91,6 @@ class SvtSaveOptions_Impl : public utl::ConfigItem bROAutoSavePrompt, bRODocInfSave, bROSaveWorkingSet, - bROSaveDocWins, bROSaveDocView, bROSaveRelINet, bROSaveRelFSys, @@ -118,7 +116,6 @@ public: BOOL IsAutoSavePrompt() const { return bAutoSavePrompt; } BOOL IsDocInfoSave() const { return bDocInfSave; } BOOL IsSaveWorkingSet() const { return bSaveWorkingSet; } - BOOL IsSaveDocWins() const { return bSaveDocWins; } BOOL IsSaveDocView() const { return bSaveDocView; } BOOL IsSaveRelINet() const { return bSaveRelINet; } BOOL IsSaveRelFSys() const { return bSaveRelFSys; } @@ -136,7 +133,6 @@ public: void SetAutoSavePrompt( BOOL b ); void SetDocInfoSave( BOOL b ); void SetSaveWorkingSet( BOOL b ); - void SetSaveDocWins( BOOL b ); void SetSaveDocView( BOOL b ); void SetSaveRelINet( BOOL b ); void SetSaveRelFSys( BOOL b ); @@ -214,15 +210,6 @@ void SvtSaveOptions_Impl::SetSaveWorkingSet( BOOL b ) } } -void SvtSaveOptions_Impl::SetSaveDocWins( BOOL b ) -{ - if (!bROSaveDocWins && bSaveDocWins!=b) - { - bSaveDocWins = b; - SetModified(); - } -} - void SvtSaveOptions_Impl::SetSaveDocView( BOOL b ) { if (!bROSaveDocView && bSaveDocView!=b) @@ -321,9 +308,6 @@ sal_Bool SvtSaveOptions_Impl::IsReadOnly( SvtSaveOptions::EOption eOption ) cons case SvtSaveOptions::E_SAVEWORKINGSET : bReadOnly = bROSaveWorkingSet; break; - case SvtSaveOptions::E_SAVEDOCWINS : - bReadOnly = bROSaveDocWins; - break; case SvtSaveOptions::E_SAVEDOCVIEW : bReadOnly = bROSaveDocView; break; @@ -359,16 +343,15 @@ sal_Bool SvtSaveOptions_Impl::IsReadOnly( SvtSaveOptions::EOption eOption ) cons #define AUTOSAVE 4 #define PROMPT 5 #define EDITPROPERTY 6 -#define SAVEDOCWINS 7 -#define SAVEVIEWINFO 8 -#define UNPACKED 9 -#define PRETTYPRINTING 10 -#define WARNALIENFORMAT 11 -#define LOADDOCPRINTER 12 -#define FILESYSTEM 13 -#define INTERNET 14 -#define SAVEWORKINGSET 15 -#define ODFDEFAULTVERSION 16 +#define SAVEVIEWINFO 7 +#define UNPACKED 8 +#define PRETTYPRINTING 9 +#define WARNALIENFORMAT 10 +#define LOADDOCPRINTER 11 +#define FILESYSTEM 12 +#define INTERNET 13 +#define SAVEWORKINGSET 14 +#define ODFDEFAULTVERSION 15 Sequence< OUString > GetPropertyNames() { @@ -381,7 +364,6 @@ Sequence< OUString > GetPropertyNames() "Document/AutoSave", "Document/AutoSavePrompt", "Document/EditProperty", - "Document/DocumentWindows", "Document/ViewInfo", "Document/Unpacked", "Document/PrettyPrinting", @@ -413,7 +395,6 @@ SvtSaveOptions_Impl::SvtSaveOptions_Impl() , bAutoSavePrompt( sal_False ) , bDocInfSave( sal_False ) , bSaveWorkingSet( sal_False ) - , bSaveDocWins( sal_False ) , bSaveDocView( sal_False ) , bSaveRelINet( sal_False ) , bSaveRelFSys( sal_False ) @@ -428,7 +409,6 @@ SvtSaveOptions_Impl::SvtSaveOptions_Impl() , bROAutoSavePrompt( CFG_READONLY_DEFAULT ) , bRODocInfSave( CFG_READONLY_DEFAULT ) , bROSaveWorkingSet( CFG_READONLY_DEFAULT ) - , bROSaveDocWins( CFG_READONLY_DEFAULT ) , bROSaveDocView( CFG_READONLY_DEFAULT ) , bROSaveRelINet( CFG_READONLY_DEFAULT ) , bROSaveRelFSys( CFG_READONLY_DEFAULT ) @@ -518,10 +498,6 @@ SvtSaveOptions_Impl::SvtSaveOptions_Impl() bSaveWorkingSet = bTemp; bROSaveWorkingSet = pROStates[nProp]; break; - case SAVEDOCWINS : - bSaveDocWins = bTemp; - bROSaveDocWins = pROStates[nProp]; - break; case SAVEVIEWINFO : bSaveDocView = bTemp; bROSaveDocView = pROStates[nProp]; @@ -667,14 +643,6 @@ void SvtSaveOptions_Impl::Commit() ++nRealCount; } break; - case SAVEDOCWINS : - if (!bROSaveDocWins) - { - pValues[nRealCount] <<= bSaveDocWins; - pNames[nRealCount] = pOrgNames[i]; - ++nRealCount; - } - break; case SAVEVIEWINFO : if (!bROSaveDocView) { @@ -940,16 +908,6 @@ sal_Bool SvtSaveOptions::IsSaveWorkingSet() const return pImp->pSaveOpt->IsSaveWorkingSet(); } -void SvtSaveOptions::SetSaveDocWins( sal_Bool b ) -{ - pImp->pSaveOpt->SetSaveDocWins( b ); -} - -sal_Bool SvtSaveOptions::IsSaveDocWins() const -{ - return pImp->pSaveOpt->IsSaveDocWins(); -} - void SvtSaveOptions::SetSaveDocView( sal_Bool b ) { pImp->pSaveOpt->SetSaveDocView( b ); |