diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-03-12 20:06:58 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-03-12 20:06:58 +0100 |
commit | c61cd1a5a26de1d1f62389988b00229c04e36693 (patch) | |
tree | 9d6de00f4d149cba080fe88f1eff71a67786b5f0 /sd/source/ui/unoidl | |
parent | 064f1e4ed53cb16d174534e20a7d02b8c93a4948 (diff) | |
parent | f2aeec8f22f37146c2f9120e8d0ead383049c1fa (diff) |
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
Diffstat (limited to 'sd/source/ui/unoidl')
-rw-r--r-- | sd/source/ui/unoidl/DrawController.cxx | 18 | ||||
-rw-r--r-- | sd/source/ui/unoidl/SdUnoDrawView.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/unoidl/SdUnoSlideView.cxx | 24 | ||||
-rw-r--r-- | sd/source/ui/unoidl/UnoDocumentSettings.cxx | 38 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/unoidl/detreg.cxx | 24 | ||||
-rw-r--r-- | sd/source/ui/unoidl/facreg.cxx | 109 | ||||
-rw-r--r-- | sd/source/ui/unoidl/sddetect.cxx | 28 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unocpres.hxx | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/unoidl/unodoc.cxx | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/unoidl/unolayer.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 20 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unoobj.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unopage.cxx | 40 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/unoidl/unopool.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unosrch.cxx | 4 |
15 files changed, 101 insertions, 226 deletions
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx index 9f2ec7e3964b..89108df710d1 100644 --- a/sd/source/ui/unoidl/DrawController.cxx +++ b/sd/source/ui/unoidl/DrawController.cxx @@ -814,14 +814,16 @@ sal_Bool DrawController::convertFastPropertyValue ( else if (mxSubController.is()) { rConvertedValue = rValue; - rOldValue = mxSubController->getFastPropertyValue(nHandle); - bResult = (rOldValue != rConvertedValue); - /* bResult = mpSubController->convertFastPropertyValue( - rConvertedValue, - rOldValue, - nHandle, - rValue); - */ + try + { + rOldValue = mxSubController->getFastPropertyValue(nHandle); + bResult = (rOldValue != rConvertedValue); + } + catch(beans::UnknownPropertyException aException) + { + // The prperty is unknown and thus an illegal argument to this method. + throw com::sun::star::lang::IllegalArgumentException(); + } } return bResult; diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx b/sd/source/ui/unoidl/SdUnoDrawView.cxx index d711b5a497aa..6c68569c3d2d 100644 --- a/sd/source/ui/unoidl/SdUnoDrawView.cxx +++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx @@ -144,7 +144,7 @@ Reference<drawing::XLayer> SdUnoDrawView::getActiveLayer (void) throw () // From the model get the current SdrLayer object via the layer admin. SdrLayerAdmin& rLayerAdmin = pSdModel->GetLayerAdmin (); - SdrLayer* pLayer = rLayerAdmin.GetLayer (mrView.GetActiveLayer(), TRUE); + SdrLayer* pLayer = rLayerAdmin.GetLayer (mrView.GetActiveLayer(), sal_True); if (pLayer == NULL) break; diff --git a/sd/source/ui/unoidl/SdUnoSlideView.cxx b/sd/source/ui/unoidl/SdUnoSlideView.cxx index f55db2e12f90..3e4866dc9b03 100644 --- a/sd/source/ui/unoidl/SdUnoSlideView.cxx +++ b/sd/source/ui/unoidl/SdUnoSlideView.cxx @@ -36,7 +36,7 @@ #include "SlideSorter.hxx" #include "controller/SlideSorterController.hxx" #include "controller/SlsPageSelector.hxx" -#include "controller/SlsSelectionManager.hxx" +#include "controller/SlsCurrentSlideManager.hxx" #include "model/SlsPageEnumerationProvider.hxx" #include "model/SlideSorterModel.hxx" #include "model/SlsPageDescriptor.hxx" @@ -105,7 +105,6 @@ sal_Bool SAL_CALL SdUnoSlideView::select (const Any& aSelection) } } } - rSlideSorterController.GetSelectionManager()->MakeSelectionVisible(); return bOk; } @@ -162,19 +161,30 @@ void SAL_CALL SdUnoSlideView::removeSelectionChangeListener ( //----- XDrawView ------------------------------------------------------------- void SAL_CALL SdUnoSlideView::setCurrentPage ( - const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& ) - throw(::com::sun::star::uno::RuntimeException) + const css::uno::Reference<css::drawing::XDrawPage>& rxDrawPage) + throw(css::uno::RuntimeException) { + Reference<beans::XPropertySet> xProperties (rxDrawPage, UNO_QUERY); + if (xProperties.is()) + { + sal_uInt16 nPageNumber(0); + if (xProperties->getPropertyValue(::rtl::OUString::createFromAscii("Number")) >>= nPageNumber) + { + mrSlideSorter.GetController().GetCurrentSlideManager()->SwitchCurrentSlide( + nPageNumber-1, + true); + } + } } -::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL +css::uno::Reference<css::drawing::XDrawPage > SAL_CALL SdUnoSlideView::getCurrentPage (void) - throw(::com::sun::star::uno::RuntimeException) + throw(css::uno::RuntimeException) { - return Reference<drawing::XDrawPage>(); + return mrSlideSorter.GetController().GetCurrentSlideManager()->GetCurrentSlide()->GetXDrawPage(); } diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index 72bd79398488..a5c9680f2f6e 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -245,11 +245,11 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c SdOptionsPrintItem aOptionsPrintItem( ATTR_OPTIONS_PRINT ); - SfxPrinter* pPrinter = pDocSh->GetPrinter( FALSE ); + SfxPrinter* pPrinter = pDocSh->GetPrinter( sal_False ); if( pPrinter ) { SdOptionsPrintItem* pPrinterOptions = NULL; - if(pPrinter->GetOptions().GetItemState( ATTR_OPTIONS_PRINT, FALSE, (const SfxPoolItem**) &pPrinterOptions) == SFX_ITEM_SET) + if(pPrinter->GetOptions().GetItemState( ATTR_OPTIONS_PRINT, sal_False, (const SfxPoolItem**) &pPrinterOptions) == SFX_ITEM_SET) aOptionsPrintItem.GetOptionsPrint() = pPrinterOptions->GetOptionsPrint(); } else @@ -466,7 +466,7 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c { if( static_cast<sal_Int16>( aPrintOpts.GetHandoutPages() ) != nValue ) { - aPrintOpts.SetHandoutPages( static_cast< UINT16 >( nValue ) ); + aPrintOpts.SetHandoutPages( static_cast< sal_uInt16 >( nValue ) ); bOptionsChanged = true; } bOk = sal_True; @@ -731,16 +731,16 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c pDoc->SetSummationOfParagraphs( bIsSummationOfParagraphs ); SdDrawDocument* pDocument = pDocSh->GetDoc(); - SdrOutliner& rOutl = pDocument->GetDrawOutliner( FALSE ); + SdrOutliner& rOutl = pDocument->GetDrawOutliner( sal_False ); nCntrl = rOutl.GetControlWord() &~ EE_CNTRL_ULSPACESUMMATION; rOutl.SetControlWord( nCntrl | nSum ); - ::sd::Outliner* pOutl = pDocument->GetOutliner( FALSE ); + ::sd::Outliner* pOutl = pDocument->GetOutliner( sal_False ); if( pOutl ) { nCntrl = pOutl->GetControlWord() &~ EE_CNTRL_ULSPACESUMMATION; pOutl->SetControlWord( nCntrl | nSum ); } - pOutl = pDocument->GetInternalOutliner( FALSE ); + pOutl = pDocument->GetInternalOutliner( sal_False ); if( pOutl ) { nCntrl = pOutl->GetControlWord() &~ EE_CNTRL_ULSPACESUMMATION; @@ -758,19 +758,19 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c { bOk = sal_True; - pDoc->SetCharCompressType( (UINT16)nCharCompressType ); + pDoc->SetCharCompressType( (sal_uInt16)nCharCompressType ); SdDrawDocument* pDocument = pDocSh->GetDoc(); - SdrOutliner& rOutl = pDocument->GetDrawOutliner( FALSE ); - rOutl.SetAsianCompressionMode( (UINT16)nCharCompressType ); - ::sd::Outliner* pOutl = pDocument->GetOutliner( FALSE ); + SdrOutliner& rOutl = pDocument->GetDrawOutliner( sal_False ); + rOutl.SetAsianCompressionMode( (sal_uInt16)nCharCompressType ); + ::sd::Outliner* pOutl = pDocument->GetOutliner( sal_False ); if( pOutl ) { - pOutl->SetAsianCompressionMode( (UINT16)nCharCompressType ); + pOutl->SetAsianCompressionMode( (sal_uInt16)nCharCompressType ); } - pOutl = pDocument->GetInternalOutliner( FALSE ); + pOutl = pDocument->GetInternalOutliner( sal_False ); if( pOutl ) { - pOutl->SetAsianCompressionMode( (UINT16)nCharCompressType ); + pOutl->SetAsianCompressionMode( (sal_uInt16)nCharCompressType ); } } break; @@ -785,14 +785,14 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c pDoc->SetKernAsianPunctuation( bAsianPunct ); SdDrawDocument* pDocument = pDocSh->GetDoc(); - SdrOutliner& rOutl = pDocument->GetDrawOutliner( FALSE ); + SdrOutliner& rOutl = pDocument->GetDrawOutliner( sal_False ); rOutl.SetKernAsianPunctuation( bAsianPunct ); - ::sd::Outliner* pOutl = pDocument->GetOutliner( FALSE ); + ::sd::Outliner* pOutl = pDocument->GetOutliner( sal_False ); if( pOutl ) { pOutl->SetKernAsianPunctuation( bAsianPunct ); } - pOutl = pDocument->GetInternalOutliner( FALSE ); + pOutl = pDocument->GetInternalOutliner( sal_False ); if( pOutl ) { pOutl->SetKernAsianPunctuation( bAsianPunct ); @@ -867,7 +867,7 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c if( bOptionsChanged ) { if( !pPrinter ) - pPrinter = pDocSh->GetPrinter( TRUE ); + pPrinter = pDocSh->GetPrinter( sal_True ); SfxItemSet aNewOptions( pPrinter->GetOptions() ); aNewOptions.Put( aOptionsPrintItem ); pPrinter->SetOptions( aNewOptions ); @@ -888,11 +888,11 @@ void DocumentSettings::_getPropertyValues( const PropertyMapEntry** ppEntries, A SdOptionsPrintItem aOptionsPrintItem( ATTR_OPTIONS_PRINT ); - SfxPrinter* pPrinter = pDocSh->GetPrinter( FALSE ); + SfxPrinter* pPrinter = pDocSh->GetPrinter( sal_False ); if( pPrinter ) { SdOptionsPrintItem* pPrinterOptions = NULL; - if(pPrinter->GetOptions().GetItemState( ATTR_OPTIONS_PRINT, FALSE, (const SfxPoolItem**) &pPrinterOptions) == SFX_ITEM_SET) + if(pPrinter->GetOptions().GetItemState( ATTR_OPTIONS_PRINT, sal_False, (const SfxPoolItem**) &pPrinterOptions) == SFX_ITEM_SET) aOptionsPrintItem.GetOptionsPrint() = pPrinterOptions->GetOptionsPrint(); } else diff --git a/sd/source/ui/unoidl/detreg.cxx b/sd/source/ui/unoidl/detreg.cxx index 05f8862b1162..2cf653f3f3df 100644..100755 --- a/sd/source/ui/unoidl/detreg.cxx +++ b/sd/source/ui/unoidl/detreg.cxx @@ -49,30 +49,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* , - void* pRegistryKey ) -{ - Reference< ::registry::XRegistryKey > - xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ; - - ::rtl::OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") ); - ::rtl::OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ); - - // Eigentliche Implementierung und ihre Services registrieren - sal_Int32 i; - Reference< ::registry::XRegistryKey > xNewKey; - - xNewKey = xKey->createKey( aDelimiter + SdFilterDetect::impl_getStaticImplementationName() + - aUnoServices ); - - Sequence< ::rtl::OUString > aServices = SdFilterDetect::impl_getStaticSupportedServiceNames(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - return sal_True; -} - SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/sd/source/ui/unoidl/facreg.cxx b/sd/source/ui/unoidl/facreg.cxx index 254f8eaceb99..709b1a5f00ca 100644 --- a/sd/source/ui/unoidl/facreg.cxx +++ b/sd/source/ui/unoidl/facreg.cxx @@ -304,115 +304,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -static void SAL_CALL writeInfo( - registry::XRegistryKey * pRegistryKey, - const OUString & rImplementationName, - const uno::Sequence< OUString > & rServices ) -{ - uno::Reference< registry::XRegistryKey > xNewKey( - pRegistryKey->createKey( - OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + rImplementationName + OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ) ); - - for( sal_Int32 i = 0; i < rServices.getLength(); i++ ) - xNewKey->createKey( rServices.getConstArray()[i]); -} - -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void * , - void * pRegistryKey ) -{ - if( pRegistryKey ) - { - try - { - registry::XRegistryKey *pKey = reinterpret_cast< registry::XRegistryKey * >( pRegistryKey ); - - writeInfo( pKey, SdHtmlOptionsDialog_getImplementationName(), SdHtmlOptionsDialog_getSupportedServiceNames() ); - writeInfo( pKey, SdDrawingDocument_getImplementationName(), SdDrawingDocument_getSupportedServiceNames() ); - writeInfo( pKey, SdPresentationDocument_getImplementationName(), SdPresentationDocument_getSupportedServiceNames() ); - writeInfo( pKey, SdUnoModule_getImplementationName(), SdUnoModule_getSupportedServiceNames() ); - writeInfo( pKey, sd::RandomNode__getImplementationName(), sd::RandomNode_getSupportedServiceNames() ); - writeInfo( - pKey, - sd::framework::Configuration_getImplementationName(), - sd::framework::Configuration_getSupportedServiceNames()); - writeInfo( - pKey, - sd::framework::ConfigurationController_getImplementationName(), - sd::framework::ConfigurationController_getSupportedServiceNames()); - writeInfo( - pKey, - sd::framework::ModuleController_getImplementationName(), - sd::framework::ModuleController_getSupportedServiceNames()); - writeInfo( - pKey, - sd::framework::BasicPaneFactory_getImplementationName(), - sd::framework::BasicPaneFactory_getSupportedServiceNames()); - writeInfo( - pKey, - sd::framework::BasicToolBarFactory_getImplementationName(), - sd::framework::BasicToolBarFactory_getSupportedServiceNames()); - writeInfo( - pKey, - sd::framework::BasicViewFactory_getImplementationName(), - sd::framework::BasicViewFactory_getSupportedServiceNames()); - writeInfo( - pKey, - sd::framework::TaskPanelFactory_getImplementationName(), - sd::framework::TaskPanelFactory_getSupportedServiceNames()); - writeInfo( - pKey, - sd::toolpanel::ToolPanelFactory_getImplementationName(), - sd::toolpanel::ToolPanelFactory_getSupportedServiceNames()); - writeInfo( - pKey, - sd::framework::ResourceId_getImplementationName(), - sd::framework::ResourceId_getSupportedServiceNames()); - writeInfo( - pKey, - sd::framework::PresentationFactoryProvider_getImplementationName(), - sd::framework::PresentationFactoryProvider_getSupportedServiceNames()); - writeInfo( - pKey, - sd::presenter::SlideRenderer_getImplementationName(), - sd::presenter::SlideRenderer_getSupportedServiceNames()); - writeInfo( - pKey, - sd::presenter::PresenterCanvas_getImplementationName(), - sd::presenter::PresenterCanvas_getSupportedServiceNames()); - writeInfo( - pKey, - sd::presenter::PresenterTextViewService_getImplementationName(), - sd::presenter::PresenterTextViewService_getSupportedServiceNames()); - writeInfo( - pKey, - sd::presenter::PresenterHelperService_getImplementationName(), - sd::presenter::PresenterHelperService_getSupportedServiceNames()); - writeInfo( - pKey, - sd::presenter::PresenterPreviewCache_getImplementationName(), - sd::presenter::PresenterPreviewCache_getSupportedServiceNames()); - writeInfo( - pKey, - sd::slidesorter::SlideSorterService_getImplementationName(), - sd::slidesorter::SlideSorterService_getSupportedServiceNames()); - writeInfo( - pKey, - sd::SlideLayoutController_getImplementationName(), - sd::SlideLayoutController_getSupportedServiceNames()); - writeInfo( - pKey, - sd::InsertSlideController_getImplementationName(), - sd::InsertSlideController_getSupportedServiceNames()); - } - catch (registry::InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_True; -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, diff --git a/sd/source/ui/unoidl/sddetect.cxx b/sd/source/ui/unoidl/sddetect.cxx index dcc3e57b31a8..b3b149c666f7 100644 --- a/sd/source/ui/unoidl/sddetect.cxx +++ b/sd/source/ui/unoidl/sddetect.cxx @@ -176,7 +176,7 @@ SdFilterDetect::~SdFilterDetect() SfxApplication* pApp = SFX_APP(); SfxAllItemSet *pSet = new SfxAllItemSet( pApp->GetPool() ); TransformParameters( SID_OPENDOC, lDescriptor, *pSet ); - SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, FALSE ); + SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, sal_False ); bWasReadOnly = pItem && pItem->GetValue(); @@ -204,8 +204,8 @@ SdFilterDetect::~SdFilterDetect() else { // ctor of SfxMedium uses owner transition of ItemSet - SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, FALSE, NULL, pSet ); - aMedium.UseInteractionHandler( TRUE ); + SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, sal_False, NULL, pSet ); + aMedium.UseInteractionHandler( sal_True ); if ( aPreselectedFilterName.Len() ) pFilter = SfxFilter::GetFilterByName( aPreselectedFilterName ); else if( aTypeName.Len() ) @@ -221,7 +221,7 @@ SdFilterDetect::~SdFilterDetect() xStream = aMedium.GetInputStream(); xContent = aMedium.GetContent(); bReadOnly = aMedium.IsReadOnly(); - BOOL bIsStorage = aMedium.IsStorage(); + sal_Bool bIsStorage = aMedium.IsStorage(); if (aMedium.GetError() == SVSTREAM_OK) { @@ -269,7 +269,7 @@ SdFilterDetect::~SdFilterDetect() String sFilterName; if ( pFilter ) sFilterName = pFilter->GetName(); - aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsOwnTemplateFormat() : FALSE, &sFilterName ); + aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsOwnTemplateFormat() : sal_False, &sFilterName ); } catch( lang::WrappedTargetException& aWrap ) { @@ -287,20 +287,16 @@ SdFilterDetect::~SdFilterDetect() if ( !bRepairPackage ) { // ask the user whether he wants to try to repair - RequestPackageReparation* pRequest = new RequestPackageReparation( aDocumentTitle ); - uno::Reference< task::XInteractionRequest > xRequest ( pRequest ); - - xInteraction->handle( xRequest ); - - bRepairAllowed = pRequest->isApproved(); + RequestPackageReparation aRequest( aDocumentTitle ); + xInteraction->handle( aRequest.GetRequest() ); + bRepairAllowed = aRequest.isApproved(); } if ( !bRepairAllowed ) { // repair either not allowed or not successful - NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocumentTitle ); - uno::Reference< task::XInteractionRequest > xRequest ( pNotifyRequest ); - xInteraction->handle( xRequest ); + NotifyBrokenPackage aNotifyRequest( aDocumentTitle ); + xInteraction->handle( aNotifyRequest.GetRequest() ); } } @@ -341,7 +337,7 @@ SdFilterDetect::~SdFilterDetect() } else { - SotStorageRef aStorage = new SotStorage ( pStm, FALSE ); + SotStorageRef aStorage = new SotStorage ( pStm, sal_False ); if ( !aStorage->GetError() ) { String aStreamName = UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "PowerPoint Document" ) ); @@ -366,7 +362,7 @@ SdFilterDetect::~SdFilterDetect() const String aFileName( aMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ); GraphicDescriptor aDesc( *pStm, &aFileName ); GraphicFilter* pGrfFilter = GraphicFilter::GetGraphicFilter(); - if( !aDesc.Detect( FALSE ) ) + if( !aDesc.Detect( sal_False ) ) { pFilter = 0; if( SvtModuleOptions().IsImpress() ) diff --git a/sd/source/ui/unoidl/unocpres.hxx b/sd/source/ui/unoidl/unocpres.hxx index 8c3b5a68924d..9841bc014542 100644 --- a/sd/source/ui/unoidl/unocpres.hxx +++ b/sd/source/ui/unoidl/unocpres.hxx @@ -59,7 +59,7 @@ private: // for xComponent ::osl::Mutex aDisposeContainerMutex; ::cppu::OInterfaceContainerHelper aDisposeListeners; - BOOL bDisposing; + sal_Bool bDisposing; public: SdXCustomPresentation() throw(); diff --git a/sd/source/ui/unoidl/unodoc.cxx b/sd/source/ui/unoidl/unodoc.cxx index dd2102ffb2cf..b3b69e8b8f24 100644..100755 --- a/sd/source/ui/unoidl/unodoc.cxx +++ b/sd/source/ui/unoidl/unodoc.cxx @@ -69,7 +69,7 @@ uno::Reference< uno::XInterface > SAL_CALL SdDrawingDocument_createInstance( SfxObjectShell* pShell = new ::sd::GraphicDocShell( - _nCreationFlags, FALSE, DOCUMENT_TYPE_DRAW ); + _nCreationFlags, sal_False, DOCUMENT_TYPE_DRAW ); return uno::Reference< uno::XInterface >( pShell->GetModel() ); } @@ -98,7 +98,7 @@ uno::Reference< uno::XInterface > SAL_CALL SdPresentationDocument_createInstance SfxObjectShell* pShell = new ::sd::DrawDocShell( - _nCreationFlags, FALSE, DOCUMENT_TYPE_IMPRESS ); + _nCreationFlags, sal_False, DOCUMENT_TYPE_IMPRESS ); return uno::Reference< uno::XInterface >( pShell->GetModel() ); } diff --git a/sd/source/ui/unoidl/unolayer.cxx b/sd/source/ui/unoidl/unolayer.cxx index 0eff267a13aa..bbbfc8c14c55 100644..100755 --- a/sd/source/ui/unoidl/unolayer.cxx +++ b/sd/source/ui/unoidl/unolayer.cxx @@ -559,7 +559,7 @@ uno::Reference< drawing::XLayer > SAL_CALL SdLayerManager::insertNewByIndex( sal SdrLayerAdmin& rLA=mpModel->mpDoc->GetLayerAdmin(); const sal_Int32 nMax=rLA.GetLayerCount(); if (nIndex>nMax) nIndex=nMax; - xLayer = GetLayer (rLA.NewLayer(aLayerName,(USHORT)nIndex)); + xLayer = GetLayer (rLA.NewLayer(aLayerName,(sal_uInt16)nIndex)); mpModel->SetModified(); } return xLayer; @@ -682,7 +682,7 @@ uno::Any SAL_CALL SdLayerManager::getByName( const OUString& aName ) throw lang::DisposedException(); SdrLayerAdmin& rLayerAdmin = mpModel->mpDoc->GetLayerAdmin(); - SdrLayer* pLayer = rLayerAdmin.GetLayer( SdLayer::convertToInternalName( aName ), FALSE ); + SdrLayer* pLayer = rLayerAdmin.GetLayer( SdLayer::convertToInternalName( aName ), sal_False ); if( pLayer == NULL ) throw container::NoSuchElementException(); @@ -724,7 +724,7 @@ sal_Bool SAL_CALL SdLayerManager::hasByName( const OUString& aName ) throw(uno:: SdrLayerAdmin& rLayerAdmin = mpModel->mpDoc->GetLayerAdmin(); - return NULL != rLayerAdmin.GetLayer( SdLayer::convertToInternalName( aName ), FALSE ); + return NULL != rLayerAdmin.GetLayer( SdLayer::convertToInternalName( aName ), sal_False ); } // XElementAccess diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 1a41057c6434..a85b486a6780 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -466,8 +466,8 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, sal_Bool bDuplicate { sal_uInt16 nPageCount = mpDoc->GetSdPageCount( PK_STANDARD ); SdrLayerAdmin& rLayerAdmin = mpDoc->GetLayerAdmin(); - BYTE aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False); - BYTE aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False); + sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False); + sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False); SdPage* pStandardPage = NULL; @@ -1543,8 +1543,8 @@ sal_Int32 ImplPDFGetBookmarkPage( const String& rBookmark, SdDrawDocument& rDoc aBookmark = rBookmark.Copy( 1 ); // is the bookmark a page ? - BOOL bIsMasterPage; - USHORT nPgNum = rDoc.GetPageByName( aBookmark, bIsMasterPage ); + sal_Bool bIsMasterPage; + sal_uInt16 nPgNum = rDoc.GetPageByName( aBookmark, bIsMasterPage ); SdrObject* pObj = NULL; if ( nPgNum == SDRPAGE_NOTFOUND ) @@ -1855,7 +1855,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r vcl::PDFExtOutDevData* pPDFExtOutDevData = PTR_CAST( vcl::PDFExtOutDevData, pOut->GetExtOutDevData() ); ::sd::ClientView* pView = new ::sd::ClientView( mpDocShell, pOut, NULL ); - Rectangle aVisArea = Rectangle( Point(), mpDoc->GetSdPage( (USHORT)nPageNumber - 1, ePageKind )->GetSize() ); + Rectangle aVisArea = Rectangle( Point(), mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1, ePageKind )->GetSize() ); Region aRegion( aVisArea ); Point aOrigin; @@ -1881,7 +1881,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r if( xModel == mpDocShell->GetModel() ) { - pView->ShowSdrPage( mpDoc->GetSdPage( (USHORT)nPageNumber - 1, ePageKind )); + pView->ShowSdrPage( mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1, ePageKind )); SdrPageView* pPV = pView->GetSdrPageView(); if( pOldSdView ) @@ -2081,7 +2081,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r rBookmarks.clear(); //---> #i56629, #i40318 //get the page name, will be used as outline element in PDF bookmark pane - String aPageName = mpDoc->GetSdPage( (USHORT)nPageNumber - 1 , PK_STANDARD )->GetName(); + String aPageName = mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1 , PK_STANDARD )->GetName(); if( aPageName.Len() > 0 ) { // insert the bookmark to this page into the NamedDestinations @@ -2658,7 +2658,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn bUnique = sal_True; for( sal_Int32 nMaster = 1; nMaster < nMPageCount; nMaster++ ) { - SdPage* pPage = (SdPage*)mpDoc->GetMasterPage((USHORT)nMaster); + SdPage* pPage = (SdPage*)mpDoc->GetMasterPage((sal_uInt16)nMaster); if( pPage && pPage->GetName() == aPrefix ) { bUnique = sal_False; @@ -2695,7 +2695,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn pPage->GetRgtBorder(), pPage->GetLwrBorder() ); pMPage->SetLayoutName( aLayoutName ); - mpDoc->InsertMasterPage(pMPage, (USHORT)nInsertPos); + mpDoc->InsertMasterPage(pMPage, (sal_uInt16)nInsertPos); { // ensure default MasterPage fill @@ -2713,7 +2713,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn pRefNotesPage->GetRgtBorder(), pRefNotesPage->GetLwrBorder() ); pMNotesPage->SetLayoutName( aLayoutName ); - mpDoc->InsertMasterPage(pMNotesPage, (USHORT)nInsertPos + 1); + mpDoc->InsertMasterPage(pMNotesPage, (sal_uInt16)nInsertPos + 1); pMNotesPage->SetAutoLayout(AUTOLAYOUT_NOTES, sal_True, sal_True); mpModel->SetModified(); } diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index e904098fa1fa..ebb75d0043e4 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -609,7 +609,7 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName, if(!(aValue >>= nVerb)) throw lang::IllegalArgumentException(); - pInfo->mnVerb = (USHORT)nVerb; + pInfo->mnVerb = (sal_uInt16)nVerb; break; } case WID_DIMCOLOR: @@ -789,7 +789,7 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName, { SdDrawDocument* pDoc = mpModel?mpModel->GetDoc():NULL; // is the bookmark a page? - BOOL bIsMasterPage; + sal_Bool bIsMasterPage; if(pDoc->GetPageByName( pInfo->GetBookmark(), bIsMasterPage ) != SDRPAGE_NOTFOUND) { aString = SdDrawPage::getPageApiNameFromUiName( pInfo->GetBookmark() ); @@ -1421,7 +1421,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno case presentation::ClickAction_VERB: if( nFound & FOUND_VERB ) { - pInfo->mnVerb = (USHORT)nVerb; + pInfo->mnVerb = (sal_uInt16)nVerb; bOk = sal_True; } break; diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 096af6d322c9..879128104a5c 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -534,7 +534,7 @@ SdrObject * SdGenericDrawPage::_CreateSdrObject( const Reference< drawing::XShap } else { - pPresObj = GetPage()->CreatePresObj( eObjKind, FALSE, aRect, sal_True ); + pPresObj = GetPage()->CreatePresObj( eObjKind, sal_False, aRect, sal_True ); } if( pPresObj ) @@ -669,7 +669,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel(); const PageKind ePageKind = GetPage()->GetPageKind(); - USHORT i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind); + sal_uInt16 i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind); for (i = 0; i < nPageCnt; i++) { SdPage* pPage = pDoc->GetMasterSdPage(i, ePageKind); @@ -712,7 +712,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName sal_Bool bVisible = sal_False; if( ! ( aValue >>= bVisible ) ) throw lang::IllegalArgumentException(); - GetPage()->SetExcluded( bVisible == FALSE ); + GetPage()->SetExcluded( bVisible == sal_False ); break; } case WID_PAGE_SOUNDFILE : @@ -768,7 +768,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName { SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin(); SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); - aVisibleLayers.Set(rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE), bVisible); + aVisibleLayers.Set(rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False), bVisible); pPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers); } } @@ -788,7 +788,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName { SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin(); SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); - aVisibleLayers.Set(rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE), bVisible); + aVisibleLayers.Set(rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False), bVisible); pPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers); } } @@ -1094,7 +1094,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) { Point aPoint; Size aSize( GetPage()->GetSize() ); - pMetaFile->AddAction( (MetaAction*) new MetaFillColorAction( COL_WHITE, TRUE ), 0 ); + pMetaFile->AddAction( (MetaAction*) new MetaFillColorAction( COL_WHITE, sal_True ), 0 ); pMetaFile->AddAction( (MetaAction*) new MetaRectAction( Rectangle( aPoint, aSize ) ), 1 ); pMetaFile->SetPrefMapMode( MAP_100TH_MM ); pMetaFile->SetPrefSize( aSize ); @@ -1132,7 +1132,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) aBitmap ) ) { SvMemoryStream aMemStream; - aBitmap.GetBitmap().Write( aMemStream, FALSE, FALSE ); + aBitmap.GetBitmap().Write( aMemStream, sal_False, sal_False ); uno::Sequence<sal_Int8> aSeq( (sal_Int8*)aMemStream.GetData(), aMemStream.Tell() ); aAny <<= aSeq; } @@ -1143,7 +1143,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) case WID_PAGE_VISIBLE : { - sal_Bool bVisible = GetPage()->IsExcluded() == FALSE; + sal_Bool bVisible = GetPage()->IsExcluded() == sal_False; aAny <<= Any( &bVisible, ::getBooleanCppuType() ); break; } @@ -1184,7 +1184,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) { SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin(); SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); - aAny <<= (sal_Bool)aVisibleLayers.IsSet(rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE)); + aAny <<= (sal_Bool)aVisibleLayers.IsSet(rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False)); } else { @@ -1203,7 +1203,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) { SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin(); SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); - aAny <<= (sal_Bool)aVisibleLayers.IsSet(rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE)); + aAny <<= (sal_Bool)aVisibleLayers.IsSet(rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False)); } else { @@ -1671,7 +1671,7 @@ void SdGenericDrawPage::SetLftBorder( sal_Int32 nValue ) SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel(); const PageKind ePageKind = GetPage()->GetPageKind(); - USHORT i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind); + sal_uInt16 i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind); for (i = 0; i < nPageCnt; i++) { SdPage* pPage = pDoc->GetMasterSdPage(i, ePageKind); @@ -1695,7 +1695,7 @@ void SdGenericDrawPage::SetRgtBorder( sal_Int32 nValue ) SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel(); const PageKind ePageKind = GetPage()->GetPageKind(); - USHORT i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind); + sal_uInt16 i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind); for (i = 0; i < nPageCnt; i++) { SdPage* pPage = pDoc->GetMasterSdPage(i, ePageKind); @@ -1719,7 +1719,7 @@ void SdGenericDrawPage::SetUppBorder( sal_Int32 nValue ) SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel(); const PageKind ePageKind = GetPage()->GetPageKind(); - USHORT i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind); + sal_uInt16 i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind); for (i = 0; i < nPageCnt; i++) { SdPage* pPage = pDoc->GetMasterSdPage(i, ePageKind); @@ -1743,7 +1743,7 @@ void SdGenericDrawPage::SetLwrBorder( sal_Int32 nValue ) SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel(); const PageKind ePageKind = GetPage()->GetPageKind(); - USHORT i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind); + sal_uInt16 i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind); for (i = 0; i < nPageCnt; i++) { SdPage* pPage = pDoc->GetMasterSdPage(i, ePageKind); @@ -1781,7 +1781,7 @@ static void refreshpage( SdDrawDocument* pDoc, const PageKind ePageKind ) pDoc->SetMaxObjSize(aViewSize); - pViewSh->InitWindows(aPageOrg, aViewSize, Point(-1, -1), TRUE); + pViewSh->InitWindows(aPageOrg, aViewSize, Point(-1, -1), sal_True); pViewSh->UpdateScrollBars(); } @@ -1798,7 +1798,7 @@ void SdGenericDrawPage::SetWidth( sal_Int32 nWidth ) SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel(); const PageKind ePageKind = GetPage()->GetPageKind(); - USHORT i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind); + sal_uInt16 i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind); for (i = 0; i < nPageCnt; i++) { SdPage* pPage = pDoc->GetMasterSdPage(i, ePageKind); @@ -1827,7 +1827,7 @@ void SdGenericDrawPage::SetHeight( sal_Int32 nHeight ) SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel(); const PageKind ePageKind = GetPage()->GetPageKind(); - USHORT i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind); + sal_uInt16 i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind); for (i = 0; i < nPageCnt; i++) { SdPage* pPage = pDoc->GetMasterSdPage(i, ePageKind); @@ -2318,7 +2318,7 @@ void SAL_CALL SdDrawPage::setName( const OUString& rName ) GetPage()->SetName( aName ); - USHORT nNotesPageNum = (GetPage()->GetPageNum()-1)>>1; + sal_uInt16 nNotesPageNum = (GetPage()->GetPageNum()-1)>>1; if( GetModel()->GetDoc()->GetSdPageCount( PK_NOTES ) > nNotesPageNum ) { SdPage* pNotesPage = GetModel()->GetDoc()->GetSdPage( nNotesPageNum, PK_NOTES ); @@ -2337,7 +2337,7 @@ void SAL_CALL SdDrawPage::setName( const OUString& rName ) EditMode eMode = pDrawViewSh->GetEditMode(); if( eMode == EM_PAGE ) { - BOOL bLayer = pDrawViewSh->IsLayerModeActive(); + sal_Bool bLayer = pDrawViewSh->IsLayerModeActive(); pDrawViewSh->ChangeEditMode( eMode, !bLayer ); pDrawViewSh->ChangeEditMode( eMode, bLayer ); @@ -3061,7 +3061,7 @@ void SAL_CALL SdMasterPage::setName( const OUString& aName ) EditMode eMode = pDrawViewSh->GetEditMode(); if( eMode == EM_MASTERPAGE ) { - BOOL bLayer = pDrawViewSh->IsLayerModeActive(); + sal_Bool bLayer = pDrawViewSh->IsLayerModeActive(); pDrawViewSh->ChangeEditMode( eMode, !bLayer ); pDrawViewSh->ChangeEditMode( eMode, bLayer ); diff --git a/sd/source/ui/unoidl/unopool.cxx b/sd/source/ui/unoidl/unopool.cxx index 0d53ab9bd3c1..8e216f9acdf4 100644..100755 --- a/sd/source/ui/unoidl/unopool.cxx +++ b/sd/source/ui/unoidl/unopool.cxx @@ -88,7 +88,7 @@ void SdUnoDrawPool::putAny( SfxItemPool* pPool, const comphelper::PropertyMapEnt if( rValue >>= aLocale ) mpDrawModel->SetLanguage( SdUnoGetLanguage( aLocale ), - (const USHORT)pEntry->mnHandle ); + (const sal_uInt16)pEntry->mnHandle ); } } SvxUnoDrawPool::putAny( pPool, pEntry, rValue ); diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx index 283b2b30468e..cb895b16b1f7 100644 --- a/sd/source/ui/unoidl/unosrch.cxx +++ b/sd/source/ui/unoidl/unosrch.cxx @@ -615,8 +615,8 @@ uno::Reference< text::XTextRange > SdUnoSearchReplaceShape::Search( uno::Refere { if( nStartPos <= nTextLen && nEndPos <= nTextLen ) { - ESelection aSelection( (USHORT)pConvertPara[nStartPos], (USHORT)pConvertPos[nStartPos], - (USHORT)pConvertPara[nEndPos], (USHORT)pConvertPos[nEndPos] ); + ESelection aSelection( (sal_uInt16)pConvertPara[nStartPos], (sal_uInt16)pConvertPos[nStartPos], + (sal_uInt16)pConvertPara[nEndPos], (sal_uInt16)pConvertPos[nEndPos] ); SvxUnoTextRange *pRange; SvxUnoTextBase* pParent = SvxUnoTextBase::getImplementation( xParent ); |