diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:55:08 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:55:08 +0200 |
commit | 7685aa6025b7cdfbcfc52a706252356e03ef0e07 (patch) | |
tree | 39e07ab363eaedbdcb941daca538c83478d048f4 /sdext | |
parent | fixing rebase errors (diff) | |
parent | createFromAscii -> RTL_CONSTASCII_USTRINGPARAM (diff) | |
download | core-7685aa6025b7cdfbcfc52a706252356e03ef0e07.tar.gz core-7685aa6025b7cdfbcfc52a706252356e03ef0e07.zip |
Merge branch 'master' into feature/gnumake4
Diffstat (limited to 'sdext')
166 files changed, 861 insertions, 825 deletions
diff --git a/sdext/inc/pch/precompiled_sdext.cxx b/sdext/inc/pch/precompiled_sdext.cxx index b49fcac717ea..071aae824858 100644 --- a/sdext/inc/pch/precompiled_sdext.cxx +++ b/sdext/inc/pch/precompiled_sdext.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,3 +28,4 @@ #include "precompiled_sdext.hxx" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/inc/pch/precompiled_sdext.hxx b/sdext/inc/pch/precompiled_sdext.hxx index 3220aa3f6e4c..ea496150e83e 100644 --- a/sdext/inc/pch/precompiled_sdext.hxx +++ b/sdext/inc/pch/precompiled_sdext.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,3 +31,4 @@ #ifdef PRECOMPILED_HEADERS #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/prj/build.lst b/sdext/prj/build.lst index 2604633810a3..5c621d5c0950 100644 --- a/sdext/prj/build.lst +++ b/sdext/prj/build.lst @@ -1,4 +1,4 @@ -dx sdext : L10N:l10n offuh comphelper unotools readlicense_oo cppu tools cppuhelper sal javaunohelper officecfg XPDF:xpdf LIBXSLT:libxslt xmlhelp NULL +dx sdext : TRANSLATIONS:translations offuh comphelper unotools readlicense_oo cppu tools cppuhelper sal javaunohelper officecfg XPDF:xpdf LIBXSLT:libxslt xmlhelp NULL dx sdext usr1 - all sdext_mkout NULL dx sdext\prj get - all sdext_prj NULL dx sdext\source\minimizer nmake - all sdext_minimizer sdext_minimizer_rdoooe sdext_minimizer_rdooo sdext_inc NULL diff --git a/sdext/prj/d.lst b/sdext/prj/d.lst index bcaa4308bcb9..cd0f72555055 100644 --- a/sdext/prj/d.lst +++ b/sdext/prj/d.lst @@ -1,10 +1,13 @@ -mkdir: %_DEST%\bin%_EXT%\minimizer -mkdir: %_DEST%\bin%_EXT%\presenter -mkdir: %_DEST%\bin%_EXT%\pdfimport -..\%__SRC%\bin\pdf2xml.* %_DEST%\bin%_EXT%\pdf2xml.* -..\%__SRC%\bin\pdfunzip.* %_DEST%\bin%_EXT%\pdfunzip.* -..\%__SRC%\bin\pdfimport.oxt %_DEST%\bin%_EXT%\pdfimport\pdfimport.oxt -..\%__SRC%\bin\presentation-minimizer.oxt %_DEST%\bin%_EXT%\minimizer\presentation-minimizer.oxt -..\%__SRC%\bin\presentation_minimizer_develop.zip %_DEST%\bin%_EXT%\minimizer\presentation_minimizer_develop.zip -..\%__SRC%\bin\presenter-screen.oxt %_DEST%\bin%_EXT%\presenter\presenter-screen.oxt -..\%__SRC%\bin\presenter-screen_develop.zip %_DEST%\bin%_EXT%\presenter\presenter-screen_develop.zip +mkdir: %_DEST%\bin\minimizer +mkdir: %_DEST%\bin\presenter +mkdir: %_DEST%\bin\pdfimport +..\%__SRC%\bin\presentation-minimizer.oxt %_DEST%\bin\presentation-minimizer.oxt +..\%__SRC%\bin\presenter-screen.oxt %_DEST%\bin\presenter-screen.oxt +..\%__SRC%\bin\pdfimport.oxt %_DEST%\bin\pdfimport.oxt +..\%__SRC%\bin\pdf2xml.* %_DEST%\bin\pdf2xml.* +..\%__SRC%\bin\pdfunzip.* %_DEST%\bin\pdfunzip.* +..\%__SRC%\bin\pdfimport.oxt %_DEST%\bin\pdfimport\pdfimport.oxt +..\%__SRC%\bin\presentation-minimizer.oxt %_DEST%\bin\minimizer\presentation-minimizer.oxt +..\%__SRC%\bin\presentation_minimizer_develop.zip %_DEST%\bin\minimizer\presentation_minimizer_develop.zip +..\%__SRC%\bin\presenter-screen.oxt %_DEST%\bin\presenter\presenter-screen.oxt +..\%__SRC%\bin\presenter-screen_develop.zip %_DEST%\bin\presenter\presenter-screen_develop.zip diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx index 07da054b7aa4..449dfe79e702 100644 --- a/sdext/source/minimizer/configurationaccess.cxx +++ b/sdext/source/minimizer/configurationaccess.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,6 +36,7 @@ #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/util/XMacroExpander.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp> +#include <sal/macros.h> using namespace ::rtl; using namespace ::com::sun::star; @@ -132,7 +134,7 @@ void OptimizerSettings::SaveSettingsToConfiguration( const Reference< XNameRepla // Any( maFilterName ), Any( mbOpenNewDocument ) }; - sal_Int32 i, nCount = sizeof( pNames ) / sizeof( OUString ); + sal_Int32 i, nCount = SAL_N_ELEMENTS( pNames ); for ( i = 0; i < nCount; i++ ) { @@ -535,3 +537,5 @@ std::vector< OptimizerSettings >::iterator ConfigurationAccess::GetOptimizerSett } return aIter; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/configurationaccess.hxx b/sdext/source/minimizer/configurationaccess.hxx index 5c9060250e17..436ae90fe071 100644 --- a/sdext/source/minimizer/configurationaccess.hxx +++ b/sdext/source/minimizer/configurationaccess.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -137,3 +138,4 @@ class ConfigurationAccess #endif // _CONFIGURATION_ACCESS_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/description.xml b/sdext/source/minimizer/description.xml index a4f172d0ebe6..f10e8c21efa8 100644 --- a/sdext/source/minimizer/description.xml +++ b/sdext/source/minimizer/description.xml @@ -11,12 +11,6 @@ <OpenOffice.org-minimal-version value="2.3" dep:name="OpenOffice.org 2.3"/> </dependencies> - <registration> - <simple-license accept-by="admin" default-license-id="lic-en-US" suppress-if-required="true" > - <license-text xlink:href="licensefile" lang="isocode" license-id="lic-isocode"/> - </simple-license> - </registration> - <version value="1.0.3"/> <platform value="UPDATED_SUPPORTED_PLATFORM"/> @@ -31,7 +25,6 @@ <icon> <default xlink:href="bitmaps/extension_32.png" /> - <high-contrast xlink:href="bitmaps/extension_32_h.png" /> </icon> </description> diff --git a/sdext/source/minimizer/fileopendialog.cxx b/sdext/source/minimizer/fileopendialog.cxx index 3bb42da1f2f4..6091e34cf614 100644 --- a/sdext/source/minimizer/fileopendialog.cxx +++ b/sdext/source/minimizer/fileopendialog.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -45,9 +46,7 @@ #include <com/sun/star/ui/dialogs/XFilePreview.hpp> #include <com/sun/star/ui/dialogs/XFilterManager.hpp> #include <com/sun/star/ui/dialogs/XFilterGroupManager.hpp> -#ifndef _COM_SUN_STAR_UI_DIALOGS_XFOLDERPICKER_HDL_ #include <com/sun/star/ui/dialogs/XFolderPicker.hpp> -#endif #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/PropertyValue.hpp> @@ -207,3 +206,5 @@ void FileOpenDialog::setDefaultName( const rtl::OUString& rDefaultName ) } return aFilterName; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/fileopendialog.hxx b/sdext/source/minimizer/fileopendialog.hxx index af6b49f24f9d..8ddbba752113 100644 --- a/sdext/source/minimizer/fileopendialog.hxx +++ b/sdext/source/minimizer/fileopendialog.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,3 +71,4 @@ public : #endif // _FILEOPEN_DIALOG_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/graphiccollector.cxx b/sdext/source/minimizer/graphiccollector.cxx index b88f49714396..5a401e7f0e66 100644 --- a/sdext/source/minimizer/graphiccollector.cxx +++ b/sdext/source/minimizer/graphiccollector.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -73,7 +74,7 @@ const DeviceInfo& GraphicCollector::GetDeviceInfo( const Reference< XComponentCo void ImpAddEntity( std::vector< GraphicCollector::GraphicEntity >& rGraphicEntities, const GraphicSettings& rGraphicSettings, const GraphicCollector::GraphicUser& rUser ) { const rtl::OUString aGraphicURL( rUser.maGraphicURL ); - const rtl::OUString sPackageURL( OUString::createFromAscii( "vnd.sun.star.GraphicObject:" ) ); + const rtl::OUString sPackageURL( RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.GraphicObject:") ); if ( rGraphicSettings.mbEmbedLinkedGraphics || ( !aGraphicURL.getLength() || aGraphicURL.match( sPackageURL, 0 ) ) ) { @@ -89,7 +90,7 @@ void ImpAddEntity( std::vector< GraphicCollector::GraphicEntity >& rGraphicEntit aIter->maUser.push_back( rUser ); break; } - aIter++; + ++aIter; } if ( aIter == rGraphicEntities.end() ) { @@ -339,12 +340,12 @@ void GraphicCollector::CollectGraphics( const Reference< XComponentContext >& rx } else aGraphicIter->mbRemoveCropArea = sal_False; - aGUIter++; + ++aGUIter; } } if ( !aGraphicIter->mbRemoveCropArea ) aGraphicIter->maGraphicCropLogic = text::GraphicCrop( 0, 0, 0, 0 ); - aGraphicIter++; + ++aGraphicIter; } } catch ( Exception& ) @@ -458,3 +459,4 @@ void GraphicCollector::CountGraphics( const Reference< XComponentContext >& rxMS } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/graphiccollector.hxx b/sdext/source/minimizer/graphiccollector.hxx index f7cd6dd06674..488cc46b8bfc 100644 --- a/sdext/source/minimizer/graphiccollector.hxx +++ b/sdext/source/minimizer/graphiccollector.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -103,3 +104,5 @@ class GraphicCollector #endif // GRAPHICCOLLECTOR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/impoptimizer.cxx b/sdext/source/minimizer/impoptimizer.cxx index 59c5db83711e..2c1f826140bc 100644 --- a/sdext/source/minimizer/impoptimizer.cxx +++ b/sdext/source/minimizer/impoptimizer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -47,9 +48,7 @@ #include <com/sun/star/frame/XDesktop.hpp> #include <com/sun/star/awt/XWindow.hpp> #include <com/sun/star/frame/XStorable.hpp> -#ifndef _COM_SUN_STAR_FRAME_FrameSearchFlag_HPP_ #include <com/sun/star/frame/FrameSearchFlag.hpp> -#endif #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/graphic/XGraphicProvider.hpp> #include <unotools/configmgr.hxx> @@ -65,9 +64,7 @@ #include <com/sun/star/presentation/XPresentationPage.hpp> #include <com/sun/star/document/XFilter.hpp> #include <com/sun/star/document/XExporter.hpp> -#ifndef _COM_SUN_STAR_UNO_RUNTIME_EXCEPTION_HPP_ #include <com/sun/star/uno/RuntimeException.hpp> -#endif #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/graphic/XGraphicProvider.hpp> #include <com/sun/star/graphic/GraphicType.hpp> @@ -123,7 +120,7 @@ void ImpDeleteUnusedMasterPages( const Reference< XModel >& rxModel ) { if ( !aIter->bUsed ) xMasterPages->remove( aIter->xMasterPage ); - aIter++; + ++aIter; } } @@ -354,9 +351,9 @@ Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >& } if ( bNeedsOptimizing && aDestSizePixel.Width && aDestSizePixel.Height ) { - Reference< XStream > xTempFile( rxMSF->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.io.TempFile" ), rxMSF ), UNO_QUERY_THROW ); + Reference< XStream > xTempFile( rxMSF->getServiceManager()->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile")), rxMSF ), UNO_QUERY_THROW ); Reference< XOutputStream > xOutputStream( xTempFile->getOutputStream() ); - Reference< XGraphicProvider > xGraphicProvider( rxMSF->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.graphic.GraphicProvider" ), rxMSF ), UNO_QUERY_THROW ); + Reference< XGraphicProvider > xGraphicProvider( rxMSF->getServiceManager()->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.graphic.GraphicProvider")), rxMSF ), UNO_QUERY_THROW ); ImpCompressGraphic( xGraphicProvider, xGraphic, xOutputStream, aDestMimeType, aLogicalSize, rGraphicSettings.mnJPEGQuality, rGraphicSettings.mnImageResolution, bRemoveCropArea, aGraphicCropLogic ); Reference< XInputStream > xInputStream( xTempFile->getInputStream() ); @@ -374,9 +371,9 @@ Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >& else // this is a metafile { rtl::OUString aDestMimeType( aSourceMimeType ); - Reference< XStream > xTempFile( rxMSF->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.io.TempFile" ), rxMSF ), UNO_QUERY_THROW ); + Reference< XStream > xTempFile( rxMSF->getServiceManager()->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile")), rxMSF ), UNO_QUERY_THROW ); Reference< XOutputStream > xOutputStream( xTempFile->getOutputStream() ); - Reference< XGraphicProvider > xGraphicProvider( rxMSF->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.graphic.GraphicProvider" ), rxMSF ), UNO_QUERY_THROW ); + Reference< XGraphicProvider > xGraphicProvider( rxMSF->getServiceManager()->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.graphic.GraphicProvider")), rxMSF ), UNO_QUERY_THROW ); ImpCompressGraphic( xGraphicProvider, xGraphic, xOutputStream, aDestMimeType, aLogicalSize, rGraphicSettings.mnJPEGQuality, rGraphicSettings.mnImageResolution, sal_False, aGraphicCropLogic ); Reference< XInputStream > xInputStream( xTempFile->getInputStream() ); Reference< XSeekable > xSeekable( xInputStream, UNO_QUERY_THROW ); @@ -484,12 +481,12 @@ void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentCont aGraphicUserIter->mxPagePropertySet->setPropertyValue( TKGet( TK_Background ), Any( rxPropertySet ) ); } } - aGraphicUserIter++; + ++aGraphicUserIter; } } } } - aGraphicIter++; + ++aGraphicIter; } } catch ( Exception& ) @@ -770,3 +767,4 @@ sal_Bool ImpOptimizer::Optimize( const Sequence< PropertyValue >& rArguments ) return bRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/impoptimizer.hxx b/sdext/source/minimizer/impoptimizer.hxx index 9dacb8b1f2cc..ac3b4e8c36e4 100644 --- a/sdext/source/minimizer/impoptimizer.hxx +++ b/sdext/source/minimizer/impoptimizer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,9 +36,7 @@ #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/task/XStatusIndicator.hpp> #include <com/sun/star/beans/PropertyValue.hpp> -#ifndef _COM_SUN_STAR_LANG_XMULTI_COMPONENT_FACTORY_HPP_ #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#endif #include <com/sun/star/uno/XComponentContext.hpp> class Point; @@ -85,3 +84,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/informationdialog.cxx b/sdext/source/minimizer/informationdialog.cxx index 089c81f55a6a..946b90f5298c 100644 --- a/sdext/source/minimizer/informationdialog.cxx +++ b/sdext/source/minimizer/informationdialog.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,6 +35,7 @@ #include <com/sun/star/graphic/XGraphicProvider.hpp> #include <com/sun/star/graphic/XGraphic.hpp> #include <rtl/ustrbuf.hxx> +#include <sal/macros.h> #include "com/sun/star/util/URL.hpp" #include "com/sun/star/util/XURLTransformer.hpp" @@ -87,7 +89,7 @@ rtl::OUString InsertFixedText( InformationDialog& rInformationDialog, const rtl: Any( nTabIndex ), Any( nWidth ) }; - sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); + sal_Int32 nCount = SAL_N_ELEMENTS( pNames ); Sequence< rtl::OUString > aNames( pNames, nCount ); Sequence< Any > aValues( pValues, nCount ); @@ -116,7 +118,7 @@ rtl::OUString InsertImage( InformationDialog& rInformationDialog, const OUString Any( nPosY ), Any( sal_True ), Any( nWidth ) }; - sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); + sal_Int32 nCount = SAL_N_ELEMENTS( pNames ); Sequence< rtl::OUString > aNames( pNames, nCount ); Sequence< Any > aValues( pValues, nCount ); @@ -149,7 +151,7 @@ rtl::OUString InsertCheckBox( InformationDialog& rInformationDialog, const OUStr Any( nTabIndex ), Any( nWidth ) }; - sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); + sal_Int32 nCount = SAL_N_ELEMENTS( pNames ); Sequence< rtl::OUString > aNames( pNames, nCount ); Sequence< Any > aValues( pValues, nCount ); @@ -186,7 +188,7 @@ rtl::OUString InsertButton( InformationDialog& rInformationDialog, const OUStrin Any( nWidth ) }; - sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); + sal_Int32 nCount = SAL_N_ELEMENTS( pNames ); Sequence< rtl::OUString > aNames( pNames, nCount ); Sequence< Any > aValues( pValues, nCount ); @@ -213,15 +215,15 @@ OUString InformationDialog::ImpGetStandardImage( const OUString& sPrivateURL ) rtl::OUString sURL; try { - mxTempFile = Reference< XStream >( mxMSF->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.io.TempFile" ), mxMSF ), UNO_QUERY_THROW ); + mxTempFile = Reference< XStream >( mxMSF->getServiceManager()->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile")), mxMSF ), UNO_QUERY_THROW ); Reference< XPropertySet > xPropSet( mxTempFile, UNO_QUERY ); Reference< XOutputStream > xOutputStream( mxTempFile->getOutputStream() ); if ( xOutputStream.is() && xPropSet.is() ) { Reference< graphic::XGraphicProvider > xGraphicProvider( mxMSF->getServiceManager()->createInstanceWithContext( - OUString::createFromAscii( "com.sun.star.graphic.GraphicProvider" ), mxMSF ), UNO_QUERY_THROW ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.graphic.GraphicProvider")), mxMSF ), UNO_QUERY_THROW ); Sequence< PropertyValue > aArgs( 1 ); - aArgs[ 0 ].Name = OUString::createFromAscii( "URL" ); + aArgs[ 0 ].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("URL")); aArgs[ 0 ].Value <<= sPrivateURL; Reference< graphic::XGraphic > xGraphic( xGraphicProvider->queryGraphic( aArgs ) ); if ( xGraphic.is() ) @@ -234,7 +236,7 @@ OUString InformationDialog::ImpGetStandardImage( const OUString& sPrivateURL ) aArgs2[ 1 ].Value <<= xOutputStream; xGraphicProvider->storeGraphic( xGraphic, aArgs2 ); } - xPropSet->getPropertyValue( OUString::createFromAscii( "Uri" ) ) >>= sURL; + xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")) ) >>= sURL; } } catch( Exception& ) @@ -268,7 +270,7 @@ void InformationDialog::InitDialog() Any( getString( STR_SUN_OPTIMIZATION_WIZARD2 ) ), Any( sal_Int32( DIALOG_WIDTH ) ) }; - sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); + sal_Int32 nCount = SAL_N_ELEMENTS( pNames ); Sequence< rtl::OUString > aNames( pNames, nCount ); Sequence< Any > aValues( pValues, nCount ); @@ -320,7 +322,8 @@ void InformationDialog::InitDialog() OUString aInfoString( getString( eInfoString ) ); const OUString aOldSizePlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%OLDFILESIZE" ) ); const OUString aNewSizePlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%NEWFILESIZE" ) ); - const OUString aTitlePlaceholder( aTitle.getLength() ? OUString::createFromAscii( "%TITLE" ) : OUString::createFromAscii( "'%TITLE'" ) ); + const OUString aTitlePlaceholder( aTitle.getLength() ? OUString(RTL_CONSTASCII_USTRINGPARAM("%TITLE" )) + : OUString(RTL_CONSTASCII_USTRINGPARAM("'%TITLE'")) ); sal_Int32 i = aInfoString.indexOf( aOldSizePlaceholder, 0 ); if ( i >= 0 ) @@ -335,11 +338,11 @@ void InformationDialog::InitDialog() aInfoString = aInfoString.replaceAt( k, aTitlePlaceholder.getLength(), aTitle ); com::sun::star::uno::Reference< com::sun::star::awt::XItemListener > xItemListener; - InsertImage( *this, rtl::OUString( rtl::OUString::createFromAscii( "aboutimage" ) ), ImpGetStandardImage( rtl::OUString::createFromAscii( "private:standardimage/query" ) ), 5, 5, 25, 25 ); - InsertFixedText( *this, rtl::OUString( rtl::OUString::createFromAscii( "fixedtext" ) ), aInfoString, PAGE_POS_X, 6, PAGE_WIDTH, 24, sal_True, 0 ); + InsertImage( *this, rtl::OUString( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("aboutimage")) ), ImpGetStandardImage( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:standardimage/query")) ), 5, 5, 25, 25 ); + InsertFixedText( *this, rtl::OUString( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("fixedtext")) ), aInfoString, PAGE_POS_X, 6, PAGE_WIDTH, 24, sal_True, 0 ); if ( maSaveAsURL.getLength() ) InsertCheckBox( *this, TKGet( TK_OpenNewDocument ), xItemListener, getString( STR_AUTOMATICALLY_OPEN ), PAGE_POS_X, 42, PAGE_WIDTH, 8, 1 ); - InsertButton( *this, rtl::OUString( rtl::OUString::createFromAscii( "button" ) ), mxActionListener, DIALOG_WIDTH / 2 - 25, nDialogHeight - 20, 50, 14, 2, STR_OK ); + InsertButton( *this, rtl::OUString( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("button")) ), mxActionListener, DIALOG_WIDTH / 2 - 25, nDialogHeight - 20, 50, 14, 2, STR_OK ); sal_Bool bOpenNewDocument = mrbOpenNewDocument; setControlProperty( TKGet( TK_OpenNewDocument ), TKGet( TK_State ), Any( (sal_Int16)bOpenNewDocument ) ); @@ -397,7 +400,7 @@ sal_Bool InformationDialog::execute() void OKActionListener::actionPerformed( const ActionEvent& rEvent ) throw ( com::sun::star::uno::RuntimeException ) { - if ( rEvent.ActionCommand == rtl::OUString( rtl::OUString::createFromAscii( "button" ) ) ) + if ( rEvent.ActionCommand == rtl::OUString( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("button")) ) ) { mrInformationDialog.endExecute( sal_True ); } @@ -406,3 +409,5 @@ void OKActionListener::disposing( const ::com::sun::star::lang::EventObject& /* throw ( com::sun::star::uno::RuntimeException ) { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/informationdialog.hxx b/sdext/source/minimizer/informationdialog.hxx index 30a43774efee..44d2d4c035be 100644 --- a/sdext/source/minimizer/informationdialog.hxx +++ b/sdext/source/minimizer/informationdialog.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -97,3 +98,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/makefile.mk b/sdext/source/minimizer/makefile.mk index 41581199fb54..164f106c0c5d 100644 --- a/sdext/source/minimizer/makefile.mk +++ b/sdext/source/minimizer/makefile.mk @@ -38,7 +38,6 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : $(PRJ)$/util$/makefile.pmk # set in minimizer.pmk -#EXTENSIONNAME:=PresentationMinimizer EXTENSION_ZIPNAME:=presentation-minimizer .IF "$(ENABLE_MINIMIZER)" != "YES" @@ -98,14 +97,10 @@ COMPONENT_LIBRARIES= \ COMPONENT_BITMAPS= \ $(EXTENSIONDIR)$/bitmaps$/opt_16.png \ $(EXTENSIONDIR)$/bitmaps$/opt_26.png \ - $(EXTENSIONDIR)$/bitmaps$/opt_16_h.png \ - $(EXTENSIONDIR)$/bitmaps$/opt_26_h.png \ - $(EXTENSIONDIR)$/bitmaps$/minimizepresi_80.png \ - $(EXTENSIONDIR)$/bitmaps$/minimizepresi_80_h.png + $(EXTENSIONDIR)$/bitmaps$/minimizepresi_80.png COMPONENT_IMAGES=\ - $(EXTENSIONDIR)$/bitmaps$/extension_32.png \ - $(EXTENSIONDIR)$/bitmaps$/extension_32_h.png + $(EXTENSIONDIR)$/bitmaps$/extension_32.png # rather freestyle or common to all? COMPONENT_HELP= \ diff --git a/sdext/source/minimizer/optimizationstats.cxx b/sdext/source/minimizer/optimizationstats.cxx index 3c5605345f6c..8f6eaeeb7f1c 100644 --- a/sdext/source/minimizer/optimizationstats.cxx +++ b/sdext/source/minimizer/optimizationstats.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -100,3 +101,5 @@ void OptimizationStats::InitializeStatusValuesFromDocument( Reference< XModel > { } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/optimizationstats.hxx b/sdext/source/minimizer/optimizationstats.hxx index 361200dde85c..3359b5888627 100644 --- a/sdext/source/minimizer/optimizationstats.hxx +++ b/sdext/source/minimizer/optimizationstats.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,3 +62,5 @@ class OptimizationStats #endif // OPTIMIZATIONSTATS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/optimizerdialog.cxx b/sdext/source/minimizer/optimizerdialog.cxx index 6966e342da92..3d60123496fd 100644 --- a/sdext/source/minimizer/optimizerdialog.cxx +++ b/sdext/source/minimizer/optimizerdialog.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,11 +34,10 @@ #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> #include <com/sun/star/ucb/XSimpleFileAccess.hpp> #include <com/sun/star/io/XInputStream.hpp> -#ifndef _COM_SUN_STAR_UTIL_XCloseBroadcaster_HPP_ #include <com/sun/star/util/XCloseBroadcaster.hpp> -#endif #include <com/sun/star/frame/XComponentLoader.hpp> #include <com/sun/star/frame/XLayoutManager.hpp> +#include <sal/macros.h> #include <osl/time.h> // ------------------- @@ -81,7 +81,7 @@ void OptimizerDialog::InitDialog() Any( getString( STR_SUN_OPTIMIZATION_WIZARD2 ) ), Any( sal_Int32( OD_DIALOG_WIDTH ) ) }; - sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); + sal_Int32 nCount = SAL_N_ELEMENTS( pNames ); Sequence< rtl::OUString > aNames( pNames, nCount ); Sequence< Any > aValues( pValues, nCount ); @@ -111,7 +111,7 @@ void OptimizerDialog::InitRoadmap() Any( mnTabIndex++ ), Any( sal_Int32( 85 ) ) }; - sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); + sal_Int32 nCount = SAL_N_ELEMENTS( pNames ); Sequence< rtl::OUString > aNames( pNames, nCount ); Sequence< Any > aValues( pValues, nCount ); @@ -129,8 +129,7 @@ void OptimizerDialog::InitRoadmap() InsertRoadmapItem( 4, sal_True, getString( STR_SUMMARY ), ITEM_ID_SUMMARY ); rtl::OUString sBitmapPath( getPath( TK_BitmapPath ) ); - rtl::OUString sBitmap( isHighContrast() ? rtl::OUString::createFromAscii( "/minimizepresi_80_h.png" ) - : rtl::OUString::createFromAscii( "/minimizepresi_80.png" ) ); + rtl::OUString sBitmap( RTL_CONSTASCII_USTRINGPARAM("/minimizepresi_80.png") ); rtl::OUString sURL( sBitmapPath += sBitmap ); xPropertySet->setPropertyValue( TKGet( TK_ImageURL ), Any( sURL ) ); @@ -523,12 +522,12 @@ void ActionListener::actionPerformed( const ActionEvent& rEvent ) { rtl::OUString sHelpFile( mrOptimizerDialog.getPath( TK_HelpFile ) ); Reference< XDesktop > desktop( mrOptimizerDialog.GetComponentContext()->getServiceManager()->createInstanceWithContext( - OUString::createFromAscii( "com.sun.star.frame.Desktop" ), mrOptimizerDialog.GetComponentContext() ), UNO_QUERY_THROW ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")), mrOptimizerDialog.GetComponentContext() ), UNO_QUERY_THROW ); Reference< XSimpleFileAccess > xSimpleFileAccess( mrOptimizerDialog.GetComponentContext()->getServiceManager()->createInstanceWithContext( - OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ), mrOptimizerDialog.GetComponentContext() ), UNO_QUERY_THROW ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")), mrOptimizerDialog.GetComponentContext() ), UNO_QUERY_THROW ); Reference< XInputStream > xInputStream( xSimpleFileAccess->openFileRead( sHelpFile ) ); Reference< XDesktop > xDesktop( mrOptimizerDialog.GetComponentContext()->getServiceManager()->createInstanceWithContext( - OUString::createFromAscii( "com.sun.star.frame.Desktop" ), mrOptimizerDialog.GetComponentContext() ), UNO_QUERY_THROW ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")), mrOptimizerDialog.GetComponentContext() ), UNO_QUERY_THROW ); Reference< XFrame > xDesktopFrame( xDesktop, UNO_QUERY_THROW ); xHelpFrame = Reference< XFrame >( xDesktopFrame->findFrame( TKGet( TK__blank ), 0 ) ); Reference< XCloseBroadcaster > xCloseBroadcaster( xHelpFrame, UNO_QUERY_THROW ); @@ -541,16 +540,16 @@ void ActionListener::actionPerformed( const ActionEvent& rEvent ) aLoadProps[ 1 ].Name = TKGet( TK_InputStream ); aLoadProps[ 1 ].Value <<= xInputStream; - Reference< XComponent >( xLoader->loadComponentFromURL( OUString::createFromAscii( "private:stream" ), + Reference< XComponent >( xLoader->loadComponentFromURL( OUString(RTL_CONSTASCII_USTRINGPARAM("private:stream")), TKGet( TK__self ), 0, aLoadProps ) ); Reference< XPropertySet > xPropSet( xHelpFrame, UNO_QUERY_THROW ); Reference< XLayoutManager > xLayoutManager; - if ( xPropSet->getPropertyValue( OUString::createFromAscii( "LayoutManager" ) ) >>= xLayoutManager ) + if ( xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LayoutManager")) ) >>= xLayoutManager ) { xLayoutManager->setVisible( sal_False ); - xLayoutManager->hideElement( OUString::createFromAscii( "private:resource/menubar/menubar" ) ); - xLayoutManager->destroyElement( OUString::createFromAscii( "private:resource/statusbar/statusbar" ) ); + xLayoutManager->hideElement( OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/menubar/menubar")) ); + xLayoutManager->destroyElement( OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/statusbar/statusbar")) ); } } } @@ -603,7 +602,7 @@ void ActionListener::actionPerformed( const ActionEvent& rEvent ) aLocation = aLocation.copy( 0, nIndex ); // adding .mini - aLocation = aLocation.concat( OUString::createFromAscii( ".mini" ) ); + aLocation = aLocation.concat( OUString(RTL_CONSTASCII_USTRINGPARAM(".mini")) ); aFileOpenDialog.setDefaultName( aLocation ); } } @@ -653,7 +652,7 @@ void ActionListener::actionPerformed( const ActionEvent& rEvent ) aArgs[ 0 ] <<= mrOptimizerDialog.GetFrame(); Reference < XDispatch > xDispatch( mrOptimizerDialog.GetComponentContext()->getServiceManager()->createInstanceWithArgumentsAndContext( - OUString::createFromAscii( "com.sun.star.comp.PPPOptimizer" ), aArgs, mrOptimizerDialog.GetComponentContext() ), UNO_QUERY ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.PPPOptimizer")), aArgs, mrOptimizerDialog.GetComponentContext() ), UNO_QUERY ); URL aURL; aURL.Protocol = OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.com.sun.star.comp.PPPOptimizer:" ) ); @@ -837,3 +836,5 @@ void HelpCloseListener::disposing( const EventObject& ) throw ( RuntimeException { mrXFrame = NULL; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/optimizerdialog.hxx b/sdext/source/minimizer/optimizerdialog.hxx index bb01a5f06c56..08036c056069 100644 --- a/sdext/source/minimizer/optimizerdialog.hxx +++ b/sdext/source/minimizer/optimizerdialog.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,9 +28,7 @@ #ifndef OPTIMIZERDIALOG_HXX #define OPTIMIZERDIALOG_HXX -#ifndef _OPTIMIZERDIALOG_HRC #include "optimizerdialog.hrc" -#endif #include <vector> #include "unodialog.hxx" #include "pppoptimizertoken.hxx" @@ -48,9 +47,7 @@ #include <com/sun/star/view/XSelectionSupplier.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/awt/XItemEventBroadcaster.hpp> -#ifndef _COM_SUN_STAR_UTIL_XCloseListener_HPP_ #include <com/sun/star/util/XCloseListener.hpp> -#endif #include <com/sun/star/frame/XStorable.hpp> #include <com/sun/star/frame/XDispatch.hpp> #include <com/sun/star/frame/XDesktop.hpp> @@ -247,3 +244,5 @@ private: #endif // OPTIMIZERDIALOG_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/optimizerdialogcontrols.cxx b/sdext/source/minimizer/optimizerdialogcontrols.cxx index 8f5761b3be6a..d5af7018ec4c 100644 --- a/sdext/source/minimizer/optimizerdialogcontrols.cxx +++ b/sdext/source/minimizer/optimizerdialogcontrols.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -40,10 +41,9 @@ #include <com/sun/star/drawing/XMasterPagesSupplier.hpp> #include <com/sun/star/drawing/XDrawPagesSupplier.hpp> #include <com/sun/star/awt/FontDescriptor.hpp> -#ifndef _COM_SUN_STAR_AWT_XFONTWEIGHT_HPP_ #include <com/sun/star/awt/FontWeight.hpp> -#endif #include <rtl/ustrbuf.hxx> +#include <sal/macros.h> using namespace ::rtl; using namespace ::com::sun::star::awt; @@ -90,7 +90,7 @@ rtl::OUString InsertSeparator( OptimizerDialog& rOptimizerDialog, const OUString Any( sal_Int16( 0 ) ), Any( nWidth ) }; - sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); + sal_Int32 nCount = SAL_N_ELEMENTS( pNames ); Sequence< rtl::OUString > aNames( pNames, nCount ); Sequence< Any > aValues( pValues, nCount ); @@ -128,7 +128,7 @@ rtl::OUString InsertButton( OptimizerDialog& rOptimizerDialog, const OUString& r Any( nWidth ) }; - sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); + sal_Int32 nCount = SAL_N_ELEMENTS( pNames ); Sequence< rtl::OUString > aNames( pNames, nCount ); Sequence< Any > aValues( pValues, nCount ); @@ -162,7 +162,7 @@ rtl::OUString InsertFixedText( OptimizerDialog& rOptimizerDialog, const rtl::OUS Any( nTabIndex ), Any( nWidth ) }; - sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); + sal_Int32 nCount = SAL_N_ELEMENTS( pNames ); Sequence< rtl::OUString > aNames( pNames, nCount ); Sequence< Any > aValues( pValues, nCount ); @@ -199,7 +199,7 @@ rtl::OUString InsertCheckBox( OptimizerDialog& rOptimizerDialog, const OUString& Any( nTabIndex ), Any( nWidth ) }; - sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); + sal_Int32 nCount = SAL_N_ELEMENTS( pNames ); Sequence< rtl::OUString > aNames( pNames, nCount ); Sequence< Any > aValues( pValues, nCount ); @@ -242,7 +242,7 @@ rtl::OUString InsertFormattedField( OptimizerDialog& rOptimizerDialog, const OUS Any( nTabIndex ), Any( nWidth ) }; - sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); + sal_Int32 nCount = SAL_N_ELEMENTS( pNames ); Sequence< rtl::OUString > aNames( pNames, nCount ); Sequence< Any > aValues( pValues, nCount ); @@ -288,7 +288,7 @@ rtl::OUString InsertComboBox( OptimizerDialog& rOptimizerDialog, const OUString& Any( nTabIndex ), Any( nWidth ) }; - sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); + sal_Int32 nCount = SAL_N_ELEMENTS( pNames ); Sequence< rtl::OUString > aNames( pNames, nCount ); Sequence< Any > aValues( pValues, nCount ); @@ -324,7 +324,7 @@ rtl::OUString InsertRadioButton( OptimizerDialog& rOptimizerDialog, const rtl::O Any( nTabIndex ), Any( nWidth ) }; - sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); + sal_Int32 nCount = SAL_N_ELEMENTS( pNames ); Sequence< rtl::OUString > aNames( pNames, nCount ); Sequence< Any > aValues( pValues, nCount ); @@ -367,7 +367,7 @@ rtl::OUString InsertListBox( OptimizerDialog& rOptimizerDialog, const OUString& Any( nTabIndex ), Any( nWidth ) }; - sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); + sal_Int32 nCount = SAL_N_ELEMENTS( pNames ); Sequence< rtl::OUString > aNames( pNames, nCount ); Sequence< Any > aValues( pValues, nCount ); @@ -609,7 +609,7 @@ static OUString ImpValueOfInMB( const sal_Int64& rVal, sal_Unicode nSeparator = aVal.setLength( nX + 2 ); aVal.setCharAt( nX, nSeparator ); } - aVal.append( OUString::createFromAscii( " MB" ) ); + aVal.append( OUString(RTL_CONSTASCII_USTRINGPARAM(" MB")) ); return aVal.makeStringAndClear(); } @@ -707,7 +707,7 @@ void OptimizerDialog::UpdateControlStatesPage4() if (!bVisible ) nDeletedSlides++; } - aIter++; + ++aIter; } } else @@ -740,7 +740,7 @@ void OptimizerDialog::UpdateControlStatesPage4() { if ( !aIter->bUsed ) nDeletedSlides++; - aIter++; + ++aIter; } } if ( nDeletedSlides > 1 ) @@ -868,7 +868,7 @@ void OptimizerDialog::InitPage4() Any( (sal_Int32)( 0 ) ), Any( (sal_Int32)( PAGE_WIDTH - 12 ) ) }; - sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); + sal_Int32 nCount = SAL_N_ELEMENTS( pNames ); Sequence< rtl::OUString > aNames( pNames, nCount ); Sequence< Any > aValues( pValues, nCount ); @@ -958,3 +958,5 @@ void OptimizerDialog::DeactivatePage( sal_Int16 nStep ) while( aBeg != aEnd ) setVisible( *aBeg++, sal_False ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/pagecollector.cxx b/sdext/source/minimizer/pagecollector.cxx index 55f088e4be4f..811d63f8b96c 100644 --- a/sdext/source/minimizer/pagecollector.cxx +++ b/sdext/source/minimizer/pagecollector.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -74,7 +75,7 @@ void PageCollector::CollectCustomShowPages( const com::sun::star::uno::Reference { if ( *aIter == xDrawPage ) break; - aIter++; + ++aIter; } if ( aIter == aEnd ) rUsedPageList.push_back( xDrawPage ); @@ -95,7 +96,7 @@ void PageCollector::CollectNonCustomShowPages( const com::sun::star::uno::Refere { std::vector< Reference< XDrawPage > > vUsedPageList; PageCollector::CollectCustomShowPages( rxModel, rCustomShowName, vUsedPageList ); - if ( vUsedPageList.size() ) + if ( !vUsedPageList.empty() ) { Reference< XDrawPagesSupplier > xDrawPagesSupplier( rxModel, UNO_QUERY_THROW ); Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW ); @@ -108,7 +109,7 @@ void PageCollector::CollectNonCustomShowPages( const com::sun::star::uno::Refere { if ( *aIter == xDrawPage ) break; - aIter++; + ++aIter; } if ( aIter == aEnd ) rNonUsedPageList.push_back( xDrawPage ); @@ -140,7 +141,7 @@ void PageCollector::CollectMasterPages( const Reference< XModel >& rxModel, std: { if ( aIter->xMasterPage == xMasterPage ) break; - aIter++; + ++aIter; } if ( aIter == aEnd ) { @@ -167,7 +168,7 @@ void PageCollector::CollectMasterPages( const Reference< XModel >& rxModel, std: aIter->bUsed = sal_True; break; } - aIter++; + ++aIter; } if ( aIter == aEnd ) throw uno::RuntimeException(); @@ -178,3 +179,4 @@ void PageCollector::CollectMasterPages( const Reference< XModel >& rxModel, std: } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/pagecollector.hxx b/sdext/source/minimizer/pagecollector.hxx index dcec45b824b5..3387dd92213f 100644 --- a/sdext/source/minimizer/pagecollector.hxx +++ b/sdext/source/minimizer/pagecollector.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -47,3 +48,5 @@ class PageCollector }; #endif // PAGECOLLECTOR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/pppoptimizer.cxx b/sdext/source/minimizer/pppoptimizer.cxx index ea27c7457522..f49bfc551531 100644 --- a/sdext/source/minimizer/pppoptimizer.cxx +++ b/sdext/source/minimizer/pppoptimizer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -159,7 +160,7 @@ void SAL_CALL PPPOptimizer::addStatusListener( const Reference< XStatusListener throw( RuntimeException ) { // TODO - OSL_ENSURE( sal_False, "PPPOptimizer::addStatusListener()\nNot implemented yet!" ); + OSL_FAIL( "PPPOptimizer::addStatusListener()\nNot implemented yet!" ); } //=============================================== @@ -167,7 +168,7 @@ void SAL_CALL PPPOptimizer::removeStatusListener( const Reference< XStatusListen throw( RuntimeException ) { // TODO - OSL_ENSURE( sal_False, "PPPOptimizer::removeStatusListener()\nNot implemented yet!" ); + OSL_FAIL( "PPPOptimizer::removeStatusListener()\nNot implemented yet!" ); } // ----------------------------------------------------------------------------- @@ -207,3 +208,5 @@ Reference< XInterface > PPPOptimizer_createInstance( const Reference< XComponent { return (cppu::OWeakObject*) new PPPOptimizer( rSMgr ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/pppoptimizer.hxx b/sdext/source/minimizer/pppoptimizer.hxx index 556c2f6f1313..eaa4502e8d5f 100644 --- a/sdext/source/minimizer/pppoptimizer.hxx +++ b/sdext/source/minimizer/pppoptimizer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -98,3 +99,5 @@ com::sun::star::uno::Reference< com::sun::star::uno::XInterface > PPPOptimizer_c throw( com::sun::star::uno::Exception ); #endif // PPPOPTIMIZER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/pppoptimizerdialog.cxx b/sdext/source/minimizer/pppoptimizerdialog.cxx index b56f82b10543..a04015ab5be4 100644 --- a/sdext/source/minimizer/pppoptimizerdialog.cxx +++ b/sdext/source/minimizer/pppoptimizerdialog.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -131,19 +132,17 @@ void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL, const Sequence< PropertyValue >& rArguments ) throw( RuntimeException ) { - sal_Int64 nFileSizeSource = 0; - sal_Int64 nFileSizeDest = 0; if ( mxController.is() && ( rURL.Protocol.compareToAscii( "vnd.com.sun.star.comp.SunPresentationMinimizer:" ) == 0 ) ) { if ( rURL.Path.compareToAscii( "execute" ) == 0 ) { - sal_Bool bDialogExecuted = sal_False; - try { + sal_Int64 nFileSizeSource = 0; + sal_Int64 nFileSizeDest = 0; mpOptimizerDialog = new OptimizerDialog( mxMSF, mxFrame, this ); - bDialogExecuted = mpOptimizerDialog->execute(); + mpOptimizerDialog->execute(); const Any* pVal( mpOptimizerDialog->maStats.GetStatusValue( TK_FileSizeSource ) ); if ( pVal ) @@ -154,11 +153,11 @@ void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL, if ( nFileSizeSource && nFileSizeDest ) { - rtl::OUStringBuffer sBuf( rtl::OUString::createFromAscii( "Your Presentation has been minimized from:" ) ); + rtl::OUStringBuffer sBuf( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Your Presentation has been minimized from:")) ); sBuf.append( rtl::OUString::valueOf( nFileSizeSource >> 10 ) ); - sBuf.append( rtl::OUString::createFromAscii( "KB to " ) ); + sBuf.append( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KB to ")) ); sBuf.append( rtl::OUString::valueOf( nFileSizeDest >> 10 ) ); - sBuf.append( rtl::OUString::createFromAscii( "KB." ) ); + sBuf.append( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KB.")) ); OUString sResult( sBuf.makeStringAndClear() ); // mpOptimizerDialog->showMessageBox( sResult, sResult, sal_False ); } @@ -182,7 +181,7 @@ void SAL_CALL PPPOptimizerDialog::addStatusListener( const Reference< XStatusLis throw( RuntimeException ) { // TODO - // OSL_ENSURE( sal_False, "PPPOptimizerDialog::addStatusListener()\nNot implemented yet!" ); + // OSL_FAIL( "PPPOptimizerDialog::addStatusListener()\nNot implemented yet!" ); } //=============================================== @@ -190,7 +189,7 @@ void SAL_CALL PPPOptimizerDialog::removeStatusListener( const Reference< XStatus throw( RuntimeException ) { // TODO - // OSL_ENSURE( sal_False, "PPPOptimizerDialog::removeStatusListener()\nNot implemented yet!" ); + // OSL_FAIL( "PPPOptimizerDialog::removeStatusListener()\nNot implemented yet!" ); } // ----------------------------------------------------------------------------- @@ -215,3 +214,5 @@ Reference< XInterface > PPPOptimizerDialog_createInstance( const Reference< XCom } // ----------------------------------------------------------------------------- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/pppoptimizerdialog.hxx b/sdext/source/minimizer/pppoptimizerdialog.hxx index 9a071f6fb77b..712db18cb7ee 100644 --- a/sdext/source/minimizer/pppoptimizerdialog.hxx +++ b/sdext/source/minimizer/pppoptimizerdialog.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,9 +36,7 @@ #include <com/sun/star/beans/XPropertySetInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/uno/XComponentContext.hpp> -#ifndef _COM_SUN_STAR_LANG_XMULTI_COMPONENT_FACTORY_HPP_ #include <com/sun/star/lang/XMultiComponentFactory.hpp> -#endif #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/frame/XController.hpp> #include <com/sun/star/frame/XDispatch.hpp> @@ -109,3 +108,5 @@ com::sun::star::uno::Reference< com::sun::star::uno::XInterface > PPPOptimizerDi // ----------------------------------------------------------------------------- #endif // PPPOPTIMIZERDIALOG_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/pppoptimizertoken.cxx b/sdext/source/minimizer/pppoptimizertoken.cxx index e44116c02bf8..669132de7cba 100644 --- a/sdext/source/minimizer/pppoptimizertoken.cxx +++ b/sdext/source/minimizer/pppoptimizertoken.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,9 +31,17 @@ #include "pppoptimizertoken.hxx" #include <osl/mutex.hxx> -#include <hash_map> +#include <sal/macros.h> +#include <boost/unordered_map.hpp> #include <string.h> +struct THash +{ + size_t operator()( const char* s ) const + { + return rtl_str_hashCode(s); + } +}; struct TCheck { bool operator()( const char* s1, const char* s2 ) const @@ -40,7 +49,7 @@ struct TCheck return strcmp( s1, s2 ) == 0; } }; -typedef std::hash_map< const char*, PPPOptimizerTokenEnum, std::hash<const char*>, TCheck> TypeNameHashMap; +typedef boost::unordered_map< const char*, PPPOptimizerTokenEnum, THash, TCheck> TypeNameHashMap; static TypeNameHashMap* pHashMap = NULL; static ::osl::Mutex& getHashMapMutex() { @@ -310,7 +319,7 @@ PPPOptimizerTokenEnum TKGet( const rtl::OUString& rToken ) { TypeNameHashMap* pH = new TypeNameHashMap; const TokenTable* pPtr = pTokenTableArray; - const TokenTable* pEnd = pPtr + ( sizeof( pTokenTableArray ) / sizeof( TokenTable ) ); + const TokenTable* pEnd = pPtr + SAL_N_ELEMENTS( pTokenTableArray ); for ( ; pPtr < pEnd; pPtr++ ) (*pH)[ pPtr->pS ] = pPtr->pE; pHashMap = pH; @@ -336,3 +345,5 @@ rtl::OUString TKGet( const PPPOptimizerTokenEnum eToken ) : (sal_uInt32)eToken; return rtl::OUString::createFromAscii( pTokenTableArray[ i ].pS ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/pppoptimizertoken.hxx b/sdext/source/minimizer/pppoptimizertoken.hxx index 553a771c05f3..19ae973c7572 100644 --- a/sdext/source/minimizer/pppoptimizertoken.hxx +++ b/sdext/source/minimizer/pppoptimizertoken.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -281,3 +282,5 @@ PPPOptimizerTokenEnum TKGet( const rtl::OUString& ); rtl::OUString TKGet( const PPPOptimizerTokenEnum ); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/pppoptimizeruno.cxx b/sdext/source/minimizer/pppoptimizeruno.cxx index ae5a10455451..b99e4ced8d67 100644 --- a/sdext/source/minimizer/pppoptimizeruno.cxx +++ b/sdext/source/minimizer/pppoptimizeruno.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,7 +44,7 @@ using namespace ::com::sun::star::registry; extern "C" { - void SAL_CALL component_getImplementationEnvironment( + SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; @@ -61,14 +62,14 @@ extern "C" sal_Int32 nPos; xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( PPPOptimizer_getImplementationName() ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); + xNewKey = xNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")) ); const Sequence< OUString > & rSNL1 = PPPOptimizer_getSupportedServiceNames(); const OUString * pArray1 = rSNL1.getConstArray(); for ( nPos = rSNL1.getLength(); nPos--; ) xNewKey->createKey( pArray1[nPos] ); xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( PPPOptimizerDialog_getImplementationName() ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); + xNewKey = xNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")) ); const Sequence< OUString > & rSNL2 = PPPOptimizerDialog_getSupportedServiceNames(); const OUString * pArray2 = rSNL2.getConstArray(); for ( nPos = rSNL2.getLength(); nPos--; ) @@ -78,7 +79,7 @@ extern "C" } catch (InvalidRegistryException &) { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); + OSL_FAIL( "### InvalidRegistryException!" ); } } return sal_False; @@ -86,7 +87,7 @@ extern "C" // ------------------------------------------------------------------------- - void* SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) + SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { OUString aImplName( OUString::createFromAscii( pImplName ) ); void* pRet = 0; @@ -118,3 +119,5 @@ extern "C" return pRet; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/unodialog.cxx b/sdext/source/minimizer/unodialog.cxx index b9f7b50ca91f..e5f6fdceeed3 100644 --- a/sdext/source/minimizer/unodialog.cxx +++ b/sdext/source/minimizer/unodialog.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -343,55 +344,6 @@ void UnoDialog::setControlProperty( const OUString& rControlName, const OUString } // ----------------------------------------------------------------------------- -#if 0 -void UnoDialog::showMessageBox( const OUString& rTitle, const OUString& rMessage, sal_Bool bErrorBox ) const -{ - try - { - Reference< XMessageBoxFactory > xMessageBoxFactory( mxMSF->getServiceManager()->createInstanceWithContext( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.Toolkit" ) ), mxMSF ), UNO_QUERY_THROW ); - if ( xMessageBoxFactory.is() ) - { - Rectangle aRectangle( 0, 0, 0, 0 ); - Reference< XMessageBox > xMessageBox( xMessageBoxFactory->createMessageBox( mxWindowPeer, aRectangle, - bErrorBox ? OUString( RTL_CONSTASCII_USTRINGPARAM( "errorbox" ) ) : OUString( RTL_CONSTASCII_USTRINGPARAM( "querybox" ) ), MessageBoxButtons::BUTTONS_OK, rTitle, rMessage ) ); - Reference< XComponent > xComponent( xMessageBox, UNO_QUERY_THROW ); - /* sal_Int16 nResult = */ xMessageBox->execute(); - xComponent->dispose(); - } - } - catch ( Exception& ) - { - } - -/* -public void showErrorMessageBox(XWindowPeer _xParentWindowPeer, String _sTitle, String _sMessage){ -XComponent xComponent = null; -try { - Object oToolkit = m_xMCF.createInstanceWithContext("com.sun.star.awt.Toolkit", m_xContext); - XMessageBoxFactory xMessageBoxFactory = (XMessageBoxFactory) UnoRuntime.queryInterface(XMessageBoxFactory.class, oToolkit); - // rectangle may be empty if position is in the center of the parent peer - - Rectangle aRectangle = new Rectangle(); - XMessageBox xMessageBox = xMessageBoxFactory.createMessageBox(_xParentWindowPeer, aRectangle, "errorbox", com.sun.star.awt.MessageBoxButtons.BUTTONS_OK, _sTitle, _sMessage); - xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xMessageBox); - if (xMessageBox != null){ - short nResult = xMessageBox.execute(); - } -} catch (com.sun.star.uno.Exception ex) { - ex.printStackTrace(System.out); -} -finally{ - //make sure always to dispose the component and free the memory! - if (xComponent != null){ - xComponent.dispose(); - } -}} -*/ -} - -#endif - -// ----------------------------------------------------------------------------- sal_Int32 UnoDialog::getMapsFromPixels( sal_Int32 nPixels ) const { @@ -450,3 +402,5 @@ void UnoDialog::disableControl( const OUString& rControlName ) } // ----------------------------------------------------------------------------- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/minimizer/unodialog.hxx b/sdext/source/minimizer/unodialog.hxx index 58a3141b2627..78e3fd0f409c 100644 --- a/sdext/source/minimizer/unodialog.hxx +++ b/sdext/source/minimizer/unodialog.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,9 +31,7 @@ #include <com/sun/star/uno/Sequence.h> #include <com/sun/star/lang/XSingleServiceFactory.hpp> -#ifndef _COM_SUN_STAR_LANG_XMULTI_COMPONENT_FACTORY_HPP_ #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#endif #include <com/sun/star/container/XIndexContainer.hpp> #include <com/sun/star/frame/XController.hpp> #include <com/sun/star/frame/XFrame.hpp> @@ -116,9 +115,7 @@ public : void setControlProperty( const rtl::OUString& rControlName, const rtl::OUString& rPropertyName, const com::sun::star::uno::Any& rPropertyValue ); com::sun::star::uno::Any getControlProperty( const rtl::OUString& rControlName, const rtl::OUString& rPropertyName ); -#if 0 - void showMessageBox( const rtl::OUString& rTitle, const rtl::OUString& rMessage, sal_Bool bErrorBox ) const; -#endif + void enableControl( const rtl::OUString& rControlName ); void disableControl( const rtl::OUString& rControlName ); @@ -147,3 +144,5 @@ public : }; #endif // UNODIALOG_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/config/description.xml b/sdext/source/pdfimport/config/description.xml index 93cdecfc5e4d..300bad702f60 100644 --- a/sdext/source/pdfimport/config/description.xml +++ b/sdext/source/pdfimport/config/description.xml @@ -10,12 +10,6 @@ <OpenOffice.org-minimal-version value="3.0" dep:name="OpenOffice.org 3.0"/> </dependencies> - <registration> - <simple-license accept-by="admin" default-license-id="lic-en-US" suppress-if-required="true" > - <license-text xlink:href="licensefile" lang="isocode" license-id="lic-isocode"/> - </simple-license> - </registration> - <version value="1.0.5" /> <platform value="UPDATED_SUPPORTED_PLATFORM" /> @@ -30,7 +24,6 @@ <icon> <default xlink:href="images/extension_32.png" /> - <high-contrast xlink:href="images/extension_32_h.png" /> </icon> </description> diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index d5fcf30a803c..c75a3eeececa 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -77,7 +78,7 @@ namespace { switch(nIndex) { default: - OSL_ENSURE(false,"Unexpected case!"); + OSL_FAIL("Unexpected case!"); break; case DRAW_INDEX: bDrawState=sal_True; @@ -179,32 +180,6 @@ namespace { return aMethods; } }; -#if 0 // code currently unused (see below) - sal_Int32 queryDocumentTypeDialog( const uno::Reference<uno::XComponentContext>& xContext, - const rtl::OUString& rFilename ) - { - uno::Reference<awt::XDialogProvider2> xDialogProvider( - xContext->getServiceManager()->createInstanceWithContext( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.DialogProvider2" ) ), - xContext ), - uno::UNO_QUERY_THROW ); - rtl::Reference<ChooserDialogHandler> xHandler(new ChooserDialogHandler); - uno::Reference<awt::XDialog> xDialog = xDialogProvider->createDialogWithHandler( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.script:PDFImport.TargetChooser?location=application") ), - uno::Reference<awt::XDialogEventHandler>( - static_cast<cppu::OWeakObject*>(xHandler.get()), uno::UNO_QUERY_THROW)); - xHandler->initControls( - uno::Reference<awt::XControlContainer>( - xDialog, - uno::UNO_QUERY_THROW ), - rFilename ); - - if( !xDialog->execute() ) - return -1; - else - return xHandler->getSelectedItem(); - } -#endif } class FileEmitContext : public pdfparse::EmitContext @@ -380,13 +355,13 @@ rtl::OUString SAL_CALL PDFDetector::detect( uno::Sequence< beans::PropertyValue rtl::OUStringToOString( pAttribs[i].Name, RTL_TEXTENCODING_UTF8 ).getStr(), rtl::OUStringToOString( aVal, RTL_TEXTENCODING_UTF8 ).getStr() ); #endif - if( pAttribs[i].Name.equalsAscii( "InputStream" ) ) + if( pAttribs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InputStream" ) ) ) pAttribs[i].Value >>= xInput; - else if( pAttribs[i].Name.equalsAscii( "URL" ) ) + else if( pAttribs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) pAttribs[i].Value >>= aURL; - else if( pAttribs[i].Name.equalsAscii( "FilterName" ) ) + else if( pAttribs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterName" ) ) ) nFilterNamePos = i; - else if( pAttribs[i].Name.equalsAscii( "Password" ) ) + else if( pAttribs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Password" ) ) ) { nPwdPos = i; pAttribs[i].Value >>= aPwd; @@ -468,15 +443,15 @@ rtl::OUString SAL_CALL PDFDetector::detect( uno::Sequence< beans::PropertyValue osl_removeFile( aURL.pData ); if( aEmbedMimetype.getLength() ) { - if( aEmbedMimetype.equalsAscii( "application/vnd.oasis.opendocument.text" ) - || aEmbedMimetype.equalsAscii( "application/vnd.oasis.opendocument.text-master" ) ) + if( aEmbedMimetype.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.oasis.opendocument.text" ) ) + || aEmbedMimetype.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.oasis.opendocument.text-master" ) ) ) aOutFilterName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "writer_pdf_addstream_import" ) ); - else if( aEmbedMimetype.equalsAscii( "application/vnd.oasis.opendocument.presentation" ) ) + else if( aEmbedMimetype.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.oasis.opendocument.presentation" ) ) ) aOutFilterName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "impress_pdf_addstream_import" ) ); - else if( aEmbedMimetype.equalsAscii( "application/vnd.oasis.opendocument.graphics" ) - || aEmbedMimetype.equalsAscii( "application/vnd.oasis.opendocument.drawing" ) ) + else if( aEmbedMimetype.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.oasis.opendocument.graphics" ) ) + || aEmbedMimetype.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.oasis.opendocument.drawing" ) ) ) aOutFilterName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "draw_pdf_addstream_import" ) ); - else if( aEmbedMimetype.equalsAscii( "application/vnd.oasis.opendocument.spreadsheet" ) ) + else if( aEmbedMimetype.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.oasis.opendocument.spreadsheet" ) ) ) aOutFilterName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "calc_pdf_addstream_import" ) ); } } @@ -545,7 +520,7 @@ rtl::OUString SAL_CALL PDFDetector::detect( uno::Sequence< beans::PropertyValue break; default: - OSL_ENSURE(false,"Unexpected case"); + OSL_FAIL("Unexpected case"); } aOutTypeName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("pdf_Portable_Document_Format") ); @@ -659,7 +634,7 @@ uno::Reference< io::XStream > getAdditionalStream( const rtl::OUString& if( pTrailer && pTrailer->m_pDict ) { // search document checksum entry - std::hash_map< rtl::OString, + boost::unordered_map< rtl::OString, pdfparse::PDFEntry*, rtl::OStringHash >::iterator chk; chk = pTrailer->m_pDict->m_aMap.find( "DocChecksum" ); @@ -676,7 +651,7 @@ uno::Reference< io::XStream > getAdditionalStream( const rtl::OUString& } // search for AdditionalStreams entry - std::hash_map< rtl::OString, + boost::unordered_map< rtl::OString, pdfparse::PDFEntry*, rtl::OStringHash >::iterator add_stream; add_stream = pTrailer->m_pDict->m_aMap.find( "AdditionalStreams" ); @@ -728,7 +703,7 @@ uno::Reference< io::XStream > getAdditionalStream( const rtl::OUString& uno::Reference< task::XInteractionHandler > xIntHdl; for( sal_Int32 i = 0; i < nAttribs; i++ ) { - if( pAttribs[i].Name.equalsAscii( "InteractionHandler" ) ) + if( pAttribs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InteractionHandler" ) ) ) pAttribs[i].Value >>= xIntHdl; } if( ! bMayUseUI || ! xIntHdl.is() ) @@ -778,3 +753,5 @@ uno::Reference< io::XStream > getAdditionalStream( const rtl::OUString& } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/filterdet.hxx b/sdext/source/pdfimport/filterdet.hxx index 4be260eb4254..3532b0180333 100644 --- a/sdext/source/pdfimport/filterdet.hxx +++ b/sdext/source/pdfimport/filterdet.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -112,3 +113,4 @@ bool getPassword( const com::sun::star::uno::Reference< com::sun::star::task::XI #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/inc/contentsink.hxx b/sdext/source/pdfimport/inc/contentsink.hxx index cd0a7d037e35..204eb7499a50 100755..100644 --- a/sdext/source/pdfimport/inc/contentsink.hxx +++ b/sdext/source/pdfimport/inc/contentsink.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -182,3 +183,4 @@ namespace pdfi #endif /* INCLUDED_PDFI_CONTENTSINK_HXX */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/inc/odfemitter.hxx b/sdext/source/pdfimport/inc/odfemitter.hxx index 3b93b13a3c82..d7e1c27097b7 100644 --- a/sdext/source/pdfimport/inc/odfemitter.hxx +++ b/sdext/source/pdfimport/inc/odfemitter.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,3 +44,5 @@ namespace pdfi } #endif /* INCLUDED_PDFI_ODFEMITTER_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/inc/pdfihelper.hxx b/sdext/source/pdfimport/inc/pdfihelper.hxx index e226fb46df73..d8f7d3c60e44 100755..100644 --- a/sdext/source/pdfimport/inc/pdfihelper.hxx +++ b/sdext/source/pdfimport/inc/pdfihelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -40,7 +41,7 @@ #include <com/sun/star/rendering/XColorSpace.hpp> #include <vector> -#include <hash_map> +#include <boost/unordered_map.hpp> // virtual resolution of the PDF OutputDev in dpi #define PDFI_OUTDEV_RESOLUTION 7200 @@ -50,7 +51,7 @@ namespace com { namespace sun { namespace star { namespace task namespace pdfi { - typedef std::hash_map< rtl::OUString, rtl::OUString, rtl::OUStringHash > PropertyMap; + typedef boost::unordered_map< rtl::OUString, rtl::OUString, rtl::OUStringHash > PropertyMap; typedef sal_Int32 ImageId; /// What to do with a polygon. values can be ORed together @@ -200,3 +201,5 @@ namespace pdfi #define USTR(x) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( x ) ) #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/inc/pdfparse.hxx b/sdext/source/pdfimport/inc/pdfparse.hxx index 683c438bdf54..1cfd82e9c4cd 100644 --- a/sdext/source/pdfimport/inc/pdfparse.hxx +++ b/sdext/source/pdfimport/inc/pdfparse.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,7 +34,7 @@ #include <rtl/string.hxx> #include <vector> -#include <hash_map> +#include <boost/unordered_map.hpp> namespace pdfparse { @@ -188,7 +189,7 @@ struct PDFArray : public PDFContainer struct PDFDict : public PDFContainer { - typedef std::hash_map<rtl::OString,PDFEntry*,rtl::OStringHash> Map; + typedef boost::unordered_map<rtl::OString,PDFEntry*,rtl::OStringHash> Map; Map m_aMap; PDFDict() {} @@ -309,3 +310,5 @@ class PDFReader } // namespace #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/inc/saxemitter.hxx b/sdext/source/pdfimport/inc/saxemitter.hxx index 54f5a0fbd554..c8a394ab746e 100644 --- a/sdext/source/pdfimport/inc/saxemitter.hxx +++ b/sdext/source/pdfimport/inc/saxemitter.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -44,3 +45,5 @@ namespace pdfi } #endif /* INCLUDED_PDFI_SAXEMITTER_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/inc/treevisitorfactory.hxx b/sdext/source/pdfimport/inc/treevisitorfactory.hxx index ba42eb759b04..b8f0e7b85805 100644 --- a/sdext/source/pdfimport/inc/treevisitorfactory.hxx +++ b/sdext/source/pdfimport/inc/treevisitorfactory.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -65,3 +66,4 @@ namespace pdfi #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/inc/wrapper.hxx b/sdext/source/pdfimport/inc/wrapper.hxx index 1867bd094aa6..a7ca18574a39 100755..100644 --- a/sdext/source/pdfimport/inc/wrapper.hxx +++ b/sdext/source/pdfimport/inc/wrapper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,3 +62,5 @@ namespace pdfi } #endif /* INCLUDED_PDFI_WRAPPER_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/inc/xmlemitter.hxx b/sdext/source/pdfimport/inc/xmlemitter.hxx index 8fa3b0f16868..3700e67b8006 100644 --- a/sdext/source/pdfimport/inc/xmlemitter.hxx +++ b/sdext/source/pdfimport/inc/xmlemitter.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -58,3 +59,4 @@ namespace pdfi #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/makefile.mk b/sdext/source/pdfimport/makefile.mk index 84440862cbb5..64accdaea7be 100644 --- a/sdext/source/pdfimport/makefile.mk +++ b/sdext/source/pdfimport/makefile.mk @@ -125,8 +125,7 @@ COMPONENT_LIBRARIES= \ $(EXTENSIONDIR)$/$(SHL1TARGET)$(DLLPOST) COMPONENT_IMAGES=\ - $(EXTENSIONDIR)$/images$/extension_32.png \ - $(EXTENSIONDIR)$/images$/extension_32_h.png + $(EXTENSIONDIR)$/images$/extension_32.png EXTENSION_PACKDEPS=$(CONVERTER_FILE) $(COMPONENT_DIALOGS) $(COMPONENT_HELP) $(COMPONENT_IMAGES) makefile.mk diff --git a/sdext/source/pdfimport/misc/pdfihelper.cxx b/sdext/source/pdfimport/misc/pdfihelper.cxx index f434395abbfd..1c888e1e6d1f 100644 --- a/sdext/source/pdfimport/misc/pdfihelper.cxx +++ b/sdext/source/pdfimport/misc/pdfihelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -78,3 +79,4 @@ rtl::OUString pdfi::convertPixelToUnitString( double fPix ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/misc/pwdinteract.cxx b/sdext/source/pdfimport/misc/pwdinteract.cxx index 43dfd1151964..6ef2a17c2875 100644 --- a/sdext/source/pdfimport/misc/pwdinteract.cxx +++ b/sdext/source/pdfimport/misc/pwdinteract.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -161,3 +162,5 @@ bool getPassword( const uno::Reference< task::XInteractionHandler >& xHandler, } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/odf/odfemitter.cxx b/sdext/source/pdfimport/odf/odfemitter.cxx index c834c6074714..c2d30ac16304 100644 --- a/sdext/source/pdfimport/odf/odfemitter.cxx +++ b/sdext/source/pdfimport/odf/odfemitter.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -134,3 +135,5 @@ XmlEmitterSharedPtr createOdfEmitter( const uno::Reference<io::XOutputStream>& x } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/pdfiadaptor.cxx b/sdext/source/pdfimport/pdfiadaptor.cxx index 16af49409fc5..df1a6898dfac 100644 --- a/sdext/source/pdfimport/pdfiadaptor.cxx +++ b/sdext/source/pdfimport/pdfiadaptor.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -84,9 +85,9 @@ sal_Bool SAL_CALL PDFIHybridAdaptor::filter( const uno::Sequence< beans::Propert rtl::OUStringToOString( pAttribs[i].Name, RTL_TEXTENCODING_UTF8 ).getStr(), rtl::OUStringToOString( aVal, RTL_TEXTENCODING_UTF8 ).getStr() ); #endif - if( pAttribs[i].Name.equalsAscii( "EmbeddedSubstream" ) ) + if( pAttribs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "EmbeddedSubstream" ) ) ) pAttribs[i].Value >>= xSubStream; - else if( pAttribs[i].Name.equalsAscii( "Password" ) ) + else if( pAttribs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Password" ) ) ) { nPwPos = i; pAttribs[i].Value >>= aPwd; @@ -98,7 +99,7 @@ sal_Bool SAL_CALL PDFIHybridAdaptor::filter( const uno::Sequence< beans::Propert uno::Reference< io::XInputStream > xInput; for( sal_Int32 i = 0; i < nAttribs; i++ ) { - if( pAttribs[i].Name.equalsAscii( "InputStream" ) ) + if( pAttribs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InputStream" ) ) ) { pAttribs[i].Value >>= xInput; break; @@ -250,7 +251,7 @@ bool PDFIRawAdaptor::parse( const uno::Reference<io::XInputStream>& xInput bool bSuccess=false; - if( xInput.is() && (!rURL.getLength() || rURL.compareToAscii( "file:", 5 ) != 0) ) + if( xInput.is() ) bSuccess = xpdf_ImportFromStream( xInput, pSink, xIHdl, rPwd, m_xContext ); else bSuccess = xpdf_ImportFromFile( rURL, pSink, xIHdl, rPwd, m_xContext ); @@ -293,15 +294,15 @@ sal_Bool SAL_CALL PDFIRawAdaptor::importer( const uno::Sequence< beans::Property for( sal_Int32 i = 0; i < nAttribs; i++, pAttribs++ ) { OSL_TRACE("importer Attrib: %s\n", OUStringToOString( pAttribs->Name, RTL_TEXTENCODING_UTF8 ).getStr() ); - if( pAttribs->Name.equalsAscii( "InputStream" ) ) + if( pAttribs->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InputStream" ) ) ) pAttribs->Value >>= xInput; - else if( pAttribs->Name.equalsAscii( "URL" ) ) + else if( pAttribs->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) pAttribs->Value >>= aURL; - else if( pAttribs->Name.equalsAscii( "StatusIndicator" ) ) + else if( pAttribs->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StatusIndicator" ) ) ) pAttribs->Value >>= xStatus; - else if( pAttribs->Name.equalsAscii( "InteractionHandler" ) ) + else if( pAttribs->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InteractionHandler" ) ) ) pAttribs->Value >>= xInteractionHandler; - else if( pAttribs->Name.equalsAscii( "Password" ) ) + else if( pAttribs->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Password" ) ) ) pAttribs->Value >>= aPwd; } if( !xInput.is() ) @@ -327,3 +328,5 @@ void SAL_CALL PDFIRawAdaptor::setTargetDocument( const uno::Reference< lang::XCo } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/pdfiadaptor.hxx b/sdext/source/pdfimport/pdfiadaptor.hxx index ba0495fe2134..d9d6d71356f7 100644 --- a/sdext/source/pdfimport/pdfiadaptor.hxx +++ b/sdext/source/pdfimport/pdfiadaptor.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -136,3 +137,5 @@ namespace pdfi } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx index e741d7499915..1512fc3803e2 100644 --- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -48,7 +49,11 @@ #include <stdio.h> -using namespace rtl; +using ::rtl::OUString; +using ::rtl::OString; +using ::rtl::OStringHash; +using ::rtl::OStringBuffer; + namespace pdfparse { @@ -545,7 +550,7 @@ void PDFDict::insertValue( const OString& rName, PDFEntry* pValue ) if( ! pValue ) eraseValue( rName ); - std::hash_map<OString,PDFEntry*,OStringHash>::iterator it = m_aMap.find( rName ); + boost::unordered_map<OString,PDFEntry*,OStringHash>::iterator it = m_aMap.find( rName ); if( it == m_aMap.end() ) { // new name/value, pair, append it @@ -639,7 +644,7 @@ unsigned int PDFStream::getDictLength( const PDFContainer* pContainer ) const if( ! m_pDict ) return 0; // find /Length entry, can either be a direct or indirect number object - std::hash_map<OString,PDFEntry*,OStringHash>::const_iterator it = + boost::unordered_map<OString,PDFEntry*,OStringHash>::const_iterator it = m_pDict->m_aMap.find( "Length" ); if( it == m_pDict->m_aMap.end() ) return 0; @@ -694,7 +699,7 @@ bool PDFObject::getDeflatedStream( char** ppStream, unsigned int* pBytes, const return false; } // is there a filter entry ? - std::hash_map<OString,PDFEntry*,OStringHash>::const_iterator it = + boost::unordered_map<OString,PDFEntry*,OStringHash>::const_iterator it = m_pStream->m_pDict->m_aMap.find( "Filter" ); if( it != m_pStream->m_pDict->m_aMap.end() ) { @@ -859,7 +864,7 @@ bool PDFObject::emit( EmitContext& rWriteContext ) const if( bDeflate && rWriteContext.m_bDeflate ) { // delete flatedecode filter - std::hash_map<OString,PDFEntry*,OStringHash>::const_iterator it = + boost::unordered_map<OString,PDFEntry*,OStringHash>::const_iterator it = pClone->m_pStream->m_pDict->m_aMap.find( "Filter" ); if( it != pClone->m_pStream->m_pDict->m_aMap.end() ) { @@ -1369,7 +1374,7 @@ PDFFileImplData* PDFFile::impl_getData() const m_pData->m_nKeyLength = static_cast<sal_uInt32>(pNum->m_fValue) / 8; } PDFName* pFilter = dynamic_cast<PDFName*>(filter->second); - if( pFilter && pFilter->getFilteredName().equalsAscii( "Standard" ) ) + if( pFilter && pFilter->getFilteredName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Standard" ) ) ) m_pData->m_bStandardHandler = true; if( o_ent != pDict->m_aMap.end() ) { @@ -1479,3 +1484,4 @@ PDFEntry* PDFPart::clone() const return pNewPt; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx b/sdext/source/pdfimport/pdfparse/pdfparse.cxx index 0e54005c6bd0..46a2b72ca7b9 100644 --- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,7 +38,6 @@ #include "pdfparse.hxx" // workaround windows compiler: do not include multi_pass.hpp -//#include <boost/spirit.hpp> #include <boost/spirit/include/classic_core.hpp> #include <boost/spirit/include/classic_utility.hpp> #include <boost/spirit/include/classic_error_handling.hpp> @@ -57,9 +57,11 @@ #endif using namespace boost::spirit; -using namespace rtl; using namespace pdfparse; +using ::rtl::OString; +using ::rtl::OStringBuffer; + class StringEmitContext : public EmitContext { OStringBuffer m_aBuf; @@ -113,7 +115,7 @@ public: typedef nil_t result_t; template <typename ScannerT> std::ptrdiff_t - operator()(ScannerT const& scan, result_t& result) const + operator()(ScannerT const& scan, result_t&) const { std::ptrdiff_t len = 0; @@ -562,7 +564,9 @@ PDFEntry* PDFReader::read( const char* pBuffer, unsigned int nLen ) try { + #if OSL_DEBUG_LEVEL > 1 boost::spirit::parse_info<const char*> aInfo = + #endif boost::spirit::parse( pBuffer, pBuffer+nLen, aGrammar, @@ -640,7 +644,9 @@ PDFEntry* PDFReader::read( const char* pFileName ) try { + #if OSL_DEBUG_LEVEL > 1 boost::spirit::parse_info< file_iterator<> > aInfo = + #endif boost::spirit::parse( file_start, file_end, aGrammar, @@ -699,3 +705,4 @@ PDFEntry* PDFReader::read( const char* pFileName ) #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/sax/emitcontext.cxx b/sdext/source/pdfimport/sax/emitcontext.cxx index 6ea6a977b20f..4384de556233 100644 --- a/sdext/source/pdfimport/sax/emitcontext.cxx +++ b/sdext/source/pdfimport/sax/emitcontext.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -69,9 +70,9 @@ SaxEmitter::SaxEmitter( const uno::Reference< xml::sax::XDocumentHandler >& xDoc aBuf.append( aFileURL ); aBuf.appendAscii( "/pdfimport.xml" ); pStream = new osl::File( aBuf.makeStringAndClear() ); - if( pStream->open( OpenFlag_Write | OpenFlag_Create ) ) + if( pStream->open( osl_File_OpenFlag_Write | osl_File_OpenFlag_Create ) ) { - pStream->open( OpenFlag_Write ); + pStream->open( osl_File_OpenFlag_Write ); pStream->setSize( 0 ); } } @@ -188,3 +189,5 @@ XmlEmitterSharedPtr createSaxEmitter( const uno::Reference< xml::sax::XDocumentH } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/sax/emitcontext.hxx b/sdext/source/pdfimport/sax/emitcontext.hxx index 880aaa90d4e8..e617763636f3 100644 --- a/sdext/source/pdfimport/sax/emitcontext.hxx +++ b/sdext/source/pdfimport/sax/emitcontext.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -58,3 +59,4 @@ namespace pdfi #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/sax/saxattrlist.cxx b/sdext/source/pdfimport/sax/saxattrlist.cxx index 4b5cf9c7a4df..1143d122bb11 100644 --- a/sdext/source/pdfimport/sax/saxattrlist.cxx +++ b/sdext/source/pdfimport/sax/saxattrlist.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,10 +34,10 @@ namespace pdfi { -SaxAttrList::SaxAttrList( const std::hash_map< rtl::OUString, rtl::OUString, rtl::OUStringHash >& rMap ) +SaxAttrList::SaxAttrList( const boost::unordered_map< rtl::OUString, rtl::OUString, rtl::OUStringHash >& rMap ) { m_aAttributes.reserve(rMap.size()); - for( std::hash_map< rtl::OUString, + for( boost::unordered_map< rtl::OUString, rtl::OUString, rtl::OUStringHash >::const_iterator it = rMap.begin(); it != rMap.end(); ++it ) @@ -91,7 +92,7 @@ rtl::OUString SAL_CALL SaxAttrList::getValueByIndex( sal_Int16 i_nIndex ) throw( rtl::OUString SAL_CALL SaxAttrList::getValueByName(const ::rtl::OUString& i_rName) throw() { - std::hash_map< rtl::OUString, size_t, rtl::OUStringHash >::const_iterator it = m_aIndexMap.find( i_rName ); + boost::unordered_map< rtl::OUString, size_t, rtl::OUStringHash >::const_iterator it = m_aIndexMap.find( i_rName ); return (it != m_aIndexMap.end()) ? m_aAttributes[it->second].m_aValue : rtl::OUString(); } @@ -102,3 +103,4 @@ com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL Sa } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/sax/saxattrlist.hxx b/sdext/source/pdfimport/sax/saxattrlist.hxx index 0866467e2d1f..6a2279762925 100644 --- a/sdext/source/pdfimport/sax/saxattrlist.hxx +++ b/sdext/source/pdfimport/sax/saxattrlist.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,7 +31,7 @@ #include <rtl/ustring.hxx> #include <vector> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <cppuhelper/implbase2.hxx> #include <com/sun/star/util/XCloneable.hpp> @@ -52,11 +53,11 @@ namespace pdfi : m_aName( i_rName ), m_aValue( i_rValue ) {} }; std::vector< AttrEntry > m_aAttributes; - std::hash_map< rtl::OUString, size_t, rtl::OUStringHash > m_aIndexMap; + boost::unordered_map< rtl::OUString, size_t, rtl::OUStringHash > m_aIndexMap; public: SaxAttrList() {} - SaxAttrList( const std::hash_map< rtl::OUString, rtl::OUString, rtl::OUStringHash >& ); + SaxAttrList( const boost::unordered_map< rtl::OUString, rtl::OUString, rtl::OUStringHash >& ); SaxAttrList( const SaxAttrList& ); virtual ~SaxAttrList(); @@ -74,3 +75,5 @@ namespace pdfi } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/services.cxx b/sdext/source/pdfimport/services.cxx index 53d9cbc6c992..90f9e6eb6aeb 100644 --- a/sdext/source/pdfimport/services.cxx +++ b/sdext/source/pdfimport/services.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -82,7 +83,7 @@ namespace } } -extern "C" void SAL_CALL component_getImplementationEnvironment( +extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char **ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; @@ -137,7 +138,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, voi { ::rtl::OUString sMainKeyName( sRootKey ); sMainKeyName += ::rtl::OUString::createFromAscii( pComponents->pAsciiImplementationName ); - sMainKeyName += ::rtl::OUString::createFromAscii( "/UNO/SERVICES" ); + sMainKeyName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); try { @@ -146,7 +147,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, voi } catch( Exception& ) { - OSL_ASSERT( "OModule::writeComponentInfos: something went wrong while creating the keys!" ); + OSL_FAIL( "OModule::writeComponentInfos: something went wrong while creating the keys!" ); return sal_False; } ++pComponents; @@ -154,7 +155,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, voi return sal_True; } -extern "C" void* SAL_CALL component_getFactory( +extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* /*pServiceManager*/, void* /*pRegistryKey*/ ) { ::rtl::OUString sImplementationName( ::rtl::OUString::createFromAscii( pImplementationName ) ); @@ -186,3 +187,4 @@ extern "C" void* SAL_CALL component_getFactory( return xFactory.get(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/test/makefile.mk b/sdext/source/pdfimport/test/makefile.mk index d0b05912d22e..b6f60d52e7fc 100755 --- a/sdext/source/pdfimport/test/makefile.mk +++ b/sdext/source/pdfimport/test/makefile.mk @@ -68,7 +68,6 @@ SHL1STDLIBS=\ $(COMPHELPERLIB) \ $(CPPUHELPERLIB) \ $(CPPUNITLIB) \ - $(TESTSHL2LIB) \ $(ZLIB3RDLIB) \ $(CPPULIB) \ $(SALLIB) @@ -102,7 +101,6 @@ APP1STDLIBS=\ $(COMPHELPERLIB) \ $(CPPUHELPERLIB) \ $(CPPUNITLIB) \ - $(TESTSHL2LIB) \ $(ZLIB3RDLIB) \ $(CPPULIB) \ $(SALLIB) @@ -131,7 +129,6 @@ APP2STDLIBS=\ $(COMPHELPERLIB) \ $(CPPUHELPERLIB) \ $(CPPUNITLIB) \ - $(TESTSHL2LIB) \ $(ZLIB3RDLIB) \ $(CPPULIB) \ $(SALLIB) @@ -162,5 +159,3 @@ APP2STDLIBS=\ @echo ---------------------------------------------------------- testshl2 -forward $(BIN)$/ $(SHL1TARGETN) $(TOUCH) $@ - -#ALLTAR : $(MISC)$/pdfi_unittest_succeeded diff --git a/sdext/source/pdfimport/test/outputwrap.hxx b/sdext/source/pdfimport/test/outputwrap.hxx index 8471398d29cf..0e9fbb0925a0 100644 --- a/sdext/source/pdfimport/test/outputwrap.hxx +++ b/sdext/source/pdfimport/test/outputwrap.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -48,7 +49,7 @@ typedef ::cppu::WeakComponentImplHelper1< explicit OutputWrap( const rtl::OUString& rURL ) : OutputWrapBase(m_aMutex), maFile(rURL) { - maFile.open(osl_File_OpenFlag_Create|OpenFlag_Write); + maFile.open(osl_File_OpenFlag_Create|osl_File_OpenFlag_Write); } virtual void SAL_CALL writeBytes( const com::sun::star::uno::Sequence< ::sal_Int8 >& aData ) throw (com::sun::star::io::NotConnectedException,com::sun::star::io::BufferSizeExceededException, com::sun::star::io::IOException, com::sun::star::uno::RuntimeException) @@ -70,3 +71,5 @@ typedef ::cppu::WeakComponentImplHelper1< } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/test/pdf2xml.cxx b/sdext/source/pdfimport/test/pdf2xml.cxx index c8605c162fa2..a8278ccf2267 100644 --- a/sdext/source/pdfimport/test/pdf2xml.cxx +++ b/sdext/source/pdfimport/test/pdf2xml.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -103,3 +104,5 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/test/pdfunzip.cxx b/sdext/source/pdfimport/test/pdfunzip.cxx index bab28f572707..e14ca69b6381 100644 --- a/sdext/source/pdfimport/test/pdfunzip.cxx +++ b/sdext/source/pdfimport/test/pdfunzip.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,9 +39,13 @@ #include "pdfparse.hxx" -using namespace rtl; using namespace pdfparse; +using ::rtl::OUString; +using ::rtl::OString; +using ::rtl::OStringBuffer; +using ::rtl::OStringToOUString; + void printHelp( const char* pExe ) { fprintf( stdout, @@ -306,7 +311,7 @@ int write_addStreams( const char* pInFile, const char* pOutFile, PDFFile* pPDFFi if( pTrailer && pTrailer->m_pDict ) { // search for AdditionalStreams entry - std::hash_map<rtl::OString,PDFEntry*,rtl::OStringHash>::iterator add_stream; + boost::unordered_map<rtl::OString,PDFEntry*,rtl::OStringHash>::iterator add_stream; add_stream = pTrailer->m_pDict->m_aMap.find( "AdditionalStreams" ); if( add_stream != pTrailer->m_pDict->m_aMap.end() ) { @@ -333,7 +338,7 @@ int write_fonts( const char* i_pInFile, const char* i_pOutFile, PDFFile* i_pPDFF if( ! pDict ) continue; - std::hash_map<rtl::OString,PDFEntry*,rtl::OStringHash>::iterator map_it = + boost::unordered_map<rtl::OString,PDFEntry*,rtl::OStringHash>::iterator map_it = pDict->m_aMap.find( "Type" ); if( map_it == pDict->m_aMap.end() ) continue; @@ -536,3 +541,4 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv ) return handleFile( pInFile, pOutFile, pPassword, aHdl ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/test/testinput.odp b/sdext/source/pdfimport/test/testinput.odp Binary files differindex fe1ac44e8b87..fe1ac44e8b87 100755..100644 --- a/sdext/source/pdfimport/test/testinput.odp +++ b/sdext/source/pdfimport/test/testinput.odp diff --git a/sdext/source/pdfimport/test/tests.cxx b/sdext/source/pdfimport/test/tests.cxx index 8e72e097fc3b..145f9387948a 100755..100644 --- a/sdext/source/pdfimport/test/tests.cxx +++ b/sdext/source/pdfimport/test/tests.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,7 +71,7 @@ #include <basegfx/polygon/b2dpolygonclipper.hxx> #include <vector> -#include <hash_map> +#include <boost/unordered_map.hpp> using namespace ::pdfparse; @@ -110,7 +111,7 @@ namespace rtl::math::approxEqual(m_aHyperlinkBounds.X2,166.7) && rtl::math::approxEqual(m_aHyperlinkBounds.Y2,406.2) ); CPPUNIT_ASSERT_MESSAGE( "Correct hyperlink URI", - m_aURI == ::rtl::OUString::createFromAscii( "http://download.openoffice.org/" ) ); + m_aURI == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("http://download.openoffice.org/")) ); const char* sText = " \n \nThis is a testtext\nNew paragraph,\nnew line\n" "Hyperlink, this is\n?\nThis is more text\noutline mode\n?\nNew paragraph\n"; @@ -370,7 +371,7 @@ namespace virtual void endText() { - m_aTextOut.append( ::rtl::OUString::createFromAscii("\n") ); + m_aTextOut.append( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")) ); } virtual void drawMask(const uno::Sequence<beans::PropertyValue>& xBitmap, @@ -446,11 +447,11 @@ namespace { } - typedef std::hash_map<sal_Int32,FontAttributes> IdToFontMap; - typedef std::hash_map<FontAttributes,sal_Int32,FontAttrHash> FontToIdMap; + typedef boost::unordered_map<sal_Int32,FontAttributes> IdToFontMap; + typedef boost::unordered_map<FontAttributes,sal_Int32,FontAttrHash> FontToIdMap; - typedef std::hash_map<sal_Int32,GraphicsContext> IdToGCMap; - typedef std::hash_map<GraphicsContext,sal_Int32,GraphicsContextHash> GCToIdMap; + typedef boost::unordered_map<sal_Int32,GraphicsContext> IdToGCMap; + typedef boost::unordered_map<GraphicsContext,sal_Int32,GraphicsContextHash> GCToIdMap; typedef std::vector<GraphicsContext> GraphicsContextStack; @@ -496,7 +497,7 @@ namespace CPPUNIT_ASSERT_MESSAGE( "Converting ini file to URL", osl_getFileURLFromSystemPath( - (msBaseDir+rtl::OUString::createFromAscii("pdfi_unittest_test.ini")).pData, + (msBaseDir+rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pdfi_unittest_test.ini"))).pData, &aIniUrl.pData ) == osl_File_E_None ); mxCtx = ::cppu::defaultBootstrap_InitialComponentContext(aIniUrl); @@ -517,7 +518,7 @@ namespace void testXPDFParser() { pdfi::ContentSinkSharedPtr pSink( new TestSink() ); - pdfi::xpdf_ImportFromFile( msBaseDir + rtl::OUString::createFromAscii("pdfi_unittest_test.pdf"), + pdfi::xpdf_ImportFromFile( msBaseDir + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pdfi_unittest_test.pdf")), pSink, uno::Reference< task::XInteractionHandler >(), rtl::OUString(), @@ -534,12 +535,12 @@ namespace aAdaptor.setTreeVisitorFactory( createDrawTreeVisitorFactory() ); ::rtl::OUString aURL, aAbsURL, aBaseURL; - osl_getFileURLFromSystemPath( (msBaseDir + rtl::OUString::createFromAscii("pdfi_unittest_draw.xml")).pData, + osl_getFileURLFromSystemPath( (msBaseDir + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pdfi_unittest_draw.xml"))).pData, &aURL.pData ); osl_getProcessWorkingDir(&aBaseURL.pData); osl_getAbsoluteFileURL(aBaseURL.pData,aURL.pData,&aAbsURL.pData); CPPUNIT_ASSERT_MESSAGE("Exporting to ODF", - aAdaptor.odfConvert( msBaseDir + rtl::OUString::createFromAscii("pdfi_unittest_test.pdf"), + aAdaptor.odfConvert( msBaseDir + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pdfi_unittest_test.pdf")), new OutputWrap(aAbsURL), NULL )); } @@ -550,12 +551,12 @@ namespace aAdaptor.setTreeVisitorFactory( createWriterTreeVisitorFactory() ); ::rtl::OUString aURL, aAbsURL, aBaseURL; - osl_getFileURLFromSystemPath( (msBaseDir + rtl::OUString::createFromAscii("pdfi_unittest_writer.xml")).pData, + osl_getFileURLFromSystemPath( (msBaseDir + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pdfi_unittest_writer.xml"))).pData, &aURL.pData ); osl_getProcessWorkingDir(&aBaseURL.pData); osl_getAbsoluteFileURL(aBaseURL.pData,aURL.pData,&aAbsURL.pData); CPPUNIT_ASSERT_MESSAGE("Exporting to ODF", - aAdaptor.odfConvert( msBaseDir + rtl::OUString::createFromAscii("pdfi_unittest_test.pdf"), + aAdaptor.odfConvert( msBaseDir + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pdfi_unittest_test.pdf")), new OutputWrap(aAbsURL), NULL )); } @@ -579,3 +580,5 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(PDFITest, "PDFITest"); // this macro creates an empty function, which will called by the RegisterAllFunctions() // to let the user the possibility to also register some functions by hand. NOADDITIONAL; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx index c68af3c37d86..37f9785e1469 100644 --- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx +++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -62,7 +63,7 @@ const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > { Reference< XComponentContext > xContext( this->m_rProcessor.m_xContext, uno::UNO_SET_THROW ); Reference< XMultiComponentFactory > xMSF( xContext->getServiceManager(), uno::UNO_SET_THROW ); - Reference < XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.i18n.BreakIterator"), xContext); + Reference < XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.BreakIterator")), xContext); mxBreakIter = uno::Reference< i18n::XBreakIterator >( xInterface, uno::UNO_QUERY ); } @@ -75,7 +76,7 @@ const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > { Reference< XComponentContext > xContext( m_rEmitContext.m_xContext, uno::UNO_SET_THROW ); Reference< XMultiComponentFactory > xMSF( xContext->getServiceManager(), uno::UNO_SET_THROW ); - Reference < XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.i18n.BreakIterator"), xContext); + Reference < XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.BreakIterator")), xContext); mxBreakIter = uno::Reference< i18n::XBreakIterator >( xInterface, uno::UNO_QUERY ); } return mxBreakIter; @@ -87,7 +88,7 @@ const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCharacterClassi { Reference< XComponentContext > xContext( m_rEmitContext.m_xContext, uno::UNO_SET_THROW ); Reference< XMultiComponentFactory > xMSF( xContext->getServiceManager(), uno::UNO_SET_THROW ); - Reference < XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.i18n.CharacterClassification"), xContext); + Reference < XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.CharacterClassification")), xContext); mxCharClass = uno::Reference< i18n::XCharacterClassification >( xInterface, uno::UNO_QUERY ); } return mxCharClass; @@ -111,7 +112,7 @@ void DrawXmlEmitter::visit( HyperlinkElement& elem, const std::list< Element* >: while( this_it !=elem.Children.end() && *this_it != &elem ) { (*this_it)->visitedBy( *this, this_it ); - this_it++; + ++this_it; } m_rEmitContext.rEmitter.endTag( pType ); } @@ -182,7 +183,7 @@ void DrawXmlEmitter::visit( TextElement& elem, const std::list< Element* >::cons while( this_it !=elem.Children.end() && *this_it != &elem ) { (*this_it)->visitedBy( *this, this_it ); - this_it++; + ++this_it; } m_rEmitContext.rEmitter.endTag( "text:span" ); @@ -204,7 +205,7 @@ void DrawXmlEmitter::visit( ParagraphElement& elem, const std::list< Element* >: while( this_it !=elem.Children.end() && *this_it != &elem ) { (*this_it)->visitedBy( *this, this_it ); - this_it++; + ++this_it; } m_rEmitContext.rEmitter.endTag( pTagType ); @@ -291,7 +292,7 @@ void DrawXmlEmitter::visit( FrameElement& elem, const std::list< Element* >::con while( this_it !=elem.Children.end() && *this_it != &elem ) { (*this_it)->visitedBy( *this, this_it ); - this_it++; + ++this_it; } if( bTextBox ) @@ -392,7 +393,7 @@ void DrawXmlEmitter::visit( PageElement& elem, const std::list< Element* >::cons while( this_it !=elem.Children.end() && *this_it != &elem ) { (*this_it)->visitedBy( *this, this_it ); - this_it++; + ++this_it; } m_rEmitContext.rEmitter.endTag("draw:page"); @@ -408,7 +409,7 @@ void DrawXmlEmitter::visit( DocumentElement& elem, const std::list< Element* >:: while( this_it !=elem.Children.end() && *this_it != &elem ) { (*this_it)->visitedBy( *this, this_it ); - this_it++; + ++this_it; } m_rEmitContext.rEmitter.endTag( m_bWriteDrawDocument ? "office:drawing" : "office:presentation" ); @@ -709,21 +710,14 @@ void DrawXmlOptimizer::optimizeTextElements(Element& rParent) { if( rParent.Children.empty() ) // this should not happen { - OSL_ENSURE( 0, "empty paragraph optimized" ); + OSL_FAIL( "empty paragraph optimized" ); return; } // concatenate child elements with same font id std::list< Element* >::iterator next = rParent.Children.begin(); std::list< Element* >::iterator it = next++; - FrameElement* pFrame = dynamic_cast<FrameElement*>(rParent.Parent); - bool bRotatedFrame = false; - if( pFrame ) - { - const GraphicsContext& rFrameGC = m_rProcessor.getGraphicsContext( pFrame->GCId ); - if( rFrameGC.isRotatedOrSkewed() ) - bRotatedFrame = true; - } + while( next != rParent.Children.end() ) { bool bConcat = false; @@ -936,26 +930,6 @@ void DrawXmlFinalizer::visit( ParagraphElement& elem, const std::list< Element* elem.StyleId = m_rStyleContainer.getStyleId( aStyle ); - // update page boundaries - if( elem.Parent ) - { - // check for center alignement - // criterion: paragraph is small relative to parent and distributed around its center - double p_x = elem.Parent->x; - double p_y = elem.Parent->y; - double p_w = elem.Parent->w; - double p_h = elem.Parent->h; - - PageElement* pPage = dynamic_cast<PageElement*>(elem.Parent); - if( pPage ) - { - p_x += pPage->LeftMargin; - p_y += pPage->TopMargin; - p_w -= pPage->LeftMargin+pPage->RightMargin; - p_h -= pPage->TopMargin+pPage->BottomMargin; - } - } - elem.applyToChildren(*this); } @@ -1109,3 +1083,5 @@ void DrawXmlFinalizer::visit( DocumentElement& elem, const std::list< Element* > } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.hxx b/sdext/source/pdfimport/tree/drawtreevisiting.hxx index 75ce72eeaf79..e957448ded4e 100644 --- a/sdext/source/pdfimport/tree/drawtreevisiting.hxx +++ b/sdext/source/pdfimport/tree/drawtreevisiting.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -127,3 +128,5 @@ namespace pdfi } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/tree/genericelements.cxx b/sdext/source/pdfimport/tree/genericelements.cxx index a89ea641012d..e6a50a0331db 100644 --- a/sdext/source/pdfimport/tree/genericelements.cxx +++ b/sdext/source/pdfimport/tree/genericelements.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -163,6 +164,10 @@ void PolyPolyElement::updateGeometry() y = aRange.getMinY(); w = aRange.getWidth(); h = aRange.getHeight(); + + // fdo#32330 - non-closed paths will not show up filled in LibO + if( Action & (PATH_FILL | PATH_EOFILL) ) + PolyPoly.setClosed(true); } void PolyPolyElement::visitedBy( ElementTreeVisitor& rVisitor, @@ -487,3 +492,5 @@ void DocumentElement::visitedBy( ElementTreeVisitor& rV } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/tree/genericelements.hxx b/sdext/source/pdfimport/tree/genericelements.hxx index d7cd690aba61..b2122a6c7cc2 100644 --- a/sdext/source/pdfimport/tree/genericelements.hxx +++ b/sdext/source/pdfimport/tree/genericelements.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -321,3 +322,5 @@ namespace pdfi } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/tree/imagecontainer.cxx b/sdext/source/pdfimport/tree/imagecontainer.cxx index a4a8a5665997..9be7bb5de0dd 100644 --- a/sdext/source/pdfimport/tree/imagecontainer.cxx +++ b/sdext/source/pdfimport/tree/imagecontainer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -139,15 +140,17 @@ void ImageContainer::writeBase64EncodedStream( ImageId nId, EmitContext& rContex std::find_if(pAry,pAry+nLen, boost::bind(comphelper::TPropertyValueEqualFunctor(), _1, - rtl::OUString::createFromAscii("InputSequence")))); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InputSequence"))))); OSL_ENSURE( pValue != pAry+nLen, "InputSequence not found" ); uno::Sequence<sal_Int8> aData; if( !(pValue->Value >>= aData) ) - OSL_ENSURE(false,"Wrong data type"); + OSL_FAIL("Wrong data type"); rContext.rEmitter.write( encodeBase64( aData.getConstArray(), aData.getLength() )); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/tree/imagecontainer.hxx b/sdext/source/pdfimport/tree/imagecontainer.hxx index 8453e7fc83f1..525c31d570ce 100644 --- a/sdext/source/pdfimport/tree/imagecontainer.hxx +++ b/sdext/source/pdfimport/tree/imagecontainer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,7 +37,7 @@ #include <com/sun/star/awt/XBitmap.hpp> #include <vector> -#include <hash_map> +#include <boost/unordered_map.hpp> namespace pdfi { @@ -59,3 +60,4 @@ namespace pdfi #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx index 54171d8de5e7..62796d37c01a 100644 --- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx +++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -220,7 +221,7 @@ sal_Int32 PDFIProcessor::getFontId( const FontAttributes& rAttr ) const // line diagnose block - start void PDFIProcessor::processGlyphLine() { - if( m_GlyphsList.size()<1 ) + if( m_GlyphsList.empty() ) return; double fPreAvarageSpaceValue= 0.0; @@ -316,7 +317,7 @@ void PDFIProcessor::processGlyphLine() ParagraphElement* pPara= NULL ; FrameElement* pFrame= NULL ; - if(m_GlyphsList.size()>0) + if(!m_GlyphsList.empty()) { pFrame = m_pElFactory->createFrameElement( m_GlyphsList[0].getCurElement(), getGCId( getTransformGlyphContext( m_GlyphsList[0])) ); pFrame->ZOrder = m_nNextZOrder++; @@ -400,7 +401,7 @@ void PDFIProcessor::processGlyphLine() } - if(m_GlyphsList.size()>1) + if(!m_GlyphsList.empty()) processGlyph( 0, m_GlyphsList[m_GlyphsList.size()-1], pPara, @@ -1054,7 +1055,7 @@ rtl::OUString PDFIProcessor::mirrorString( const rtl::OUString& i_rString ) { m_bMirrorMapperTried = true; uno::Reference< lang::XMultiComponentFactory > xMSF( m_xContext->getServiceManager(), uno::UNO_SET_THROW ); - uno::Reference < uno::XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.awt.StringMirror"), m_xContext); + uno::Reference < uno::XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.StringMirror")), m_xContext); m_xMirrorMapper = uno::Reference< util::XStringMapping >( xInterface, uno::UNO_QUERY ); #if OSL_DEBUG_LEVEL > 1 if( m_xMirrorMapper.is() ) @@ -1458,3 +1459,5 @@ void PDFIProcessor::prepareMirrorMap() } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.hxx b/sdext/source/pdfimport/tree/pdfiprocessor.hxx index 0b551346dbfb..4b66f4c31d54 100644 --- a/sdext/source/pdfimport/tree/pdfiprocessor.hxx +++ b/sdext/source/pdfimport/tree/pdfiprocessor.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -49,7 +50,7 @@ #include <boost/shared_ptr.hpp> #include <list> -#include <hash_map> +#include <boost/unordered_map.hpp> #include "imagecontainer.hxx" #include "contentsink.hxx" @@ -207,11 +208,11 @@ namespace pdfi void setupImage(ImageId nImage); - typedef std::hash_map<sal_Int32,FontAttributes> IdToFontMap; - typedef std::hash_map<FontAttributes,sal_Int32,FontAttrHash> FontToIdMap; + typedef boost::unordered_map<sal_Int32,FontAttributes> IdToFontMap; + typedef boost::unordered_map<FontAttributes,sal_Int32,FontAttrHash> FontToIdMap; - typedef std::hash_map<sal_Int32,GraphicsContext> IdToGCMap; - typedef std::hash_map<GraphicsContext,sal_Int32,GraphicsContextHash> GCToIdMap; + typedef boost::unordered_map<sal_Int32,GraphicsContext> IdToGCMap; + typedef boost::unordered_map<GraphicsContext,sal_Int32,GraphicsContextHash> GCToIdMap; typedef std::vector<GraphicsContext> GraphicsContextStack; @@ -270,15 +271,17 @@ namespace pdfi void setGraphicsContext (GraphicsContext& rCurrentContext ){ m_rCurrentContext= rCurrentContext; } void setCurElement( Element* pCurElement ){ m_pCurElement= pCurElement; } - double getYPrevGlyphPosition(){ return m_fYPrevGlyphPosition; } - double getXPrevGlyphPosition(){ return m_fXPrevGlyphPosition; } - double getPrevGlyphHeight(){ return m_fPrevGlyphHeight; } - double getPrevGlyphWidth (){ return m_fPrevGlyphWidth; } - double getPrevGlyphsSpace() { if( (m_rRect.X1-m_fXPrevGlyphPosition)<0 ) - return 0; - else - return m_rRect.X1-m_fXPrevGlyphPosition; - } + double getYPrevGlyphPosition() const { return m_fYPrevGlyphPosition; } + double getXPrevGlyphPosition() const { return m_fXPrevGlyphPosition; } + double getPrevGlyphHeight() const { return m_fPrevGlyphHeight; } + double getPrevGlyphWidth () const { return m_fPrevGlyphWidth; } + double getPrevGlyphsSpace() const + { + if( (m_rRect.X1-m_fXPrevGlyphPosition)<0 ) + return 0; + else + return m_rRect.X1-m_fXPrevGlyphPosition; + } void setYPrevGlyphPosition( double fYPrevTextPosition ){ m_fYPrevGlyphPosition= fYPrevTextPosition; } void setXPrevGlyphPosition( double fXPrevTextPosition ){ m_fXPrevGlyphPosition= fXPrevTextPosition; } @@ -302,3 +305,5 @@ namespace pdfi #define USTR(x) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( x ) ) #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/tree/style.cxx b/sdext/source/pdfimport/tree/style.cxx index 471aa9878ff2..c4068def4307 100644 --- a/sdext/source/pdfimport/tree/style.cxx +++ b/sdext/source/pdfimport/tree/style.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,9 +37,11 @@ #include <algorithm> -using namespace rtl; using namespace pdfi; +using ::rtl::OUString; +using ::rtl::OUStringBuffer; + #define USTR(x) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( x ) ) StyleContainer::StyleContainer() : @@ -59,7 +62,7 @@ sal_Int32 StyleContainer::impl_getStyleId( const Style& rStyle, bool bSubStyle ) for( unsigned int n = 0; n < rStyle.SubStyles.size(); ++n ) aSearchStyle.SubStyles.push_back( impl_getStyleId( *rStyle.SubStyles[n], true ) ); - std::hash_map< HashedStyle, sal_Int32, StyleHash >::iterator it = + boost::unordered_map< HashedStyle, sal_Int32, StyleHash >::iterator it = m_aStyleToId.find( aSearchStyle ); if( it != m_aStyleToId.end() ) @@ -97,7 +100,7 @@ sal_Int32 StyleContainer::getStandardStyleId( const rtl::OString& rName ) const PropertyMap* StyleContainer::getProperties( sal_Int32 nStyleId ) const { - std::hash_map< sal_Int32, HashedStyle >::const_iterator it = + boost::unordered_map< sal_Int32, HashedStyle >::const_iterator it = m_aIdToStyle.find( nStyleId ); return it != m_aIdToStyle.end() ? &(it->second.Properties) : NULL; } @@ -105,7 +108,7 @@ const PropertyMap* StyleContainer::getProperties( sal_Int32 nStyleId ) const sal_Int32 StyleContainer::setProperties( sal_Int32 nStyleId, const PropertyMap& rNewProps ) { sal_Int32 nRet = -1; - std::hash_map< sal_Int32, HashedStyle >::iterator it = + boost::unordered_map< sal_Int32, HashedStyle >::iterator it = m_aIdToStyle.find( nStyleId ); if( it != m_aIdToStyle.end() ) { @@ -133,7 +136,7 @@ sal_Int32 StyleContainer::setProperties( sal_Int32 nStyleId, const PropertyMap& aSearchStyle.IsSubStyle = it->second.IsSubStyle; // find out whether this new style already exists - std::hash_map< HashedStyle, sal_Int32, StyleHash >::iterator new_it = + boost::unordered_map< HashedStyle, sal_Int32, StyleHash >::iterator new_it = m_aStyleToId.find( aSearchStyle ); if( new_it != m_aStyleToId.end() ) { @@ -159,7 +162,7 @@ OUString StyleContainer::getStyleName( sal_Int32 nStyle ) const { OUStringBuffer aRet( 64 ); - std::hash_map< sal_Int32, HashedStyle >::const_iterator style_it = + boost::unordered_map< sal_Int32, HashedStyle >::const_iterator style_it = m_aIdToStyle.find( nStyle ); if( style_it != m_aIdToStyle.end() ) { @@ -196,7 +199,7 @@ void StyleContainer::impl_emitStyle( sal_Int32 nStyleId, EmitContext& rContext, ElementTreeVisitor& rContainedElemVisitor ) { - std::hash_map< sal_Int32, HashedStyle >::const_iterator it = m_aIdToStyle.find( nStyleId ); + boost::unordered_map< sal_Int32, HashedStyle >::const_iterator it = m_aIdToStyle.find( nStyleId ); if( it != m_aIdToStyle.end() ) { const HashedStyle& rStyle = it->second; @@ -207,7 +210,7 @@ void StyleContainer::impl_emitStyle( sal_Int32 nStyleId, for( unsigned int n = 0; n < rStyle.SubStyles.size(); ++n ) impl_emitStyle( rStyle.SubStyles[n], rContext, rContainedElemVisitor ); - if( rStyle.Contents ) + if( rStyle.Contents.getLength() ) rContext.rEmitter.write( rStyle.Contents ); if( rStyle.ContainedElement ) rStyle.ContainedElement->visitedBy( rContainedElemVisitor, @@ -220,14 +223,14 @@ void StyleContainer::emit( EmitContext& rContext, ElementTreeVisitor& rContainedElemVisitor ) { std::vector< sal_Int32 > aMasterPageSection, aAutomaticStyleSection, aOfficeStyleSection; - for( std::hash_map< sal_Int32, HashedStyle >::iterator it = m_aIdToStyle.begin(); + for( boost::unordered_map< sal_Int32, HashedStyle >::iterator it = m_aIdToStyle.begin(); it != m_aIdToStyle.end(); ++it ) { if( ! it->second.IsSubStyle ) { if( it->second.Name.equals( "style:master-page" ) ) aMasterPageSection.push_back( it->first ); - else if( getStyleName( it->first ).equalsAscii( "standard" ) ) + else if( getStyleName( it->first ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "standard" ) ) ) aOfficeStyleSection.push_back( it->first ); else aAutomaticStyleSection.push_back( it->first ); @@ -255,3 +258,5 @@ void StyleContainer::emit( EmitContext& rContext, impl_emitStyle( aMasterPageSection[n], rContext, rContainedElemVisitor ); rContext.rEmitter.endTag( "office:master-styles" ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/tree/style.hxx b/sdext/source/pdfimport/tree/style.hxx index bd5f1361564c..17ee2e210661 100644 --- a/sdext/source/pdfimport/tree/style.hxx +++ b/sdext/source/pdfimport/tree/style.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,7 +30,7 @@ #define INCLUDED_PDFI_STYLE_HXX #include "pdfihelper.hxx" -#include <hash_map> +#include <boost/unordered_map.hpp> #include <vector> #include <rtl/ustring.hxx> #include <rtl/string.hxx> @@ -132,16 +133,16 @@ namespace pdfi friend struct StyleIdNameSort; struct StyleIdNameSort { - const std::hash_map< sal_Int32, HashedStyle >* m_pMap; + const boost::unordered_map< sal_Int32, HashedStyle >* m_pMap; - StyleIdNameSort( const std::hash_map< sal_Int32, HashedStyle >* pMap ) : + StyleIdNameSort( const boost::unordered_map< sal_Int32, HashedStyle >* pMap ) : m_pMap(pMap) {} bool operator()( sal_Int32 nLeft, sal_Int32 nRight ) { - const std::hash_map< sal_Int32, HashedStyle >::const_iterator left_it = + const boost::unordered_map< sal_Int32, HashedStyle >::const_iterator left_it = m_pMap->find( nLeft ); - const std::hash_map< sal_Int32, HashedStyle >::const_iterator right_it = + const boost::unordered_map< sal_Int32, HashedStyle >::const_iterator right_it = m_pMap->find( nRight ); if( left_it == m_pMap->end() ) return false; @@ -153,8 +154,8 @@ namespace pdfi }; sal_Int32 m_nNextId; - std::hash_map< sal_Int32, HashedStyle > m_aIdToStyle; - std::hash_map< HashedStyle, sal_Int32, StyleHash > m_aStyleToId; + boost::unordered_map< sal_Int32, HashedStyle > m_aIdToStyle; + boost::unordered_map< HashedStyle, sal_Int32, StyleHash > m_aStyleToId; void impl_emitStyle( sal_Int32 nStyleId, EmitContext& rContext, @@ -179,3 +180,5 @@ namespace pdfi } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/tree/treevisiting.hxx b/sdext/source/pdfimport/tree/treevisiting.hxx index 261c8e70797d..b62340a7b9f8 100644 --- a/sdext/source/pdfimport/tree/treevisiting.hxx +++ b/sdext/source/pdfimport/tree/treevisiting.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -78,3 +79,5 @@ namespace pdfi } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/tree/treevisitorfactory.cxx b/sdext/source/pdfimport/tree/treevisitorfactory.cxx index 5c6667ea43f9..e2fc36c5f6b0 100644 --- a/sdext/source/pdfimport/tree/treevisitorfactory.cxx +++ b/sdext/source/pdfimport/tree/treevisitorfactory.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -120,3 +121,4 @@ namespace pdfi } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx b/sdext/source/pdfimport/tree/writertreevisiting.cxx index 0a64d9d87d35..f01fb959136d 100644 --- a/sdext/source/pdfimport/tree/writertreevisiting.cxx +++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,7 +62,7 @@ void WriterXmlEmitter::visit( HyperlinkElement& elem, const std::list< Element* while( this_it !=elem.Children.end() && *this_it != &elem ) { (*this_it)->visitedBy( *this, this_it ); - this_it++; + ++this_it; } m_rEmitContext.rEmitter.endTag( pType ); } @@ -84,7 +85,7 @@ void WriterXmlEmitter::visit( TextElement& elem, const std::list< Element* >::co while( this_it !=elem.Children.end() && *this_it != &elem ) { (*this_it)->visitedBy( *this, this_it ); - this_it++; + ++this_it; } m_rEmitContext.rEmitter.endTag( "text:span" ); @@ -106,7 +107,7 @@ void WriterXmlEmitter::visit( ParagraphElement& elem, const std::list< Element* while( this_it !=elem.Children.end() && *this_it != &elem ) { (*this_it)->visitedBy( *this, this_it ); - this_it++; + ++this_it; } m_rEmitContext.rEmitter.endTag( pTagType ); @@ -217,7 +218,7 @@ void WriterXmlEmitter::visit( FrameElement& elem, const std::list< Element* >::c while( this_it !=elem.Children.end() && *this_it != &elem ) { (*this_it)->visitedBy( *this, this_it ); - this_it++; + ++this_it; } if( bTextBox ) @@ -310,7 +311,7 @@ void WriterXmlEmitter::visit( PageElement& elem, const std::list< Element* >::co while( this_it !=elem.Children.end() && *this_it != &elem ) { (*this_it)->visitedBy( *this, this_it ); - this_it++; + ++this_it; } } @@ -728,7 +729,7 @@ void WriterXmlOptimizer::optimizeTextElements(Element& rParent) { if( rParent.Children.empty() ) // this should not happen { - OSL_ENSURE( 0, "empty paragraph optimized" ); + OSL_FAIL( "empty paragraph optimized" ); return; } @@ -1216,3 +1217,5 @@ void WriterXmlFinalizer::visit( DocumentElement& elem, const std::list< Element* } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/tree/writertreevisiting.hxx b/sdext/source/pdfimport/tree/writertreevisiting.hxx index 4c1efb44caec..b280b6aa011a 100644 --- a/sdext/source/pdfimport/tree/writertreevisiting.hxx +++ b/sdext/source/pdfimport/tree/writertreevisiting.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -114,3 +115,5 @@ namespace pdfi } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/wrapper/hash.cxx b/sdext/source/pdfimport/wrapper/hash.cxx deleted file mode 100755 index 3fc9c059d313..000000000000 --- a/sdext/source/pdfimport/wrapper/hash.cxx +++ /dev/null @@ -1,214 +0,0 @@ -/* C++ code produced by gperf version 3.0.1 */ -/* Command-line: gperf -C -t -l -L C++ -m 20 -Z PdfKeywordHash keyword_list */ -/* Computed positions: -k'4-5,$' */ - -#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ - && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ - && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ - && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ - && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ - && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ - && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ - && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ - && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ - && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ - && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ - && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ - && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ - && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ - && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ - && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ - && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ - && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ - && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ - && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ - && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ - && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ - && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) -/* The character set is not based on ISO-646. */ -#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." -#endif - -#line 1 "keyword_list" -struct hash_entry { const char* name; enum parseKey eKey; }; - -#if defined __GNUC__ -#pragma GCC system_header -#endif - -#define TOTAL_KEYWORDS 46 -#define MIN_WORD_LENGTH 7 -#define MAX_WORD_LENGTH 19 -#define MIN_HASH_VALUE 8 -#define MAX_HASH_VALUE 68 -/* maximum key range = 61, duplicates = 0 */ - -class PdfKeywordHash -{ -private: - static inline unsigned int hash (const char *str, unsigned int len); -public: - static const struct hash_entry *in_word_set (const char *str, unsigned int len); -}; - -inline unsigned int -PdfKeywordHash::hash (register const char *str, register unsigned int len) -{ - static const unsigned char asso_values[] = - { - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 9, 69, 38, 69, - 1, 69, 69, 69, 31, 69, 16, 35, 21, 69, - 15, 0, 69, 21, 15, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 0, 15, 69, - 69, 5, 8, 69, 4, 8, 0, 20, 2, 27, - 11, 31, 0, 69, 0, 9, 0, 5, 69, 5, - 69, 13, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69 - }; - return len + asso_values[(unsigned char)str[4]+1] + asso_values[(unsigned char)str[3]] + asso_values[(unsigned char)str[len - 1]]; -} - -const struct hash_entry * -PdfKeywordHash::in_word_set (register const char *str, register unsigned int len) -{ - static const unsigned char lengthtable[] = - { - 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 8, 12, - 8, 10, 10, 12, 13, 9, 15, 16, 17, 14, 15, 15, 10, 13, - 14, 15, 14, 11, 12, 9, 9, 17, 13, 19, 11, 8, 14, 9, - 7, 9, 19, 17, 15, 10, 13, 10, 9, 8, 17, 12, 8, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 8 - }; - static const struct hash_entry wordlist[] = - { - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, -#line 29 "keyword_list" - {"setFont",SETFONT}, - {""}, {""}, {""}, -#line 8 "keyword_list" - {"clipPath",CLIPPATH}, -#line 28 "keyword_list" - {"setFillColor",SETFILLCOLOR}, -#line 19 "keyword_list" - {"fillPath",FILLPATH}, -#line 46 "keyword_list" - {"updateFont",UPDATEFONT}, -#line 17 "keyword_list" - {"eoClipPath",EOCLIPPATH}, -#line 25 "keyword_list" - {"restoreState",RESTORESTATE}, -#line 47 "keyword_list" - {"updateLineCap",UPDATELINECAP}, -#line 39 "keyword_list" - {"startPage",STARTPAGE}, -#line 43 "keyword_list" - {"updateFillColor",UPDATEFILLCOLOR}, -#line 51 "keyword_list" - {"updateMiterLimit",UPDATEMITERLIMIT}, -#line 52 "keyword_list" - {"updateStrokeColor",UPDATESTROKECOLOR}, -#line 48 "keyword_list" - {"updateLineDash",UPDATELINEDASH}, -#line 50 "keyword_list" - {"updateLineWidth",UPDATELINEWIDTH}, -#line 41 "keyword_list" - {"updateBlendMode",UPDATEBLENDMODE}, -#line 30 "keyword_list" - {"setLineCap",SETLINECAP}, -#line 21 "keyword_list" - {"intersectClip",INTERSECTCLIP}, -#line 45 "keyword_list" - {"updateFlatness",UPDATEFLATNESS}, -#line 22 "keyword_list" - {"intersectEoClip",INTERSECTEOCLIP}, -#line 49 "keyword_list" - {"updateLineJoin",UPDATELINEJOIN}, -#line 31 "keyword_list" - {"setLineDash",SETLINEDASH}, -#line 33 "keyword_list" - {"setLineWidth",SETLINEWIDTH}, -#line 24 "keyword_list" - {"pushState",PUSHSTATE}, -#line 26 "keyword_list" - {"saveState",SAVESTATE}, -#line 44 "keyword_list" - {"updateFillOpacity",UPDATEFILLOPACITY}, -#line 16 "keyword_list" - {"endTextObject",ENDTEXTOBJECT}, -#line 53 "keyword_list" - {"updateStrokeOpacity",UPDATESTROKEOPACITY}, -#line 32 "keyword_list" - {"setLineJoin",SETLINEJOIN}, -#line 23 "keyword_list" - {"popState",POPSTATE}, -#line 36 "keyword_list" - {"setStrokeColor",SETSTROKECOLOR}, -#line 42 "keyword_list" - {"updateCtm",UPDATECTM}, -#line 15 "keyword_list" - {"endPage",ENDPAGE}, -#line 20 "keyword_list" - {"hyperLink",HYPERLINK}, -#line 14 "keyword_list" - {"drawSoftMaskedImage",DRAWSOFTMASKEDIMAGE}, -#line 37 "keyword_list" - {"setTextRenderMode",SETTEXTRENDERMODE}, -#line 13 "keyword_list" - {"drawMaskedImage",DRAWMASKEDIMAGE}, -#line 40 "keyword_list" - {"strokePath",STROKEPATH}, -#line 34 "keyword_list" - {"setMiterLimit",SETMITERLIMIT}, -#line 18 "keyword_list" - {"eoFillPath",EOFILLPATH}, -#line 10 "keyword_list" - {"drawImage",DRAWIMAGE}, -#line 9 "keyword_list" - {"drawChar",DRAWCHAR}, -#line 38 "keyword_list" - {"setTransformation",SETTRANSFORMATION}, -#line 27 "keyword_list" - {"setBlendMode",SETBLENDMODE}, -#line 12 "keyword_list" - {"drawMask",DRAWMASK}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, -#line 35 "keyword_list" - {"setPageNum",SETPAGENUM}, -#line 11 "keyword_list" - {"drawLink",DRAWLINK } - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - register int key = hash (str, len); - - if (key <= MAX_HASH_VALUE && key >= 0) - if (len == lengthtable[key]) - { - register const char *s = wordlist[key].name; - - if (*str == *s && !memcmp (str + 1, s + 1, len - 1)) - return &wordlist[key]; - } - } - return 0; -} diff --git a/sdext/source/pdfimport/wrapper/makefile.mk b/sdext/source/pdfimport/wrapper/makefile.mk index 743633c8b612..b2fbdfaa72e8 100755 --- a/sdext/source/pdfimport/wrapper/makefile.mk +++ b/sdext/source/pdfimport/wrapper/makefile.mk @@ -51,3 +51,9 @@ SLOFILES=\ .ENDIF .INCLUDE : target.mk + +$(SLO)$/wrapper.obj: $(INCCOM)$/hash.cxx + +$(INCCOM)$/hash.cxx: keyword_list + $(GPERF) -C -t -l -L C++ -m 20 -Z PdfKeywordHash -k'4-5,$$' keyword_list > $@ + diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index daa7cd42b61e..098ee584c910 100755..100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -68,7 +69,7 @@ #include <boost/scoped_ptr.hpp> #include <boost/scoped_array.hpp> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <string.h> #ifdef WNT #include <stdlib.h> @@ -147,7 +148,7 @@ enum parseKey { class Parser { - typedef std::hash_map< sal_Int64, + typedef boost::unordered_map< sal_Int64, FontAttributes > FontMapType; const uno::Reference<uno::XComponentContext> m_xContext; @@ -681,15 +682,15 @@ uno::Sequence<beans::PropertyValue> Parser::readImageImpl() aStreamCreationArgs, m_xContext ), uno::UNO_QUERY_THROW ); uno::Sequence<beans::PropertyValue> aSequence(3); - aSequence[0] = beans::PropertyValue( ::rtl::OUString::createFromAscii("URL"), + aSequence[0] = beans::PropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")), 0, uno::makeAny(aFileName), beans::PropertyState_DIRECT_VALUE ); - aSequence[1] = beans::PropertyValue( ::rtl::OUString::createFromAscii("InputStream"), + aSequence[1] = beans::PropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InputStream")), 0, uno::makeAny( xDataStream ), beans::PropertyState_DIRECT_VALUE ); - aSequence[2] = beans::PropertyValue( ::rtl::OUString::createFromAscii("InputSequence"), + aSequence[2] = beans::PropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InputSequence")), 0, uno::makeAny(aDataSequence), beans::PropertyState_DIRECT_VALUE ); @@ -1002,19 +1003,19 @@ bool xpdf_ImportFromFile( const ::rtl::OUString& rUR if( checkEncryption( aSysUPath, xIHdl, aPwd, bIsEncrypted, aDocName ) == false ) return false; - rtl::OUStringBuffer converterURL = rtl::OUString::createFromAscii("xpdfimport"); + rtl::OUStringBuffer converterURL = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("xpdfimport")); // retrieve package location url (xpdfimport executable is located there) // --------------------------------------------------- uno::Reference<deployment::XPackageInformationProvider> xProvider( xContext->getValueByName( - rtl::OUString::createFromAscii("/singletons/com.sun.star.deployment.PackageInformationProvider" )), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.deployment.PackageInformationProvider"))), uno::UNO_QUERY); if( xProvider.is() ) { converterURL.insert( 0, - rtl::OUString::createFromAscii("/")); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"))); converterURL.insert( 0, xProvider->getPackageLocation( @@ -1147,8 +1148,13 @@ bool xpdf_ImportFromStream( const uno::Reference< io::XInputStream >& xI osl_closeFile( aFile ); - return bSuccess && xpdf_ImportFromFile( aURL, rSink, xIHdl, rPwd, xContext ); + if ( bSuccess ) + bSuccess = xpdf_ImportFromFile( aURL, rSink, xIHdl, rPwd, xContext ); + osl_removeFile( aURL.pData ); + + return bSuccess; } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/xpdftest/makefile.mk b/sdext/source/pdfimport/xpdftest/makefile.mk index 9ebd9160fe38..23cc79be17af 100644 --- a/sdext/source/pdfimport/xpdftest/makefile.mk +++ b/sdext/source/pdfimport/xpdftest/makefile.mk @@ -44,8 +44,6 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : target.mk -#ALLTAR : $(MISC)$/test_0_succeeded $(MISC)$/test_1_succeeded - $(MISC)$/test_0_succeeded: $(BIN)$/xpdfimport$(EXECPOST) binary_0_out.def text_0_out.def testinput.pdf $(BIN)$/xpdfimport -f $(MISC)$/binary_0_out testinput.pdf > $(MISC)$/text_0_out diff --strip-trailing-cr $(MISC)$/binary_0_out binary_0_out.def diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index 5361330fd697..5868b6be9825 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * OpenOffice.org - a multi-platform office productivity suite @@ -657,7 +658,7 @@ void PDFOutDev::updateFont(GfxState *state) Ref* pID = gfxFont->getID(); // TODO(Q3): Portability problem long long fontID = (long long)pID->gen << 32 | (long long)pID->num; - std::hash_map< long long, FontAttributes >::const_iterator it = + boost::unordered_map< long long, FontAttributes >::const_iterator it = m_aFontMap.find( fontID ); if( it == m_aFontMap.end() ) { @@ -904,16 +905,6 @@ void PDFOutDev::drawMaskedImage(GfxState*, Object*, Stream* str, printf( "drawImage %d %d 0", width, height ); writePng_( aBuf, str, width, height, colorMap, maskStr, maskWidth, maskHeight, maskInvert, true ); writeBinaryBuffer( aBuf ); - #if 0 - OutputBuffer aBuf; initBuf(aBuf); - OutputBuffer aMaskBuf; initBuf(aMaskBuf); - - printf( "drawMaskedImage %d %d %d %d %d", width, height, maskWidth, maskHeight, 0 /*maskInvert note: currently we do inversion here*/ ); - writeImage( aBuf, str, width, height, colorMap ); - writeMaskLF( aMaskBuf, maskStr, width, height, maskInvert ); - writeBinaryBuffer(aBuf); - writeBinaryBuffer(aMaskBuf); - #endif } void PDFOutDev::drawSoftMaskedImage(GfxState*, Object*, Stream* str, @@ -927,16 +918,6 @@ void PDFOutDev::drawSoftMaskedImage(GfxState*, Object*, Stream* str, printf( "drawImage %d %d 0", width, height ); writePng_( aBuf, str, width, height, colorMap, maskStr, maskWidth, maskHeight, maskColorMap, true ); writeBinaryBuffer( aBuf ); - #if 0 - OutputBuffer aBuf; initBuf(aBuf); - OutputBuffer aMaskBuf; initBuf(aMaskBuf); - - printf( "drawSoftMaskedImage %d %d %d %d", width, height, maskWidth, maskHeight ); - writeImage( aBuf, str, width, height, colorMap ); - writeImageLF( aMaskBuf, maskStr, maskWidth, maskHeight, maskColorMap ); - writeBinaryBuffer(aBuf); - writeBinaryBuffer(aMaskBuf); - #endif } void PDFOutDev::setPageNum( int nNumPages ) @@ -946,3 +927,5 @@ void PDFOutDev::setPageNum( int nNumPages ) } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx index dfb578d06862..5b672068c997 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * OpenOffice.org - a multi-platform office productivity suite @@ -57,7 +58,7 @@ #pragma warning(pop) #endif -#include <hash_map> +#include <boost/unordered_map.hpp> #include <vector> class GfxPath; @@ -146,7 +147,7 @@ namespace pdfi { // not owned by this class PDFDoc* m_pDoc; - mutable std::hash_map< long long, + mutable boost::unordered_map< long long, FontAttributes > m_aFontMap; UnicodeMap* m_pUtf8Map; @@ -288,3 +289,4 @@ typedef std::vector< Output_t > OutputBuffer; #endif /* INCLUDED_PDFI_OUTDEV_HXX */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx index 411989ecce9c..71b0c8989228 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * OpenOffice.org - a multi-platform office productivity suite @@ -29,6 +30,7 @@ ************************************************************************/ #include "pnghelper.hxx" +#include <sal/macros.h> #ifdef SYSTEM_ZLIB #include "zlib.h" @@ -130,9 +132,9 @@ sal_uInt32 PngHelper::deflateBuffer( const Output_t* i_pBuf, size_t i_nLen, Outp void PngHelper::appendFileHeader( OutputBuffer& o_rOutputBuf ) { - static const Output_t aHeader[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a }; + static const unsigned char aHeader[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a }; - o_rOutputBuf.insert( o_rOutputBuf.end(), aHeader, aHeader + sizeof(aHeader)/sizeof(aHeader[0]) ); + o_rOutputBuf.insert( o_rOutputBuf.end(), aHeader, aHeader + SAL_N_ELEMENTS(aHeader) ); } size_t PngHelper::startChunk( const char* pChunkName, OutputBuffer& o_rOutputBuf ) @@ -414,3 +416,4 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, appendIEND( o_rOutputBuf ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx index 5fcf8125e7dd..c7b050869554 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx +++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * OpenOffice.org - a multi-platform office productivity suite @@ -90,3 +91,5 @@ namespace pdfi } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx index e0c5763acac8..f10ed9278b6b 100644 --- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * OpenOffice.org - a multi-platform office productivity suite @@ -29,7 +30,6 @@ ************************************************************************/ #include "pdfioutdev_gpl.hxx" -//#include "SecurityHandler.h" #ifdef WNT # include <io.h> # include <fcntl.h> /*_O_BINARY*/ @@ -159,11 +159,7 @@ int main(int argc, char **argv) // Check various permissions. - if ( !aDoc.isOk()|| - !aDoc.okToPrint() || - !aDoc.okToChange()|| - !aDoc.okToCopy()|| - !aDoc.okToAddNotes() ) + if ( !aDoc.isOk() ) { pdfi::PDFOutDev* pOutDev( new pdfi::PDFOutDev(&aErrDoc) ); @@ -211,3 +207,4 @@ int main(int argc, char **argv) return 0; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterAccessibility.cxx b/sdext/source/presenter/PresenterAccessibility.cxx index 827754e1524b..35c17c0da0bd 100755..100644 --- a/sdext/source/presenter/PresenterAccessibility.cxx +++ b/sdext/source/presenter/PresenterAccessibility.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -67,7 +68,7 @@ using ::rtl::OUString; namespace sdext { namespace presenter { namespace { - typedef ::cppu::WeakComponentImplHelper5 < + typedef ::cppu::PartialWeakComponentImplHelper5 < cssa::XAccessible, cssa::XAccessibleContext, cssa::XAccessibleComponent, @@ -111,6 +112,14 @@ public: void UpdateStateSet (void); + //----- XComponent --------------------------------------------------- + + virtual void SAL_CALL dispose()throw (cssu::RuntimeException) + { WeakComponentImplHelperBase::dispose(); } + virtual void SAL_CALL addEventListener(const cssu::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (cssu::RuntimeException) + { WeakComponentImplHelperBase::addEventListener(xListener); } + virtual void SAL_CALL removeEventListener(const cssu::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (cssu::RuntimeException) + { WeakComponentImplHelperBase::removeEventListener(xListener); } //----- XAccessible ------------------------------------------------------- @@ -199,9 +208,6 @@ public: const cssu::Reference<cssa::XAccessibleEventListener>& rxListener) throw (cssu::RuntimeException); - using PresenterAccessibleObjectInterfaceBase::addEventListener; - using PresenterAccessibleObjectInterfaceBase::removeEventListener; - //----- XWindowListener --------------------------------------------------- virtual void SAL_CALL windowResized (const css::awt::WindowEvent& rEvent) @@ -466,7 +472,7 @@ public: OUString sName (A2S("Presenter Console")); PresenterConfigurationAccess aConfiguration ( rxContext, - OUString::createFromAscii("/org.openoffice.Office.extension.PresenterScreen/"), + OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.extension.PresenterScreen/")), PresenterConfigurationAccess::READ_ONLY); aConfiguration.GetConfigurationNode(A2S("Presenter/Accessibility/Console/String")) >>= sName; @@ -499,7 +505,7 @@ public: { PresenterConfigurationAccess aConfiguration ( rxContext, - OUString::createFromAscii("/org.openoffice.Office.extension.PresenterScreen/"), + OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.extension.PresenterScreen/")), PresenterConfigurationAccess::READ_ONLY); aConfiguration.GetConfigurationNode(A2S("Presenter/Accessibility/Preview/String")) >>= sName; @@ -1611,7 +1617,7 @@ void PresenterAccessible::AccessibleObject::ThrowException ( const sal_Char* pMessage, const ExceptionType eExceptionType) const { - const OUString sMessage (OUString(A2S("PresenterAccessible: ")) + OUString(A2S(pMessage))); + const OUString sMessage (OUString(A2S("PresenterAccessible: ")) + OUString::createFromAscii(pMessage)); const Reference<XInterface> xObject ( const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this))); switch (eExceptionType) @@ -2253,7 +2259,7 @@ rtl::Reference<PresenterAccessible::AccessibleObject> AccessibleNotes::Create ( { PresenterConfigurationAccess aConfiguration ( rxContext, - OUString::createFromAscii("/org.openoffice.Office.extension.PresenterScreen/"), + OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.extension.PresenterScreen/")), PresenterConfigurationAccess::READ_ONLY); aConfiguration.GetConfigurationNode(A2S("Presenter/Accessibility/Notes/String")) >>= sName; @@ -2485,3 +2491,5 @@ void AccessibleFocusManager::FocusObject ( } } } // end of namespace ::sd::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterAccessibility.hxx b/sdext/source/presenter/PresenterAccessibility.hxx index 04b4bc214650..16e19abc1695 100755..100644 --- a/sdext/source/presenter/PresenterAccessibility.hxx +++ b/sdext/source/presenter/PresenterAccessibility.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -154,3 +155,5 @@ private: } } // end of namespace ::sd::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterAnimation.cxx b/sdext/source/presenter/PresenterAnimation.cxx index 40b626ecec0a..0be27e813b38 100644 --- a/sdext/source/presenter/PresenterAnimation.cxx +++ b/sdext/source/presenter/PresenterAnimation.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -138,3 +139,5 @@ void PresenterAnimation::RunEndCallbacks (void) } } // end of namespace ::sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterAnimation.hxx b/sdext/source/presenter/PresenterAnimation.hxx index a1148cd03737..76d102a20758 100644 --- a/sdext/source/presenter/PresenterAnimation.hxx +++ b/sdext/source/presenter/PresenterAnimation.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -128,3 +129,5 @@ typedef ::boost::shared_ptr<PresenterAnimation> SharedPresenterAnimation; } } // end of namespace ::sdext::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterAnimator.cxx b/sdext/source/presenter/PresenterAnimator.cxx index 572b2b4ff2ec..d16528f658e3 100644 --- a/sdext/source/presenter/PresenterAnimator.cxx +++ b/sdext/source/presenter/PresenterAnimator.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,7 +34,7 @@ #include "PresenterTimer.hxx" #include <osl/diagnose.h> #include <osl/time.h> -#include <vos/timer.hxx> +#include <salhelper/timer.hxx> #include <boost/bind.hpp> #include <boost/function.hpp> @@ -161,7 +162,7 @@ void PresenterAnimator::ScheduleNextRun (const sal_uInt64 nStartTime) if (mnNextTime==0 || nStartTime<mnNextTime) { mnNextTime = nStartTime; - ::vos::TTimeValue aTimeValue (GetSeconds(mnNextTime), GetNanoSeconds(mnNextTime)); + ::salhelper::TTimeValue aTimeValue (GetSeconds(mnNextTime), GetNanoSeconds(mnNextTime)); PresenterTimer::ScheduleSingleTaskAbsolute ( ::boost::bind(&PresenterAnimator::Process, this), aTimeValue); @@ -169,3 +170,5 @@ void PresenterAnimator::ScheduleNextRun (const sal_uInt64 nStartTime) } } } // end of namespace ::sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterAnimator.hxx b/sdext/source/presenter/PresenterAnimator.hxx index 0c0efadb22f7..073592b69947 100644 --- a/sdext/source/presenter/PresenterAnimator.hxx +++ b/sdext/source/presenter/PresenterAnimator.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,3 +71,5 @@ private: } } // end of namespace ::sdext::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterBitmapContainer.cxx b/sdext/source/presenter/PresenterBitmapContainer.cxx index 024bb6ffb5d0..1422ac3509dc 100644 --- a/sdext/source/presenter/PresenterBitmapContainer.cxx +++ b/sdext/source/presenter/PresenterBitmapContainer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -496,3 +497,5 @@ void PresenterBitmapContainer::BitmapDescriptor::SetBitmap ( } } // end of namespace ::sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterBitmapContainer.hxx b/sdext/source/presenter/PresenterBitmapContainer.hxx index 12811032e578..500899992605 100644 --- a/sdext/source/presenter/PresenterBitmapContainer.hxx +++ b/sdext/source/presenter/PresenterBitmapContainer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -163,3 +164,5 @@ typedef ::boost::shared_ptr<PresenterBitmapContainer::BitmapDescriptor> SharedBi } } // end of namespace ::sdext::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterButton.cxx b/sdext/source/presenter/PresenterButton.cxx index 2d75885b8a35..e13bbcdc1386 100644 --- a/sdext/source/presenter/PresenterButton.cxx +++ b/sdext/source/presenter/PresenterButton.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -133,7 +134,7 @@ PresenterButton::PresenterButton ( mxPresenterHelper = Reference<drawing::XPresenterHelper>( xFactory->createInstanceWithContext( - OUString::createFromAscii("com.sun.star.comp.Draw.PresenterHelper"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Draw.PresenterHelper")), rxComponentContext), UNO_QUERY_THROW); @@ -610,3 +611,5 @@ void PresenterButton::ThrowIfDisposed (void) const } } // end of namespace sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterButton.hxx b/sdext/source/presenter/PresenterButton.hxx index bbd93864f100..b952a9bfa77c 100644 --- a/sdext/source/presenter/PresenterButton.hxx +++ b/sdext/source/presenter/PresenterButton.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -183,3 +184,5 @@ private: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterCanvasHelper.cxx b/sdext/source/presenter/PresenterCanvasHelper.cxx index e9c72764fcc5..f783b381a6e4 100644 --- a/sdext/source/presenter/PresenterCanvasHelper.cxx +++ b/sdext/source/presenter/PresenterCanvasHelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -326,3 +327,5 @@ css::geometry::RealSize2D PresenterCanvasHelper::GetTextSize ( } } // end of namespace sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterCanvasHelper.hxx b/sdext/source/presenter/PresenterCanvasHelper.hxx index 71d5bc40a023..58dde30788e6 100644 --- a/sdext/source/presenter/PresenterCanvasHelper.hxx +++ b/sdext/source/presenter/PresenterCanvasHelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -117,3 +118,5 @@ private: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterClock.cxx b/sdext/source/presenter/PresenterClock.cxx index bccce731efb0..1d14b6473e20 100644 --- a/sdext/source/presenter/PresenterClock.cxx +++ b/sdext/source/presenter/PresenterClock.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -49,7 +50,7 @@ #include <osl/mutex.hxx> #include <osl/time.h> #include <rtl/ref.hxx> -#include <vos/timer.hxx> +#include <salhelper/timer.hxx> #include <boost/bind.hpp> #include <cmath> @@ -63,7 +64,7 @@ namespace sdext { namespace presenter { /** Wrapper around a library timer. */ -class PresenterClock::Timer : public vos::OTimer +class PresenterClock::Timer : public salhelper::Timer { public: explicit Timer (const ::rtl::Reference<PresenterClock>& rpClock); @@ -349,7 +350,6 @@ void PresenterClock::LateInit (void) void SAL_CALL PresenterClock::disposing (void) { - // osl::MutexGuard aGuard (m_aMutex); if (mpTimer != NULL) { mpTimer->Stop(); @@ -397,9 +397,6 @@ void PresenterClock::UpdateTime (void) void SAL_CALL PresenterClock::disposing (const lang::EventObject& rEventObject) throw (RuntimeException) { - // ::osl::MutexGuard aSolarGuard (::osl::Mutex::getGlobalMutex()); - // osl::MutexGuard aGuard (m_aMutex); - if (rEventObject.Source == mxWindow) { mxWindow = NULL; @@ -416,9 +413,7 @@ void SAL_CALL PresenterClock::disposing (const lang::EventObject& rEventObject) void SAL_CALL PresenterClock::windowPaint (const awt::PaintEvent& rEvent) throw (RuntimeException) { - (void)rEvent; ThrowIfDisposed(); - ::osl::MutexGuard aSolarGuard (::osl::Mutex::getGlobalMutex()); Paint(rEvent.UpdateRect); } @@ -471,7 +466,6 @@ void SAL_CALL PresenterClock::windowHidden (const lang::EventObject& rEvent) void SAL_CALL PresenterClock::mousePressed (const css::awt::MouseEvent& rEvent) throw (css::uno::RuntimeException) { - (void)rEvent; if (rEvent.Buttons == awt::MouseButton::LEFT) { SetMode(mnMode+1); @@ -634,7 +628,7 @@ void PresenterClock::SetMode (const sal_Int32 nMode) mpClockPainter.reset( new AnalogBitmapPainter( mxComponentContext, - OUString::createFromAscii("ClockTheme"))); + OUString(RTL_CONSTASCII_USTRINGPARAM("ClockTheme")))); mpClockPainter2.reset(); break; @@ -652,7 +646,7 @@ void PresenterClock::SetMode (const sal_Int32 nMode) mpClockPainter.reset( new AnalogBitmapPainter( mxComponentContext, - OUString::createFromAscii("ClockTheme"))); + OUString(RTL_CONSTASCII_USTRINGPARAM("ClockTheme")))); mpClockPainter2.reset(new AnalogDefaultPainter()); break; } @@ -680,7 +674,7 @@ void PresenterClock::ThrowIfDisposed (void) //===== Timer ================================================================= PresenterClock::Timer::Timer (const ::rtl::Reference<PresenterClock>& rpClock) - : OTimer(vos::TTimeValue(10), vos::TTimeValue(100/*ms*/)), + : salhelper::Timer(salhelper::TTimeValue(10), salhelper::TTimeValue(100/*ms*/)), mpClock(rpClock) { acquire(); @@ -1040,7 +1034,7 @@ void AnalogBitmapPainter::PrepareBitmaps (const Reference<rendering::XCanvas>& r // Get access to the clock bitmaps in the configuration. PresenterConfigurationAccess aConfiguration ( mxComponentContext, - OUString::createFromAscii("org.openoffice.Office.extension.PresenterScreen"), + OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.extension.PresenterScreen")), PresenterConfigurationAccess::READ_ONLY); Reference<container::XNameAccess> xTheme (GetTheme(aConfiguration)); @@ -1064,20 +1058,20 @@ Reference<container::XNameAccess> AnalogBitmapPainter::GetTheme ( // Get root of clock themes. Reference<container::XHierarchicalNameAccess> xClock ( rConfiguration.GetConfigurationNode( - OUString::createFromAscii("PresenterScreenSettings/AnalogBitmapClock")), + OUString(RTL_CONSTASCII_USTRINGPARAM("PresenterScreenSettings/AnalogBitmapClock"))), UNO_QUERY); // Determine the name of the theme to use. - OUString sCurrentThemeName (OUString::createFromAscii("DefaultTheme")); + OUString sCurrentThemeName (RTL_CONSTASCII_USTRINGPARAM("DefaultTheme")); rConfiguration.GetConfigurationNode( xClock, - OUString::createFromAscii("CurrentTheme")) >>= sCurrentThemeName; + OUString(RTL_CONSTASCII_USTRINGPARAM("CurrentTheme"))) >>= sCurrentThemeName; // Load the clock theme. Reference<container::XNameAccess> xThemes ( rConfiguration.GetConfigurationNode( xClock, - OUString::createFromAscii("Themes")), + OUString(RTL_CONSTASCII_USTRINGPARAM("Themes"))), UNO_QUERY); if (xThemes.is()) { @@ -1104,7 +1098,7 @@ bool AnalogBitmapPainter::ThemeNameComparator ( if (rxCandidate.is()) { OUString sThemeName; - if (rxCandidate->getByName(OUString::createFromAscii("ThemeName")) >>= sThemeName) + if (rxCandidate->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("ThemeName"))) >>= sThemeName) { return sThemeName == rsCurrentThemeName; } @@ -1125,13 +1119,13 @@ void AnalogBitmapPainter::LoadBitmaps ( // Get base path to bitmaps. Reference<deployment::XPackageInformationProvider> xInformationProvider ( - mxComponentContext->getValueByName(OUString::createFromAscii( - "/singletons/com.sun.star.deployment.PackageInformationProvider")), + mxComponentContext->getValueByName(OUString(RTL_CONSTASCII_USTRINGPARAM( + "/singletons/com.sun.star.deployment.PackageInformationProvider"))), UNO_QUERY); OUString sLocation; if (xInformationProvider.is()) sLocation = xInformationProvider->getPackageLocation(gsExtensionIdentifier); - sLocation += OUString::createFromAscii("/"); + sLocation += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); // Create the bitmap loader. Reference<lang::XMultiComponentFactory> xFactory ( @@ -1142,7 +1136,7 @@ void AnalogBitmapPainter::LoadBitmaps ( aArguments[0] <<= rxCanvas; Reference<container::XNameAccess> xBitmapLoader( xFactory->createInstanceWithArgumentsAndContext( - OUString::createFromAscii("com.sun.star.drawing.PresenterWorkaroundService"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.PresenterWorkaroundService")), aArguments, mxComponentContext), UNO_QUERY); @@ -1152,12 +1146,12 @@ void AnalogBitmapPainter::LoadBitmaps ( // Iterate over all entries in the bitmap list and load the bitmaps. Reference<container::XNameAccess> xBitmaps ( - rxClockTheme->getByName(OUString::createFromAscii("Bitmaps")), + rxClockTheme->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("Bitmaps"))), UNO_QUERY); ::std::vector<rtl::OUString> aBitmapProperties (3); - aBitmapProperties[0] = OUString::createFromAscii("FileName"); - aBitmapProperties[1] = OUString::createFromAscii("XOffset"); - aBitmapProperties[2] = OUString::createFromAscii("YOffset"); + aBitmapProperties[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("FileName")); + aBitmapProperties[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("XOffset")); + aBitmapProperties[2] = OUString(RTL_CONSTASCII_USTRINGPARAM("YOffset")); PresenterConfigurationAccess::ForAll( xBitmaps, aBitmapProperties, @@ -1181,11 +1175,11 @@ void AnalogBitmapPainter::LoadBitmap ( if (rValues.size() == 3) { BitmapDescriptor* pDescriptor = NULL; - if (rsKey == OUString::createFromAscii("Face")) + if (rsKey == OUString(RTL_CONSTASCII_USTRINGPARAM("Face"))) pDescriptor = &maFace; - else if (rsKey == OUString::createFromAscii("HourHand")) + else if (rsKey == OUString(RTL_CONSTASCII_USTRINGPARAM("HourHand"))) pDescriptor = &maHourHand; - else if (rsKey == OUString::createFromAscii("MinuteHand")) + else if (rsKey == OUString(RTL_CONSTASCII_USTRINGPARAM("MinuteHand"))) pDescriptor = &maMinuteHand; if (pDescriptor == NULL) @@ -1290,12 +1284,12 @@ void DigitalDefaultPainter::Paint ( { sText = OUString::valueOf(nHour>12 ? nHour-12 : nHour); } - sText += OUString::createFromAscii(":"); + sText += OUString(RTL_CONSTASCII_USTRINGPARAM(":")); const OUString sMinutes (OUString::valueOf(nMinute)); switch (sMinutes.getLength()) { case 1 : - sText += OUString::createFromAscii("0") + sMinutes; + sText += OUString(RTL_CONSTASCII_USTRINGPARAM("0")) + sMinutes; break; case 2: sText += sMinutes; @@ -1306,12 +1300,12 @@ void DigitalDefaultPainter::Paint ( } if (bIsShowSeconds) { - sText += OUString::createFromAscii(":"); + sText += OUString(RTL_CONSTASCII_USTRINGPARAM(":")); const OUString sSeconds (OUString::valueOf(nSecond)); switch (sSeconds.getLength()) { case 1 : - sText += OUString::createFromAscii("0") + sSeconds; + sText += OUString(RTL_CONSTASCII_USTRINGPARAM("0")) + sSeconds; break; case 2: sText += sSeconds; @@ -1387,13 +1381,13 @@ void DigitalDefaultPainter::CreateFont ( // For the case that not all digits have the same width, create // different templates for 12 and 24 hour mode. if (mbIs24HourFormat) - sTimeTemplate = OUString::createFromAscii("20"); + sTimeTemplate = OUString(RTL_CONSTASCII_USTRINGPARAM("20")); else - sTimeTemplate = OUString::createFromAscii("10"); + sTimeTemplate = OUString(RTL_CONSTASCII_USTRINGPARAM("10")); if (bIsShowSeconds) - sTimeTemplate += OUString::createFromAscii(":00:00"); + sTimeTemplate += OUString(RTL_CONSTASCII_USTRINGPARAM(":00:00")); else - sTimeTemplate += OUString::createFromAscii(":00"); + sTimeTemplate += OUString(RTL_CONSTASCII_USTRINGPARAM(":00")); rendering::StringContext aContext ( sTimeTemplate, @@ -1447,3 +1441,5 @@ void DigitalDefaultPainter::CreateFont ( } } // end of namespace ::sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterClock.hxx b/sdext/source/presenter/PresenterClock.hxx index 810ae5941803..352663309b75 100644 --- a/sdext/source/presenter/PresenterClock.hxx +++ b/sdext/source/presenter/PresenterClock.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -197,3 +198,5 @@ private: } } // end of namespace ::sdext::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterComponent.cxx b/sdext/source/presenter/PresenterComponent.cxx index ea921c692a73..f4b109d2d326 100644 --- a/sdext/source/presenter/PresenterComponent.cxx +++ b/sdext/source/presenter/PresenterComponent.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -121,7 +122,7 @@ extern "C" - void SAL_CALL component_getImplementationEnvironment( + SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; @@ -139,7 +140,7 @@ extern "C" - void * SAL_CALL component_getFactory( + SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , gServiceEntries); @@ -148,3 +149,5 @@ extern "C" } } } // end of namespace sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterComponent.hxx b/sdext/source/presenter/PresenterComponent.hxx index 4ff1a173ad6b..4334d53f081d 100644 --- a/sdext/source/presenter/PresenterComponent.hxx +++ b/sdext/source/presenter/PresenterComponent.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -53,3 +54,5 @@ public: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterConfigurationAccess.cxx b/sdext/source/presenter/PresenterConfigurationAccess.cxx index fb1aca149d26..acba65b233a9 100644 --- a/sdext/source/presenter/PresenterConfigurationAccess.cxx +++ b/sdext/source/presenter/PresenterConfigurationAccess.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -408,3 +409,4 @@ Any PresenterConfigurationAccess::GetProperty ( } } // end of namespace sdext::tools +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterConfigurationAccess.hxx b/sdext/source/presenter/PresenterConfigurationAccess.hxx index 8657de24a015..81f1130e696b 100644 --- a/sdext/source/presenter/PresenterConfigurationAccess.hxx +++ b/sdext/source/presenter/PresenterConfigurationAccess.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -203,3 +204,5 @@ private: } } // end of namespace sdext::tools #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx index 4cad226281bf..d37f0d966db8 100644 --- a/sdext/source/presenter/PresenterController.cxx +++ b/sdext/source/presenter/PresenterController.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -998,7 +999,6 @@ void SAL_CALL PresenterController::keyReleased (const awt::KeyEvent& rEvent) } break; - case awt::Key::LEFT: case awt::Key::PAGEUP: if (mxSlideShowController.is()) { @@ -1009,6 +1009,7 @@ void SAL_CALL PresenterController::keyReleased (const awt::KeyEvent& rEvent) } break; + case awt::Key::LEFT: case awt::Key::UP: case awt::Key::P: case awt::Key::BACKSPACE: @@ -1310,8 +1311,8 @@ double PresenterController::GetSlideAspectRatio (void) const Reference<beans::XPropertySet> xProperties(xSlides->getByIndex(0),UNO_QUERY_THROW); sal_Int32 nWidth (28000); sal_Int32 nHeight (21000); - if ((xProperties->getPropertyValue(OUString::createFromAscii("Width")) >>= nWidth) - && (xProperties->getPropertyValue(OUString::createFromAscii("Height")) >>= nHeight) + if ((xProperties->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Width"))) >>= nWidth) + && (xProperties->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Height"))) >>= nHeight) && nHeight > 0) { nSlideAspectRatio = double(nWidth) / double(nHeight); @@ -1376,3 +1377,4 @@ void PresenterController::ThrowIfDisposed (void) const } } // end of namespace ::sdext::presenter +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterController.hxx b/sdext/source/presenter/PresenterController.hxx index c2f3a91a6018..b0fe117a47b0 100644 --- a/sdext/source/presenter/PresenterController.hxx +++ b/sdext/source/presenter/PresenterController.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -265,3 +266,5 @@ private: } } // end of namespace ::sdext::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterCurrentSlideObserver.cxx b/sdext/source/presenter/PresenterCurrentSlideObserver.cxx index f516630a87a9..90e55b219390 100644 --- a/sdext/source/presenter/PresenterCurrentSlideObserver.cxx +++ b/sdext/source/presenter/PresenterCurrentSlideObserver.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -152,3 +153,5 @@ void SAL_CALL PresenterCurrentSlideObserver::disposing ( } } } // end of namespace ::sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterCurrentSlideObserver.hxx b/sdext/source/presenter/PresenterCurrentSlideObserver.hxx index f224ba71f07c..fc9a5fe18b7a 100644 --- a/sdext/source/presenter/PresenterCurrentSlideObserver.hxx +++ b/sdext/source/presenter/PresenterCurrentSlideObserver.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,7 +36,7 @@ #include <cppuhelper/compbase1.hxx> #include <cppuhelper/basemutex.hxx> #include <rtl/ref.hxx> -#include <vos/timer.hxx> +#include <salhelper/timer.hxx> namespace css = ::com::sun::star; @@ -93,3 +94,5 @@ private: } } // end of namespace ::sdext::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterExtensionIdentifier.txx b/sdext/source/presenter/PresenterExtensionIdentifier.txx index aae3b82e687a..e505fd092bba 100644 --- a/sdext/source/presenter/PresenterExtensionIdentifier.txx +++ b/sdext/source/presenter/PresenterExtensionIdentifier.txx @@ -34,7 +34,7 @@ namespace sdext { namespace presenter { makefile.mk with the actual, platform specific, extension identifier. */ const ::rtl::OUString PresenterComponent::gsExtensionIdentifier( - ::rtl::OUString::createFromAscii("com.sun.PresenterScreen-UPDATED_PLATFORM")); + RTL_CONSTASCII_USTRINGPARAM("com.sun.PresenterScreen-UPDATED_PLATFORM")); } } diff --git a/sdext/source/presenter/PresenterFrameworkObserver.cxx b/sdext/source/presenter/PresenterFrameworkObserver.cxx index 13c0cf2a72a0..3142d7606fb2 100644 --- a/sdext/source/presenter/PresenterFrameworkObserver.cxx +++ b/sdext/source/presenter/PresenterFrameworkObserver.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -211,3 +212,5 @@ void SAL_CALL PresenterFrameworkObserver::notifyConfigurationChange ( } } } // end of namespace ::sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterFrameworkObserver.hxx b/sdext/source/presenter/PresenterFrameworkObserver.hxx index 15b6463a6a86..422055830d6e 100644 --- a/sdext/source/presenter/PresenterFrameworkObserver.hxx +++ b/sdext/source/presenter/PresenterFrameworkObserver.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -128,3 +129,5 @@ private: } } // end of namespace ::sdext::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterGeometryHelper.cxx b/sdext/source/presenter/PresenterGeometryHelper.cxx index b613f8d0c1f5..2fdc0ea004ea 100644 --- a/sdext/source/presenter/PresenterGeometryHelper.cxx +++ b/sdext/source/presenter/PresenterGeometryHelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -332,3 +333,5 @@ Reference<rendering::XPolyPolygon2D> PresenterGeometryHelper::CreatePolygon( } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterGeometryHelper.hxx b/sdext/source/presenter/PresenterGeometryHelper.hxx index 15f70f7647ec..b5901a68fd8d 100644 --- a/sdext/source/presenter/PresenterGeometryHelper.hxx +++ b/sdext/source/presenter/PresenterGeometryHelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -129,3 +130,5 @@ public: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterHelpView.cxx b/sdext/source/presenter/PresenterHelpView.cxx index 0e08ad6e92ce..d8e3a6c0ac5c 100644 --- a/sdext/source/presenter/PresenterHelpView.cxx +++ b/sdext/source/presenter/PresenterHelpView.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -389,7 +390,7 @@ void PresenterHelpView::ReadHelpStrings (void) mpTextContainer.reset(new TextContainer()); PresenterConfigurationAccess aConfiguration ( mxComponentContext, - OUString::createFromAscii("/org.openoffice.Office.extension.PresenterScreen/"), + OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.extension.PresenterScreen/")), PresenterConfigurationAccess::READ_ONLY); Reference<container::XNameAccess> xStrings ( aConfiguration.GetConfigurationNode(A2S("PresenterScreenSettings/HelpView/HelpStrings")), @@ -821,3 +822,4 @@ void Block::Update ( } } // end of namespace ::sdext::presenter +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterHelpView.hxx b/sdext/source/presenter/PresenterHelpView.hxx index 8b25bf81b485..2d5e0efdcfc2 100644 --- a/sdext/source/presenter/PresenterHelpView.hxx +++ b/sdext/source/presenter/PresenterHelpView.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -141,3 +142,5 @@ private: } } // end of namespace ::sdext::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterHelper.cxx b/sdext/source/presenter/PresenterHelper.cxx index 8f3b882abd4b..13338aefb212 100644 --- a/sdext/source/presenter/PresenterHelper.cxx +++ b/sdext/source/presenter/PresenterHelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,28 +44,28 @@ using ::rtl::OUString; namespace sdext { namespace presenter { const OUString PresenterHelper::msPaneURLPrefix( - OUString::createFromAscii("private:resource/pane/")); + RTL_CONSTASCII_USTRINGPARAM("private:resource/pane/")); const OUString PresenterHelper::msCenterPaneURL( - msPaneURLPrefix + OUString::createFromAscii("CenterPane")); + msPaneURLPrefix + OUString(RTL_CONSTASCII_USTRINGPARAM("CenterPane"))); const OUString PresenterHelper::msFullScreenPaneURL( - msPaneURLPrefix + OUString::createFromAscii("FullScreenPane")); + msPaneURLPrefix + OUString(RTL_CONSTASCII_USTRINGPARAM("FullScreenPane"))); const OUString PresenterHelper::msViewURLPrefix( - OUString::createFromAscii("private:resource/view/")); + RTL_CONSTASCII_USTRINGPARAM("private:resource/view/")); const OUString PresenterHelper::msPresenterScreenURL( - msViewURLPrefix + OUString::createFromAscii("PresenterScreen")); + msViewURLPrefix + OUString(RTL_CONSTASCII_USTRINGPARAM("PresenterScreen"))); const OUString PresenterHelper::msSlideSorterURL( - msViewURLPrefix + OUString::createFromAscii("SlideSorter")); + msViewURLPrefix + OUString(RTL_CONSTASCII_USTRINGPARAM("SlideSorter"))); const OUString PresenterHelper::msResourceActivationEvent( - OUString::createFromAscii("ResourceActivation")); + RTL_CONSTASCII_USTRINGPARAM("ResourceActivation")); const OUString PresenterHelper::msResourceDeactivationEvent( - OUString::createFromAscii("ResourceDeactivation")); + RTL_CONSTASCII_USTRINGPARAM("ResourceDeactivation")); const OUString PresenterHelper::msDefaultPaneStyle ( - OUString::createFromAscii("DefaultPaneStyle")); + RTL_CONSTASCII_USTRINGPARAM("DefaultPaneStyle")); const OUString PresenterHelper::msDefaultViewStyle ( - OUString::createFromAscii("DefaultViewStyle")); + RTL_CONSTASCII_USTRINGPARAM("DefaultViewStyle")); Reference<presentation::XSlideShowController> PresenterHelper::GetSlideShowController ( @@ -91,3 +92,5 @@ Reference<presentation::XSlideShowController> PresenterHelper::GetSlideShowContr } } // end of namespace ::sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterHelper.hxx b/sdext/source/presenter/PresenterHelper.hxx index dcfbef0eecca..75f4cbdd9f0c 100644 --- a/sdext/source/presenter/PresenterHelper.hxx +++ b/sdext/source/presenter/PresenterHelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,3 +76,5 @@ private: } } // end of namespace presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterNotesView.cxx b/sdext/source/presenter/PresenterNotesView.cxx index 10837aaaef64..9cbf93543ef5 100644 --- a/sdext/source/presenter/PresenterNotesView.cxx +++ b/sdext/source/presenter/PresenterNotesView.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -805,3 +806,5 @@ void PresenterNotesView::ThrowIfDisposed (void) } } // end of namespace ::sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterNotesView.hxx b/sdext/source/presenter/PresenterNotesView.hxx index 9f37718f2956..282f86465dc6 100644 --- a/sdext/source/presenter/PresenterNotesView.hxx +++ b/sdext/source/presenter/PresenterNotesView.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -195,3 +196,5 @@ private: } } // end of namespace ::sdext::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterPaintManager.cxx b/sdext/source/presenter/PresenterPaintManager.cxx index 433d52076526..e934130d9ec2 100644 --- a/sdext/source/presenter/PresenterPaintManager.cxx +++ b/sdext/source/presenter/PresenterPaintManager.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -173,3 +174,5 @@ void PresenterPaintManager::Invalidate ( } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterPaintManager.hxx b/sdext/source/presenter/PresenterPaintManager.hxx index faabb53cc378..421edbeb171b 100644 --- a/sdext/source/presenter/PresenterPaintManager.hxx +++ b/sdext/source/presenter/PresenterPaintManager.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -94,3 +95,5 @@ private: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterPane.cxx b/sdext/source/presenter/PresenterPane.cxx index 509fc4acacaa..096e5615fcbe 100644 --- a/sdext/source/presenter/PresenterPane.cxx +++ b/sdext/source/presenter/PresenterPane.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -56,7 +57,7 @@ PresenterPane::PresenterPane ( mxComponentContext->getServiceManager(), UNO_QUERY_THROW); mxPresenterHelper = Reference<drawing::XPresenterHelper>( xFactory->createInstanceWithContext( - OUString::createFromAscii("com.sun.star.comp.Draw.PresenterHelper"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Draw.PresenterHelper")), mxComponentContext), UNO_QUERY_THROW); } @@ -232,3 +233,5 @@ void PresenterPane::UpdateBoundingBox (void) } } // end of namespace ::sd::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterPane.hxx b/sdext/source/presenter/PresenterPane.hxx index 96471f68e5d6..303bb0c6f5ed 100644 --- a/sdext/source/presenter/PresenterPane.hxx +++ b/sdext/source/presenter/PresenterPane.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -116,3 +117,5 @@ private: } } // end of namespace ::sd::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterPaneAnimator.cxx b/sdext/source/presenter/PresenterPaneAnimator.cxx index a37b58e55c60..f3864045b768 100644 --- a/sdext/source/presenter/PresenterPaneAnimator.cxx +++ b/sdext/source/presenter/PresenterPaneAnimator.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -209,7 +210,7 @@ namespace { void CreateSubstitution (const Reference<rendering::XSpriteCanvas>& rxCanvas); void ThawPanes (void); void Restore (void); - ::boost::shared_ptr<PresenterSprite> GetSubstitution (void); + ::boost::shared_ptr<PresenterSprite> GetSubstitution (void) const; css::geometry::RealRectangle2D GetOriginalBoundingBox (void) const; css::geometry::RealRectangle2D GetCurrentBoundingBox (void) const; void MovePanes ( @@ -1132,8 +1133,7 @@ void PaneGroup::Restore (void) - -::boost::shared_ptr<PresenterSprite> PaneGroup::GetSubstitution (void) +::boost::shared_ptr<PresenterSprite> PaneGroup::GetSubstitution (void) const { return mpSubstitution; } @@ -1422,3 +1422,5 @@ geometry::RealSize2D GetSize (const geometry::RealRectangle2D& rBox) } } // end of namespace ::sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterPaneAnimator.hxx b/sdext/source/presenter/PresenterPaneAnimator.hxx index 9b04f94084b0..1e044b4a647b 100644 --- a/sdext/source/presenter/PresenterPaneAnimator.hxx +++ b/sdext/source/presenter/PresenterPaneAnimator.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -92,3 +93,5 @@ typedef ::std::vector< ::boost::function<void()> > EndActions; } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterPaneBase.cxx b/sdext/source/presenter/PresenterPaneBase.cxx index 840342ad700d..39283673c23d 100644 --- a/sdext/source/presenter/PresenterPaneBase.cxx +++ b/sdext/source/presenter/PresenterPaneBase.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -220,7 +221,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments) if ( ! mxComponentContext.is()) { throw RuntimeException( - OUString::createFromAscii("PresenterSpritePane: missing component context"), + OUString(RTL_CONSTASCII_USTRINGPARAM("PresenterSpritePane: missing component context")), static_cast<XWeak*>(this)); } @@ -232,7 +233,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments) if ( ! (rArguments[0] >>= mxPaneId)) { throw lang::IllegalArgumentException( - OUString::createFromAscii("PresenterPane: invalid pane id"), + OUString(RTL_CONSTASCII_USTRINGPARAM("PresenterPane: invalid pane id")), static_cast<XWeak*>(this), 0); } @@ -240,7 +241,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments) if ( ! (rArguments[1] >>= mxParentWindow)) { throw lang::IllegalArgumentException( - OUString::createFromAscii("PresenterPane: invalid parent window"), + OUString(RTL_CONSTASCII_USTRINGPARAM("PresenterPane: invalid parent window")), static_cast<XWeak*>(this), 1); } @@ -249,7 +250,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments) if ( ! (rArguments[2] >>= xParentCanvas)) { throw lang::IllegalArgumentException( - OUString::createFromAscii("PresenterPane: invalid parent canvas"), + OUString(RTL_CONSTASCII_USTRINGPARAM("PresenterPane: invalid parent canvas")), static_cast<XWeak*>(this), 2); } @@ -257,7 +258,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments) if ( ! (rArguments[3] >>= msTitle)) { throw lang::IllegalArgumentException( - OUString::createFromAscii("PresenterPane: invalid title"), + OUString(RTL_CONSTASCII_USTRINGPARAM("PresenterPane: invalid title")), static_cast<XWeak*>(this), 3); } @@ -265,7 +266,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments) if ( ! (rArguments[4] >>= mxBorderPainter)) { throw lang::IllegalArgumentException( - OUString::createFromAscii("PresenterPane: invalid border painter"), + OUString(RTL_CONSTASCII_USTRINGPARAM("PresenterPane: invalid border painter")), static_cast<XWeak*>(this), 4); } @@ -274,7 +275,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments) if (rArguments.getLength()>5 && ! (rArguments[5] >>= bIsWindowVisibleOnCreation)) { throw lang::IllegalArgumentException( - OUString::createFromAscii("PresenterPane: invalid window visibility flag"), + OUString(RTL_CONSTASCII_USTRINGPARAM("PresenterPane: invalid window visibility flag")), static_cast<XWeak*>(this), 5); } @@ -302,7 +303,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments) else { throw RuntimeException( - OUString::createFromAscii("PresenterSpritePane: invalid number of arguments"), + OUString(RTL_CONSTASCII_USTRINGPARAM("PresenterSpritePane: invalid number of arguments")), static_cast<XWeak*>(this)); } } @@ -556,3 +557,5 @@ void PresenterPaneBase::ThrowIfDisposed (void) } } // end of namespace ::sd::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterPaneBase.hxx b/sdext/source/presenter/PresenterPaneBase.hxx index cbe9b2a41ea6..16ea4e515299 100644 --- a/sdext/source/presenter/PresenterPaneBase.hxx +++ b/sdext/source/presenter/PresenterPaneBase.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -171,3 +172,5 @@ protected: } } // end of namespace ::sd::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterPaneBorderManager.cxx b/sdext/source/presenter/PresenterPaneBorderManager.cxx index 03860d18273d..6150d0ce8914 100644 --- a/sdext/source/presenter/PresenterPaneBorderManager.cxx +++ b/sdext/source/presenter/PresenterPaneBorderManager.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -59,7 +60,7 @@ namespace sdext { namespace presenter { OUString PresenterPaneBorderManager::getImplementationName_static (void) { - return OUString::createFromAscii("com.sun.star.comp.Draw.PresenterPaneBorderManager"); + return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Draw.PresenterPaneBorderManager")); } @@ -68,7 +69,7 @@ OUString PresenterPaneBorderManager::getImplementationName_static (void) Sequence<OUString> PresenterPaneBorderManager::getSupportedServiceNames_static (void) { static const ::rtl::OUString sServiceName( - ::rtl::OUString::createFromAscii("com.sun.star.drawing.PresenterPaneBorderManager")); + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.PresenterPaneBorderManager")); return Sequence<rtl::OUString>(&sServiceName, 1); } @@ -107,13 +108,13 @@ PresenterPaneBorderManager::PresenterPaneBorderManager ( { mxPointer = Reference<awt::XPointer>( xFactory->createInstanceWithContext( - OUString::createFromAscii("com.sun.star.awt.Pointer"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Pointer")), rxContext), UNO_QUERY_THROW); mxPresenterHelper = Reference<drawing::XPresenterHelper>( xFactory->createInstanceWithContext( - OUString::createFromAscii("com.sun.star.comp.Draw.PresenterHelper"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Draw.PresenterHelper")), rxContext), UNO_QUERY_THROW); } @@ -281,7 +282,7 @@ void SAL_CALL PresenterPaneBorderManager::initialize (const Sequence<Any>& rArgu else { throw RuntimeException( - OUString::createFromAscii("PresenterPane: invalid number of arguments"), + OUString(RTL_CONSTASCII_USTRINGPARAM("PresenterPane: invalid number of arguments")), static_cast<XWeak*>(this)); } } @@ -580,3 +581,5 @@ void PresenterPaneBorderManager::ThrowIfDisposed (void) } } // end of namespace ::sd::presenter #endif // ENABLE_PANE_RESIZING + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterPaneBorderManager.hxx b/sdext/source/presenter/PresenterPaneBorderManager.hxx index 73dc6e86bd7c..b9b25f330cfa 100644 --- a/sdext/source/presenter/PresenterPaneBorderManager.hxx +++ b/sdext/source/presenter/PresenterPaneBorderManager.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -172,3 +173,4 @@ private: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterPaneBorderPainter.cxx b/sdext/source/presenter/PresenterPaneBorderPainter.cxx index 9e691954c806..7a27dda1806b 100644 --- a/sdext/source/presenter/PresenterPaneBorderPainter.cxx +++ b/sdext/source/presenter/PresenterPaneBorderPainter.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -476,7 +477,7 @@ PresenterPaneBorderPainter::Renderer::Renderer ( { mxPresenterHelper = Reference<drawing::XPresenterHelper>( xFactory->createInstanceWithContext( - OUString::createFromAscii("com.sun.star.comp.Draw.PresenterHelper"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Draw.PresenterHelper")), rxContext), UNO_QUERY_THROW); } @@ -693,7 +694,7 @@ void PresenterPaneBorderPainter::Renderer::PaintTitle ( RendererPaneStyleContainer::const_iterator iStyle (maRendererPaneStyles.find(rsResourceURL)); if (iStyle == maRendererPaneStyles.end()) { - OUString sPaneStyleName (OUString::createFromAscii("DefaultRendererPaneStyle")); + OUString sPaneStyleName (RTL_CONSTASCII_USTRINGPARAM("DefaultRendererPaneStyle")); // Get pane layout name for resource URL. const OUString sStyleName (mpTheme->GetStyleName(rsResourceURL)); @@ -954,7 +955,7 @@ RendererPaneStyle::RendererPaneStyle ( // Get font description. mpFont = rpTheme->GetFont(rsStyleName); - OUString sAnchor (OUString::createFromAscii("Left")); + OUString sAnchor (RTL_CONSTASCII_USTRINGPARAM("Left")); if (mpFont.get() != NULL) { sAnchor = mpFont->msAnchor; @@ -962,11 +963,11 @@ RendererPaneStyle::RendererPaneStyle ( mnFontYOffset = mpFont->mnYOffset; } - if (sAnchor == OUString::createFromAscii("Left")) + if (sAnchor == OUString(RTL_CONSTASCII_USTRINGPARAM("Left"))) meFontAnchor = AnchorLeft; - else if (sAnchor == OUString::createFromAscii("Right")) + else if (sAnchor == OUString(RTL_CONSTASCII_USTRINGPARAM("Right"))) meFontAnchor = AnchorRight; - else if (sAnchor == OUString::createFromAscii("Center")) + else if (sAnchor == OUString(RTL_CONSTASCII_USTRINGPARAM("Center"))) meFontAnchor = AnchorCenter; else meFontAnchor = AnchorCenter; @@ -1099,3 +1100,5 @@ SharedBitmapDescriptor RendererPaneStyle::GetBitmap( } } // end of namespace ::sd::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterPaneBorderPainter.hxx b/sdext/source/presenter/PresenterPaneBorderPainter.hxx index 7affd4d3e46c..0084d567e478 100644 --- a/sdext/source/presenter/PresenterPaneBorderPainter.hxx +++ b/sdext/source/presenter/PresenterPaneBorderPainter.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -161,3 +162,5 @@ private: } } // end of namespace ::sd::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterPaneContainer.cxx b/sdext/source/presenter/PresenterPaneContainer.cxx index 0b1a5d0eaeac..feb7ecb6bd02 100644 --- a/sdext/source/presenter/PresenterPaneContainer.cxx +++ b/sdext/source/presenter/PresenterPaneContainer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -54,7 +55,7 @@ PresenterPaneContainer::PresenterPaneContainer ( { mxPresenterHelper = Reference<drawing::XPresenterHelper>( xFactory->createInstanceWithContext( - OUString::createFromAscii("com.sun.star.comp.Draw.PresenterHelper"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Draw.PresenterHelper")), rxContext), UNO_QUERY_THROW); } @@ -445,3 +446,5 @@ void PresenterPaneContainer::PaneDescriptor::SetActivationState (const bool bIsA } } } // end of namespace ::sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterPaneContainer.hxx b/sdext/source/presenter/PresenterPaneContainer.hxx index bce80465fe3e..3c837ffc8a9b 100644 --- a/sdext/source/presenter/PresenterPaneContainer.hxx +++ b/sdext/source/presenter/PresenterPaneContainer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -195,3 +196,5 @@ private: } } // end of namespace ::sdext::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterPaneFactory.cxx b/sdext/source/presenter/PresenterPaneFactory.cxx index f53878f8cc47..5d8b307398ef 100644 --- a/sdext/source/presenter/PresenterPaneFactory.cxx +++ b/sdext/source/presenter/PresenterPaneFactory.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -52,20 +53,20 @@ using ::rtl::OUString; namespace sdext { namespace presenter { const ::rtl::OUString PresenterPaneFactory::msCurrentSlidePreviewPaneURL( - OUString::createFromAscii("private:resource/pane/Presenter/Pane1")); + RTL_CONSTASCII_USTRINGPARAM("private:resource/pane/Presenter/Pane1")); const ::rtl::OUString PresenterPaneFactory::msNextSlidePreviewPaneURL( - OUString::createFromAscii("private:resource/pane/Presenter/Pane2")); + RTL_CONSTASCII_USTRINGPARAM("private:resource/pane/Presenter/Pane2")); const ::rtl::OUString PresenterPaneFactory::msNotesPaneURL( - OUString::createFromAscii("private:resource/pane/Presenter/Pane3")); + RTL_CONSTASCII_USTRINGPARAM("private:resource/pane/Presenter/Pane3")); const ::rtl::OUString PresenterPaneFactory::msToolBarPaneURL( - OUString::createFromAscii("private:resource/pane/Presenter/Pane4")); + RTL_CONSTASCII_USTRINGPARAM("private:resource/pane/Presenter/Pane4")); const ::rtl::OUString PresenterPaneFactory::msSlideSorterPaneURL( - OUString::createFromAscii("private:resource/pane/Presenter/Pane5")); + RTL_CONSTASCII_USTRINGPARAM("private:resource/pane/Presenter/Pane5")); const ::rtl::OUString PresenterPaneFactory::msHelpPaneURL( - OUString::createFromAscii("private:resource/pane/Presenter/Pane6")); + RTL_CONSTASCII_USTRINGPARAM("private:resource/pane/Presenter/Pane6")); const ::rtl::OUString PresenterPaneFactory::msOverlayPaneURL( - OUString::createFromAscii("private:resource/pane/Presenter/Overlay")); + RTL_CONSTASCII_USTRINGPARAM("private:resource/pane/Presenter/Overlay")); @@ -116,7 +117,7 @@ void PresenterPaneFactory::Register (const Reference<frame::XController>& rxCont else { xCC->addResourceFactory( - OUString::createFromAscii("private:resource/pane/Presenter/*"), + OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/pane/Presenter/*")), this); } } @@ -376,3 +377,5 @@ void PresenterPaneFactory::ThrowIfDisposed (void) const } } // end of namespace sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterPaneFactory.hxx b/sdext/source/presenter/PresenterPaneFactory.hxx index 78ea3e4fc609..136d47ec645b 100644 --- a/sdext/source/presenter/PresenterPaneFactory.hxx +++ b/sdext/source/presenter/PresenterPaneFactory.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -137,3 +138,5 @@ private: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterProtocolHandler.cxx b/sdext/source/presenter/PresenterProtocolHandler.cxx index 3f9c44c8f433..7c4829ac81fd 100644 --- a/sdext/source/presenter/PresenterProtocolHandler.cxx +++ b/sdext/source/presenter/PresenterProtocolHandler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -999,3 +1000,5 @@ Any NotesFontSizeCommand::GetState (void) const } } // end of namespace ::sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterProtocolHandler.hxx b/sdext/source/presenter/PresenterProtocolHandler.hxx index cb005acb84e5..2c7918e735f8 100644 --- a/sdext/source/presenter/PresenterProtocolHandler.hxx +++ b/sdext/source/presenter/PresenterProtocolHandler.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,7 +35,7 @@ #include <com/sun/star/frame/XDispatch.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/uno/XComponentContext.hpp> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <rtl/ref.hxx> #include <boost/scoped_ptr.hpp> @@ -101,3 +102,5 @@ private: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx index 22a1b2fe623f..e39e168876c6 100644 --- a/sdext/source/presenter/PresenterScreen.cxx +++ b/sdext/source/presenter/PresenterScreen.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -172,7 +173,7 @@ Any SAL_CALL PresenterScreenJob::execute( const beans::NamedValue* p = Arguments.getConstArray(); for (i=0; i<c; ++i) { - if (p[i].Name.equalsAscii("Environment")) + if (p[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Environment"))) { p[i].Value >>= lEnv; break; @@ -184,7 +185,7 @@ Any SAL_CALL PresenterScreenJob::execute( p = lEnv.getConstArray(); for (i=0; i<c; ++i) { - if (p[i].Name.equalsAscii("Model")) + if (p[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Model"))) { p[i].Value >>= xModel; break; @@ -538,11 +539,11 @@ sal_Int32 PresenterScreen::GetScreenNumber ( // is set. PresenterConfigurationAccess aConfiguration ( xContext, - OUString::createFromAscii("/org.openoffice.Office.extension.PresenterScreen/"), + OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.extension.PresenterScreen/")), PresenterConfigurationAccess::READ_ONLY); bool bStartAlways (false); if (aConfiguration.GetConfigurationNode( - OUString::createFromAscii("Presenter/StartAlways")) >>= bStartAlways) + OUString(RTL_CONSTASCII_USTRINGPARAM("Presenter/StartAlways"))) >>= bStartAlways) { if (bStartAlways) return nScreenNumber; @@ -701,13 +702,13 @@ void PresenterScreen::SetupConfiguration ( { PresenterConfigurationAccess aConfiguration ( rxContext, - OUString::createFromAscii("org.openoffice.Office.extension.PresenterScreen"), + OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.extension.PresenterScreen")), PresenterConfigurationAccess::READ_ONLY); maViewDescriptors.clear(); ProcessViewDescriptions(aConfiguration); - OUString sLayoutName (OUString::createFromAscii("DefaultLayout")); + OUString sLayoutName (RTL_CONSTASCII_USTRINGPARAM("DefaultLayout")); aConfiguration.GetConfigurationNode( - OUString::createFromAscii("Presenter/CurrentLayout")) >>= sLayoutName; + OUString(RTL_CONSTASCII_USTRINGPARAM("Presenter/CurrentLayout"))) >>= sLayoutName; ProcessLayout(aConfiguration, sLayoutName, rxContext, rxAnchorId); } catch (RuntimeException&) @@ -728,14 +729,14 @@ void PresenterScreen::ProcessLayout ( { Reference<container::XHierarchicalNameAccess> xLayoutNode ( rConfiguration.GetConfigurationNode( - OUString::createFromAscii("Presenter/Layouts/")+rsLayoutName), + OUString(RTL_CONSTASCII_USTRINGPARAM("Presenter/Layouts/"))+rsLayoutName), UNO_QUERY_THROW); // Read the parent layout first, if one is referenced. OUString sParentLayout; rConfiguration.GetConfigurationNode( xLayoutNode, - OUString::createFromAscii("ParentLayout")) >>= sParentLayout; + OUString(RTL_CONSTASCII_USTRINGPARAM("ParentLayout"))) >>= sParentLayout; if (sParentLayout.getLength() > 0) { // Prevent infinite recursion. @@ -747,16 +748,16 @@ void PresenterScreen::ProcessLayout ( Reference<container::XNameAccess> xList ( rConfiguration.GetConfigurationNode( xLayoutNode, - OUString::createFromAscii("Layout")), + OUString(RTL_CONSTASCII_USTRINGPARAM("Layout"))), UNO_QUERY_THROW); ::std::vector<rtl::OUString> aProperties (6); - aProperties[0] = OUString::createFromAscii("PaneURL"); - aProperties[1] = OUString::createFromAscii("ViewURL"); - aProperties[2] = OUString::createFromAscii("RelativeX"); - aProperties[3] = OUString::createFromAscii("RelativeY"); - aProperties[4] = OUString::createFromAscii("RelativeWidth"); - aProperties[5] = OUString::createFromAscii("RelativeHeight"); + aProperties[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("PaneURL")); + aProperties[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("ViewURL")); + aProperties[2] = OUString(RTL_CONSTASCII_USTRINGPARAM("RelativeX")); + aProperties[3] = OUString(RTL_CONSTASCII_USTRINGPARAM("RelativeY")); + aProperties[4] = OUString(RTL_CONSTASCII_USTRINGPARAM("RelativeWidth")); + aProperties[5] = OUString(RTL_CONSTASCII_USTRINGPARAM("RelativeHeight")); mnComponentIndex = 1; PresenterConfigurationAccess::ForAll( xList, @@ -785,10 +786,10 @@ void PresenterScreen::ProcessViewDescriptions ( UNO_QUERY_THROW); ::std::vector<rtl::OUString> aProperties (4); - aProperties[0] = OUString::createFromAscii("ViewURL"); - aProperties[1] = OUString::createFromAscii("Title"); - aProperties[2] = OUString::createFromAscii("AccessibleTitle"); - aProperties[3] = OUString::createFromAscii("IsOpaque"); + aProperties[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("ViewURL")); + aProperties[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); + aProperties[2] = OUString(RTL_CONSTASCII_USTRINGPARAM("AccessibleTitle")); + aProperties[3] = OUString(RTL_CONSTASCII_USTRINGPARAM("IsOpaque")); mnComponentIndex = 1; PresenterConfigurationAccess::ForAll( xViewDescriptionsNode, @@ -925,3 +926,5 @@ void PresenterScreen::SetupView( } } // end of namespace ::sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterScreen.hxx b/sdext/source/presenter/PresenterScreen.hxx index 191542f7503c..7096c9f72fe6 100644 --- a/sdext/source/presenter/PresenterScreen.hxx +++ b/sdext/source/presenter/PresenterScreen.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -245,3 +246,5 @@ private: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterScrollBar.cxx b/sdext/source/presenter/PresenterScrollBar.cxx index 21b06c392715..7b78acaed7aa 100644 --- a/sdext/source/presenter/PresenterScrollBar.cxx +++ b/sdext/source/presenter/PresenterScrollBar.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -128,7 +129,7 @@ PresenterScrollBar::PresenterScrollBar ( mxPresenterHelper = Reference<drawing::XPresenterHelper>( xFactory->createInstanceWithContext( - OUString::createFromAscii("com.sun.star.comp.Draw.PresenterHelper"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Draw.PresenterHelper")), rxComponentContext), UNO_QUERY_THROW); @@ -330,7 +331,7 @@ void PresenterScrollBar::SetCanvas (const Reference<css::rendering::XCanvas>& rx try { mpBitmaps.reset(new PresenterBitmapContainer( - OUString::createFromAscii("PresenterScreenSettings/ScrollBar/Bitmaps"), + OUString(RTL_CONSTASCII_USTRINGPARAM("PresenterScreenSettings/ScrollBar/Bitmaps")), ::boost::shared_ptr<PresenterBitmapContainer>(), mxComponentContext, mxCanvas, @@ -1343,3 +1344,5 @@ void PresenterScrollBar::MousePressRepeater::Execute (void) } } // end of namespace ::sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterScrollBar.hxx b/sdext/source/presenter/PresenterScrollBar.hxx index 4f197b347017..bd2462387078 100644 --- a/sdext/source/presenter/PresenterScrollBar.hxx +++ b/sdext/source/presenter/PresenterScrollBar.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -335,3 +336,5 @@ private: } } // end of namespace ::sdext::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterSlidePreview.cxx b/sdext/source/presenter/PresenterSlidePreview.cxx index 1187f14cf5ee..ce5c23a82829 100644 --- a/sdext/source/presenter/PresenterSlidePreview.cxx +++ b/sdext/source/presenter/PresenterSlidePreview.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -78,8 +79,8 @@ PresenterSlidePreview::PresenterSlidePreview ( || ! rpPresenterController.is()) { throw RuntimeException( - OUString::createFromAscii( - "PresenterSlidePreview can not be constructed due to empty argument"), + OUString(RTL_CONSTASCII_USTRINGPARAM( + "PresenterSlidePreview can not be constructed due to empty argument")), static_cast<XWeak*>(this)); } @@ -105,7 +106,7 @@ PresenterSlidePreview::PresenterSlidePreview ( if (xFactory.is()) mxPreviewRenderer = Reference<drawing::XSlideRenderer>( xFactory->createInstanceWithContext( - OUString::createFromAscii("com.sun.star.drawing.SlideRenderer"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.SlideRenderer")), rxContext), UNO_QUERY); @@ -277,9 +278,9 @@ void PresenterSlidePreview::SetSlide (const Reference<drawing::XDrawPage>& rxPag try { xPropertySet->getPropertyValue( - OUString::createFromAscii("Width")) >>= aSlideSize.Width; + OUString(RTL_CONSTASCII_USTRINGPARAM("Width"))) >>= aSlideSize.Width; xPropertySet->getPropertyValue( - OUString::createFromAscii("Height")) >>= aSlideSize.Height; + OUString(RTL_CONSTASCII_USTRINGPARAM("Height"))) >>= aSlideSize.Height; } catch (beans::UnknownPropertyException&) { @@ -425,3 +426,4 @@ void PresenterSlidePreview::ThrowIfDisposed (void) } } // end of namespace ::sd::presenter +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterSlidePreview.hxx b/sdext/source/presenter/PresenterSlidePreview.hxx index a88f4f3de2c8..57b9f9794b95 100644 --- a/sdext/source/presenter/PresenterSlidePreview.hxx +++ b/sdext/source/presenter/PresenterSlidePreview.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -171,3 +172,5 @@ private: } } // end of namespace ::sd::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterSlideShowView.cxx b/sdext/source/presenter/PresenterSlideShowView.cxx index cc4ef895888d..312b07f5fda8 100644 --- a/sdext/source/presenter/PresenterSlideShowView.cxx +++ b/sdext/source/presenter/PresenterSlideShowView.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -115,7 +116,7 @@ void PresenterSlideShowView::LateInit (void) Reference<lang::XMultiComponentFactory> xFactory ( mxComponentContext->getServiceManager(), UNO_QUERY_THROW); mxPresenterHelper.set (xFactory->createInstanceWithContext( - OUString::createFromAscii("com.sun.star.comp.Draw.PresenterHelper"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Draw.PresenterHelper")), mxComponentContext), UNO_QUERY_THROW); @@ -544,7 +545,7 @@ void SAL_CALL PresenterSlideShowView::setMouseCursor(::sal_Int16 nPointerShape) mxComponentContext, UNO_QUERY); if (xFactory.is()) mxPointer = Reference<awt::XPointer>( - xFactory->createInstance(OUString::createFromAscii("com.sun.star.awt.Pointer")), + xFactory->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Pointer"))), UNO_QUERY); } @@ -972,7 +973,7 @@ Reference<awt::XWindow> PresenterSlideShowView::CreateViewWindow ( Reference<awt::XToolkit> xToolkit ( xFactory->createInstanceWithContext( - OUString::createFromAscii("com.sun.star.awt.Toolkit"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Toolkit")), mxComponentContext), UNO_QUERY_THROW); awt::WindowDescriptor aWindowDescriptor ( @@ -1147,10 +1148,12 @@ void PresenterSlideShowView::ThrowIfDisposed (void) if (rBHelper.bDisposed || rBHelper.bInDispose) { throw lang::DisposedException ( - OUString::createFromAscii("PresenterSlideShowView object has already been disposed"), + OUString(RTL_CONSTASCII_USTRINGPARAM("PresenterSlideShowView object has already been disposed")), static_cast<uno::XWeak*>(this)); } } } } // end of namespace ::sd::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterSlideShowView.hxx b/sdext/source/presenter/PresenterSlideShowView.hxx index 4ce6212c0ff0..bb91fb5e136c 100644 --- a/sdext/source/presenter/PresenterSlideShowView.hxx +++ b/sdext/source/presenter/PresenterSlideShowView.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -295,3 +296,5 @@ private: } } // end of namespace ::sd::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterSlideSorter.cxx b/sdext/source/presenter/PresenterSlideSorter.cxx index 2b096d849cf6..3fe9051949c1 100644 --- a/sdext/source/presenter/PresenterSlideSorter.cxx +++ b/sdext/source/presenter/PresenterSlideSorter.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -374,7 +375,7 @@ PresenterSlideSorter::PresenterSlideSorter ( // Create the preview cache. mxPreviewCache = Reference<drawing::XSlidePreviewCache>( xFactory->createInstanceWithContext( - OUString::createFromAscii("com.sun.star.drawing.PresenterPreviewCache"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.PresenterPreviewCache")), mxComponentContext), UNO_QUERY_THROW); Reference<container::XIndexAccess> xSlides (mxSlideShowController, UNO_QUERY); @@ -395,7 +396,7 @@ PresenterSlideSorter::PresenterSlideSorter ( // Listen for changes of the current slide. Reference<beans::XPropertySet> xControllerProperties (rxController, UNO_QUERY_THROW); xControllerProperties->addPropertyChangeListener( - OUString::createFromAscii("CurrentPage"), + OUString(RTL_CONSTASCII_USTRINGPARAM("CurrentPage")), this); // Move the current slide in the center of the window. @@ -982,8 +983,8 @@ double PresenterSlideSorter::GetSlideAspectRatio (void) const Reference<beans::XPropertySet> xProperties(xSlides->getByIndex(0),UNO_QUERY_THROW); sal_Int32 nWidth (28000); sal_Int32 nHeight (21000); - if ((xProperties->getPropertyValue(OUString::createFromAscii("Width")) >>= nWidth) - && (xProperties->getPropertyValue(OUString::createFromAscii("Height")) >>= nHeight) + if ((xProperties->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Width"))) >>= nWidth) + && (xProperties->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Height"))) >>= nHeight) && nHeight > 0) { nSlideAspectRatio = double(nWidth) / double(nHeight); @@ -2065,7 +2066,7 @@ PresenterSlideSorter::CurrentSlideFrameRenderer::CurrentSlideFrameRenderer ( { PresenterConfigurationAccess aConfiguration ( rxContext, - OUString::createFromAscii("/org.openoffice.Office.extension.PresenterScreen/"), + OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.extension.PresenterScreen/")), PresenterConfigurationAccess::READ_ONLY); Reference<container::XHierarchicalNameAccess> xBitmaps ( aConfiguration.GetConfigurationNode( @@ -2319,3 +2320,5 @@ void PresenterSlideSorter::CurrentSlideFrameRenderer::PaintBitmapTiled( } } } // end of namespace ::sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterSlideSorter.hxx b/sdext/source/presenter/PresenterSlideSorter.hxx index 15208b9160a5..e3e6ebe8c031 100644 --- a/sdext/source/presenter/PresenterSlideSorter.hxx +++ b/sdext/source/presenter/PresenterSlideSorter.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -231,3 +232,5 @@ private: } } // end of namespace ::sdext::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterSprite.cxx b/sdext/source/presenter/PresenterSprite.cxx index 04513b9332d4..467fb5830dd5 100644 --- a/sdext/source/presenter/PresenterSprite.cxx +++ b/sdext/source/presenter/PresenterSprite.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -287,3 +288,5 @@ void PresenterSprite::DisposeSprite (void) } } //end of namespace sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterSprite.hxx b/sdext/source/presenter/PresenterSprite.hxx index 19f8de4d5984..e6be8e46ebad 100644 --- a/sdext/source/presenter/PresenterSprite.hxx +++ b/sdext/source/presenter/PresenterSprite.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -97,3 +98,5 @@ private: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterSpritePane.cxx b/sdext/source/presenter/PresenterSpritePane.cxx index 07807eef8e2f..ae4866f58879 100644 --- a/sdext/source/presenter/PresenterSpritePane.cxx +++ b/sdext/source/presenter/PresenterSpritePane.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -54,7 +55,7 @@ PresenterSpritePane::PresenterSpritePane (const Reference<XComponentContext>& rx mxComponentContext->getServiceManager(), UNO_QUERY_THROW); mxPresenterHelper = Reference<drawing::XPresenterHelper>( xFactory->createInstanceWithContext( - OUString::createFromAscii("com.sun.star.comp.Draw.PresenterHelper"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Draw.PresenterHelper")), mxComponentContext), UNO_QUERY_THROW); } @@ -258,3 +259,5 @@ void PresenterSpritePane::CreateCanvases ( } } // end of namespace ::sd::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterSpritePane.hxx b/sdext/source/presenter/PresenterSpritePane.hxx index b90f5c5a26a7..468f531f5e87 100644 --- a/sdext/source/presenter/PresenterSpritePane.hxx +++ b/sdext/source/presenter/PresenterSpritePane.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -124,3 +125,5 @@ private: } } // end of namespace ::sd::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx index b0cc9f4cc9c9..1fe02450cf9b 100755..100644 --- a/sdext/source/presenter/PresenterTextView.cxx +++ b/sdext/source/presenter/PresenterTextView.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -915,12 +916,8 @@ void PresenterTextParagraph::AddWord ( const PresenterTheme::SharedFontDescriptor& rpFont) { sal_Int32 nLineStart (0); - sal_Int32 nLineEnd (0); if ( ! maLines.empty()) - { nLineStart = rCurrentLine.startPos; - nLineEnd = rCurrentLine.endPos; - } const ::rtl::OUString sLineCandidate ( msParagraphText.copy(nLineStart, nWordBoundary-nLineStart)); @@ -1185,14 +1182,12 @@ awt::Rectangle PresenterTextParagraph::GetCharacterBounds ( { // Find the line that contains the requested character and accumulate // the previous line heights. - sal_Int32 nFirstCharacterIndex (0); - sal_Int32 nEndCharacterIndex (0); double nX (mnXOrigin); double nY (mnYOrigin + mnVerticalOffset + mnAscent); const sal_Int8 nTextDirection (GetTextDirection()); for (sal_Int32 nLineIndex=0,nLineCount=maLines.size(); nLineIndex<nLineCount; - ++nLineIndex, nFirstCharacterIndex=nEndCharacterIndex, nY+=mnLineHeight) + ++nLineIndex, nY+=mnLineHeight) { Line& rLine (maLines[nLineIndex]); // Skip lines before the indexed character. @@ -1595,3 +1590,5 @@ bool PresenterTextParagraph::Line::IsEmpty (void) const } } // end of namespace ::sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterTextView.hxx b/sdext/source/presenter/PresenterTextView.hxx index 048eec9c3c0f..d8bf260443c1 100755..100644 --- a/sdext/source/presenter/PresenterTextView.hxx +++ b/sdext/source/presenter/PresenterTextView.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -317,3 +318,5 @@ private: } } // end of namespace ::sdext::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterTheme.cxx b/sdext/source/presenter/PresenterTheme.cxx index c9a14bf4a48b..6688f7e8b679 100644 --- a/sdext/source/presenter/PresenterTheme.cxx +++ b/sdext/source/presenter/PresenterTheme.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -340,7 +341,7 @@ void SAL_CALL PresenterTheme::disposing (void) PresenterConfigurationAccess aConfiguration ( mxContext, - OUString::createFromAscii("/org.openoffice.Office.extension.PresenterScreen/"), + OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.extension.PresenterScreen/")), PresenterConfigurationAccess::READ_ONLY); return aReadContext.ReadTheme(aConfiguration, msThemeName); @@ -450,7 +451,7 @@ bool PresenterTheme::ConvertToColor ( ::boost::shared_ptr<PresenterConfigurationAccess> pConfiguration ( new PresenterConfigurationAccess( mxContext, - OUString::createFromAscii("/org.openoffice.Office.extension.PresenterScreen/"), + OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.extension.PresenterScreen/")), PresenterConfigurationAccess::READ_WRITE)); // Get configuration node for the view style container of the current @@ -602,7 +603,7 @@ PresenterTheme::FontDescriptor::FontDescriptor (void) msStyleName(), mnSize(12), mnColor(0x00000000), - msAnchor(OUString::createFromAscii("Left")), + msAnchor(OUString(RTL_CONSTASCII_USTRINGPARAM("Left"))), mnXOffset(0), mnYOffset(0) { @@ -617,7 +618,7 @@ PresenterTheme::FontDescriptor::FontDescriptor ( msStyleName(), mnSize(12), mnColor(0x00000000), - msAnchor(OUString::createFromAscii("Left")), + msAnchor(OUString(RTL_CONSTASCII_USTRINGPARAM("Left"))), mnXOffset(0), mnYOffset(0) { @@ -868,7 +869,7 @@ ReadContext::ReadContext ( { mxPresenterHelper = Reference<drawing::XPresenterHelper>( xFactory->createInstanceWithContext( - OUString::createFromAscii("com.sun.star.comp.Draw.PresenterHelper"), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Draw.PresenterHelper")), rxContext), UNO_QUERY_THROW); } @@ -1412,3 +1413,5 @@ void StyleAssociationContainer::ProcessStyleAssociation( } // end of anonymous namespace } } // end of namespace ::sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterTheme.hxx b/sdext/source/presenter/PresenterTheme.hxx index 99cfa3803d96..e76cabcf28d0 100644 --- a/sdext/source/presenter/PresenterTheme.hxx +++ b/sdext/source/presenter/PresenterTheme.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -155,3 +156,5 @@ private: } } // end of namespace ::sd::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterTimer.cxx b/sdext/source/presenter/PresenterTimer.cxx index 84a5323eff34..f4a5618353c9 100644 --- a/sdext/source/presenter/PresenterTimer.cxx +++ b/sdext/source/presenter/PresenterTimer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -67,7 +68,7 @@ typedef ::boost::shared_ptr<TimerTask> SharedTimerTask; class TimerTaskComparator { public: - bool operator() (const SharedTimerTask& rpTask1, const SharedTimerTask& rpTask2) + bool operator() (const SharedTimerTask& rpTask1, const SharedTimerTask& rpTask2) const { return rpTask1->maDueTime.Seconds < rpTask2->maDueTime.Seconds || (rpTask1->maDueTime.Seconds == rpTask2->maDueTime.Seconds @@ -676,3 +677,5 @@ void SAL_CALL PresenterClockTimer::notify (const css::uno::Any& rUserData) } } // end of namespace ::sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterTimer.hxx b/sdext/source/presenter/PresenterTimer.hxx index 690f4b49108e..19d9e0637258 100644 --- a/sdext/source/presenter/PresenterTimer.hxx +++ b/sdext/source/presenter/PresenterTimer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -141,3 +142,5 @@ private: } } // end of namespace ::sdext::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterToolBar.cxx b/sdext/source/presenter/PresenterToolBar.cxx index fc6ddbd86f05..1eb04a8e4171 100644 --- a/sdext/source/presenter/PresenterToolBar.cxx +++ b/sdext/source/presenter/PresenterToolBar.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -777,7 +778,7 @@ void PresenterToolBar::CreateControls ( // Expand the macro in the bitmap file names. PresenterConfigurationAccess aConfiguration ( mxComponentContext, - OUString::createFromAscii("/org.openoffice.Office.extension.PresenterScreen/"), + OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.extension.PresenterScreen/")), PresenterConfigurationAccess::READ_ONLY); const OUString sBasePath (PresenterComponent::GetBasePath(mxComponentContext)); @@ -839,19 +840,19 @@ void PresenterToolBar::ProcessEntry ( // Create new element. ::rtl::Reference<Element> pElement; - if (sType.equalsAscii("Button")) + if (sType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Button"))) pElement = Button::Create(this); - else if (sType.equalsAscii("CurrentTimeLabel")) + else if (sType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CurrentTimeLabel"))) pElement = CurrentTimeLabel::Create(this); - else if (sType.equalsAscii("PresentationTimeLabel")) + else if (sType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PresentationTimeLabel"))) pElement = PresentationTimeLabel::Create(this); - else if (sType.equalsAscii("VerticalSeparator")) + else if (sType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("VerticalSeparator"))) pElement = ::rtl::Reference<Element>(new VerticalSeparator(this)); - else if (sType.equalsAscii("HorizontalSeparator")) + else if (sType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HorizontalSeparator"))) pElement = ::rtl::Reference<Element>(new HorizontalSeparator(this)); - else if (sType.equalsAscii("Label")) + else if (sType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Label"))) pElement = ::rtl::Reference<Element>(new Label(this)); - else if (sType.equalsAscii("ChangeOrientation")) + else if (sType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ChangeOrientation"))) { mpCurrentContainerPart.reset(new ElementContainerPart()); maElementContainer.push_back(mpCurrentContainerPart); @@ -2091,7 +2092,7 @@ void ProgressLabel::CurrentSlideHasChanged (void) if (nCurrentSlideIndex >= 0 && nSlideCount > 0) SetText( OUString::valueOf(nCurrentSlideIndex) - + OUString::createFromAscii(" / ") + + OUString(RTL_CONSTASCII_USTRINGPARAM(" / ")) + OUString::valueOf(nSlideCount)); else SetText(A2S("")); @@ -2456,3 +2457,5 @@ bool HorizontalSeparator::IsFilling (void) const } } // end of namespace ::sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterToolBar.hxx b/sdext/source/presenter/PresenterToolBar.hxx index bb8b83f7dec3..d4dbf2ac1048 100644 --- a/sdext/source/presenter/PresenterToolBar.hxx +++ b/sdext/source/presenter/PresenterToolBar.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -313,3 +314,5 @@ private: } } // end of namespace ::sdext::presenter #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterUIPainter.cxx b/sdext/source/presenter/PresenterUIPainter.cxx index deeda371ac79..d5a5066989d8 100644 --- a/sdext/source/presenter/PresenterUIPainter.cxx +++ b/sdext/source/presenter/PresenterUIPainter.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -254,3 +255,5 @@ void PresenterUIPainter::PaintVerticalBitmapComposite ( } } // end of namespace sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterUIPainter.hxx b/sdext/source/presenter/PresenterUIPainter.hxx index ea4de820649a..52cdd5d2f4ea 100644 --- a/sdext/source/presenter/PresenterUIPainter.hxx +++ b/sdext/source/presenter/PresenterUIPainter.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -68,3 +69,5 @@ public: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterViewFactory.cxx b/sdext/source/presenter/PresenterViewFactory.cxx index 31c9b5453211..2a33a4230254 100644 --- a/sdext/source/presenter/PresenterViewFactory.cxx +++ b/sdext/source/presenter/PresenterViewFactory.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -651,3 +652,5 @@ void CachablePresenterView::ReleaseView (void) } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterViewFactory.hxx b/sdext/source/presenter/PresenterViewFactory.hxx index 5640d612e498..5fab682dae8a 100644 --- a/sdext/source/presenter/PresenterViewFactory.hxx +++ b/sdext/source/presenter/PresenterViewFactory.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -184,3 +185,5 @@ private: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterWindowManager.cxx b/sdext/source/presenter/PresenterWindowManager.cxx index 15d0ee8a7fc1..466e3fe9ca25 100644 --- a/sdext/source/presenter/PresenterWindowManager.cxx +++ b/sdext/source/presenter/PresenterWindowManager.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -452,7 +453,7 @@ void SAL_CALL PresenterWindowManager::windowPaint (const awt::PaintEvent& rEvent } catch (RuntimeException&) { - OSL_ASSERT(sal_False); + OSL_FAIL("paint failed!"); } } } @@ -600,7 +601,7 @@ bool PresenterWindowManager::PaintChildren (const awt::PaintEvent& rEvent) const } catch (RuntimeException&) { - OSL_ASSERT(sal_False); + OSL_FAIL("paint children failed!"); } } @@ -753,7 +754,7 @@ void PresenterWindowManager::RestoreViewMode (void) sal_Int32 nMode (0); PresenterConfigurationAccess aConfiguration ( mxComponentContext, - OUString::createFromAscii("/org.openoffice.Office.extension.PresenterScreen/"), + OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.extension.PresenterScreen/")), PresenterConfigurationAccess::READ_ONLY); aConfiguration.GetConfigurationNode(A2S("Presenter/InitialViewMode")) >>= nMode; switch (nMode) @@ -782,7 +783,7 @@ void PresenterWindowManager::StoreViewMode (const ViewMode eViewMode) { PresenterConfigurationAccess aConfiguration ( mxComponentContext, - OUString::createFromAscii("/org.openoffice.Office.extension.PresenterScreen/"), + OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.extension.PresenterScreen/")), PresenterConfigurationAccess::READ_WRITE); aConfiguration.GoToChild(A2S("Presenter")); Any aValue; @@ -1639,3 +1640,5 @@ void SAL_CALL ModeChangeAnimationStarter::disposing ( } } // end of namespace ::sdext::presenter + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/PresenterWindowManager.hxx b/sdext/source/presenter/PresenterWindowManager.hxx index e6428b6de464..997565bf0a8c 100644 --- a/sdext/source/presenter/PresenterWindowManager.hxx +++ b/sdext/source/presenter/PresenterWindowManager.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -257,3 +258,5 @@ private: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sdext/source/presenter/description.xml b/sdext/source/presenter/description.xml index 19fefec6de8a..85393f76e9ff 100644 --- a/sdext/source/presenter/description.xml +++ b/sdext/source/presenter/description.xml @@ -11,12 +11,6 @@ <OpenOffice.org-minimal-version value="3.3" dep:name="OpenOffice.org 3.3"/> </dependencies> - <registration> - <simple-license accept-by="admin" default-license-id="lic-en-US" suppress-if-required="true" > - <license-text xlink:href="licensefile" lang="isocode" license-id="lic-isocode"/> - </simple-license> - </registration> - <version value="1.1.0" /> <platform value="UPDATED_PLATFORM" /> @@ -31,7 +25,6 @@ <icon> <default xlink:href="bitmaps/extension_32.png" /> - <high-contrast xlink:href="bitmaps/extension_32_h.png" /> </icon> </description> diff --git a/sdext/source/presenter/makefile.mk b/sdext/source/presenter/makefile.mk index e751a6e500ff..3c93866a731b 100644 --- a/sdext/source/presenter/makefile.mk +++ b/sdext/source/presenter/makefile.mk @@ -33,7 +33,7 @@ EXTNAME=PresenterScreen ENABLE_EXCEPTIONS=TRUE # survive zip dependencies -MAXLINELENGTH:=80000 +MAXLINELENGTH:=100000 # --- Settings ---------------------------------- @@ -42,14 +42,14 @@ MAXLINELENGTH:=80000 PACKAGE=com.sun.PresenterScreen-$(PLATFORMID) -.IF "$(L10N_framework)"=="" -.INCLUDE : $(PRJ)$/util$/makefile.pmk - .IF "$(ENABLE_PRESENTER_SCREEN)" == "NO" @all: @echo "Presenter Screen build disabled." .ELSE +.IF "$(L10N_framework)"=="" +.INCLUDE : $(PRJ)$/util$/makefile.pmk + DLLPRE= common_build_zip= @@ -126,12 +126,6 @@ ZIP1LIST= * DESCRIPTION:=$(ZIP1DIR)$/description.xml -.IF "$(GUI)" == "WIN" || "$(GUI)" == "WNT" -PACKLICS:=$(foreach,i,$(alllangiso) $(ZIP1DIR)$/registry$/license_$i) -.ELSE -PACKLICS:=$(foreach,i,$(alllangiso) $(ZIP1DIR)$/registry$/LICENSE_$i) -.ENDIF - .IF "$(WITH_LANG)"=="" FIND_XCU=registry/data .ELSE # "$(WITH_LANG)"=="" @@ -144,9 +138,6 @@ COMPONENT_FILES= \ $(ZIP1DIR)$/registry$/schema/org$/openoffice$/Office$/extension$/PresenterScreen.xcs \ $(ZIP1DIR)$/registry$/data/$/org$/openoffice$/Office$/extension$/PresenterScreen.xcu -#COMPONENT_MERGED_XCU= \ -# $(FIND_XCU)$/org$/openoffice$/Office$/extension$/PresenterScreen.xcu - COMPONENT_BITMAPS= \ $(ZIP1DIR)$/bitmaps$/BorderTop.png \ $(ZIP1DIR)$/bitmaps$/BorderTopLeft.png \ @@ -245,8 +236,7 @@ COMPONENT_BITMAPS= \ $(ZIP1DIR)$/bitmaps$/LabelMouseOverRight.png COMPONENT_IMAGES=\ - $(ZIP1DIR)$/bitmaps$/extension_32.png \ - $(ZIP1DIR)$/bitmaps$/extension_32_h.png + $(ZIP1DIR)$/bitmaps$/extension_32.png COMPONENT_MANIFEST= \ $(ZIP1DIR)$/META-INF$/manifest.xml @@ -261,7 +251,6 @@ COMPONENT_HELP= \ $(foreach,l,$(alllangiso) $(ZIP1DIR)$/help$/$l$/com.sun.PresenterScreen-$(PLATFORMID)$/presenter.xhp) ZIP1DEPS= \ - $(PACKLICS) \ $(DESCRIPTION) \ $(COMPONENT_MANIFEST) \ $(COMPONENT_FILES) \ @@ -270,9 +259,6 @@ ZIP1DEPS= \ $(COMPONENT_LIBRARY) \ $(COMPONENT_HELP) -# $(COMPONENT_MERGED_XCU) \ - - LINKNAME:=help XHPLINKSRC:=$(ZIP1DIR)/help @@ -323,7 +309,7 @@ $(COMPONENT_IMAGES) : $(SOLARSRC)$/$(RSCDEFIMG)$/desktop$/res$/$$(@:f) $(COMPONENT_LIBRARY) : $(DLLDEST)$/$$(@:f) @-$(MKDIRHIER) $(@:d) +$(COPY) $< $@ -.IF "$(OS)$(CPU)"=="WNTI" +.IF "$(OS)$(CPU)"=="WNTI" && "$(WITH_EXTENSION_INTEGRATION)"!="YES" .IF "$(COM)"=="GCC" $(GNUCOPY) $(SOLARBINDIR)$/mingwm10.dll $(ZIP1DIR) .ELSE @@ -363,19 +349,9 @@ $(COMPONENT_LIBRARY) : $(DLLDEST)$/$$(@:f) .ENDIF .ENDIF # "$(PACKMS)"!="" .ENDIF #"$(COM)"=="GCC" -.ENDIF +.ENDIF #"$(OS)$(CPU)"=="WNTI" && "$(WITH_EXTENSION_INTEGRATION)"!="YES" -.IF "$(GUI)" == "WIN" || "$(GUI)" == "WNT" -$(PACKLICS) : $(SOLARBINDIR)$/osl$/license$$(@:b:s/_/./:e:s/./_/)$$(@:e).txt - @@-$(MKDIRHIER) $(@:d) - $(GNUCOPY) $< $@ -.ELSE -$(PACKLICS) : $(SOLARBINDIR)$/osl$/LICENSE$$(@:b:s/_/./:e:s/./_/)$$(@:e) - @@-$(MKDIRHIER) $(@:d) - $(GNUCOPY) $< $@ -.ENDIF - $(ZIP1DIR)/%.xcu : %.xcu @@-$(MKDIRHIER) $(@:d) @@ -385,24 +361,18 @@ $(ZIP1DIR)$/%.xcs : %.xcs @@-$(MKDIRHIER) $(@:d) $(GNUCOPY) $< $@ -# Temporary file that is used to replace some placeholders in description.xml. -DESCRIPTION_TMP:=$(ZIP1DIR)$/description.xml.tmp - .INCLUDE .IGNORE : $(ZIP1DIR)_lang_track.mk .IF "$(LAST_WITH_LANG)"!="$(WITH_LANG)" PHONYDESC=.PHONY .ENDIF # "$(LAST_WITH_LANG)"!="$(WITH_LANG)" $(DESCRIPTION) $(PHONYDESC) : $$(@:f) @-$(MKDIRHIER) $(@:d) - $(PERL) $(SOLARENV)$/bin$/licinserter.pl description.xml registry/LICENSE_xxx $(DESCRIPTION_TMP) @echo LAST_WITH_LANG=$(WITH_LANG) > $(ZIP1DIR)_lang_track.mk - $(TYPE) $(DESCRIPTION_TMP) | sed s/UPDATED_PLATFORM/$(PLATFORMID)/ > $@ - @@-$(RM) $(DESCRIPTION_TMP) - + $(TYPE) description.xml | sed s/UPDATED_PLATFORM/$(PLATFORMID)/ > $@ -.ENDIF # "$(ENABLE_PRESENTER_SCREEN)" != "NO" .ELSE ivo: $(ECHO) .ENDIF # L10N_framework +.ENDIF # "$(ENABLE_PRESENTER_SCREEN)" != "NO" |