From f9b4521edc6a2370ca773aa80d3719d4bb45190d Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Fri, 11 Feb 2011 22:33:02 -0600 Subject: merge non-conflicting changes in sysui and ucb --- sysui/desktop/debian/control | 8 +- sysui/desktop/debian/openoffice.org-debian-menus | 12 +- sysui/desktop/debian/postinst | 4 +- sysui/desktop/freedesktop/freedesktop-menus.spec | 10 +- sysui/desktop/icons/database.ico | Bin 295606 -> 679412 bytes sysui/desktop/macosx/Info.plist | 4 +- sysui/desktop/macosx/makefile.mk | 6 +- sysui/desktop/mandriva/mandriva-menus.spec | 11 +- sysui/desktop/menus/base.desktop | 2 +- sysui/desktop/menus/calc.desktop | 2 +- sysui/desktop/menus/draw.desktop | 2 +- sysui/desktop/menus/impress.desktop | 2 +- sysui/desktop/menus/math.desktop | 2 +- sysui/desktop/menus/printeradmin.desktop | 2 +- sysui/desktop/menus/qstart.desktop | 2 +- sysui/desktop/menus/startcenter.desktop | 2 +- sysui/desktop/menus/writer.desktop | 2 +- sysui/desktop/productversion.mk | 28 +-- sysui/desktop/redhat/redhat-menus.spec | 15 +- sysui/desktop/share/brand.pl | 10 +- sysui/desktop/share/create_mime_xml.pl | 2 +- sysui/desktop/share/create_tree.sh | 19 +- sysui/desktop/share/translate.pl | 2 +- sysui/desktop/slackware/slack-desc | 2 +- sysui/desktop/suse/suse-menus.spec | 11 +- sysui/source/win32/QuickStart/QuickStart.cpp | 9 +- sysui/source/win32/QuickStart/QuickStart.h | 3 + sysui/source/win32/QuickStart/StdAfx.h | 3 + sysui/source/win32/QuickStart/resource.h | 3 + sysui/source/win32/misc/AutoBuffer.cxx | 3 + sysui/source/win32/misc/AutoBuffer.hxx | 5 +- sysui/source/win32/misc/WinImplHelper.cxx | 19 +- sysui/source/win32/misc/WinImplHelper.hxx | 5 +- sysui/source/win32/misc/resourceprovider.cxx | 5 +- sysui/source/win32/misc/resourceprovider.hxx | 5 +- ucb/inc/pch/precompiled_ucb.cxx | 2 + ucb/inc/pch/precompiled_ucb.hxx | 9 +- ucb/prj/d.lst | 5 + ucb/qa/complex/tdoc/_XChild.java | 2 +- ucb/qa/complex/tdoc/_XServiceInfo.java | 4 +- ucb/qa/complex/tdoc/_XTypeProvider.java | 2 +- ucb/source/cacher/cachedcontentresultset.cxx | 30 +-- ucb/source/cacher/cachedcontentresultset.hxx | 2 + ucb/source/cacher/cachedcontentresultsetstub.cxx | 89 ++------ ucb/source/cacher/cachedcontentresultsetstub.hxx | 2 + ucb/source/cacher/cacheddynamicresultset.cxx | 18 +- ucb/source/cacher/cacheddynamicresultset.hxx | 2 + ucb/source/cacher/cacheddynamicresultsetstub.cxx | 22 +- ucb/source/cacher/cacheddynamicresultsetstub.hxx | 2 + ucb/source/cacher/cacheserv.cxx | 2 + ucb/source/cacher/contentresultsetwrapper.cxx | 4 +- ucb/source/cacher/contentresultsetwrapper.hxx | 2 + ucb/source/cacher/dynamicresultsetwrapper.cxx | 6 +- ucb/source/cacher/dynamicresultsetwrapper.hxx | 2 + ucb/source/core/cmdenv.cxx | 3 + ucb/source/core/cmdenv.hxx | 3 + ucb/source/core/identify.cxx | 2 + ucb/source/core/identify.hxx | 3 + ucb/source/core/providermap.hxx | 2 + ucb/source/core/provprox.cxx | 21 +- ucb/source/core/provprox.hxx | 3 + ucb/source/core/ucb.cxx | 13 +- ucb/source/core/ucb.hxx | 3 + ucb/source/core/ucbcmds.cxx | 149 +++++++------- ucb/source/core/ucbcmds.hxx | 3 + ucb/source/core/ucbprops.cxx | 10 +- ucb/source/core/ucbprops.hxx | 2 + ucb/source/core/ucbserv.cxx | 2 + ucb/source/core/ucbstore.cxx | 130 ++++++------ ucb/source/core/ucbstore.hxx | 3 + ucb/source/inc/regexp.hxx | 2 + ucb/source/inc/regexpmap.hxx | 2 + ucb/source/regexp/regexp.cxx | 4 +- ucb/source/sorter/sortdynres.cxx | 24 ++- ucb/source/sorter/sortdynres.hxx | 3 + ucb/source/sorter/sortmain.cxx | 2 + ucb/source/sorter/sortresult.cxx | 24 ++- ucb/source/sorter/sortresult.hxx | 2 + ucb/source/ucp/expand/ucpexpand.cxx | 3 + ucb/source/ucp/ext/makefile.mk | 73 ------- ucb/source/ucp/file/bc.cxx | 53 +++-- ucb/source/ucp/file/bc.hxx | 6 +- ucb/source/ucp/file/filcmd.cxx | 3 + ucb/source/ucp/file/filcmd.hxx | 3 + ucb/source/ucp/file/filerror.hxx | 2 + ucb/source/ucp/file/filglob.cxx | 25 +-- ucb/source/ucp/file/filglob.hxx | 3 + ucb/source/ucp/file/filid.cxx | 3 + ucb/source/ucp/file/filid.hxx | 3 + ucb/source/ucp/file/filinl.hxx | 3 + ucb/source/ucp/file/filinpstr.cxx | 9 +- ucb/source/ucp/file/filinpstr.hxx | 3 + ucb/source/ucp/file/filinsreq.cxx | 5 +- ucb/source/ucp/file/filinsreq.hxx | 3 + ucb/source/ucp/file/filnot.cxx | 3 + ucb/source/ucp/file/filnot.hxx | 3 + ucb/source/ucp/file/filprp.cxx | 3 + ucb/source/ucp/file/filprp.hxx | 2 + ucb/source/ucp/file/filrec.cxx | 8 +- ucb/source/ucp/file/filrec.hxx | 2 + ucb/source/ucp/file/filrow.cxx | 5 +- ucb/source/ucp/file/filrow.hxx | 3 + ucb/source/ucp/file/filrset.cxx | 33 +-- ucb/source/ucp/file/filrset.hxx | 7 +- ucb/source/ucp/file/filstr.cxx | 11 +- ucb/source/ucp/file/filstr.hxx | 3 + ucb/source/ucp/file/filtask.cxx | 3 + ucb/source/ucp/file/filtask.hxx | 5 +- ucb/source/ucp/file/prov.cxx | 11 +- ucb/source/ucp/file/prov.hxx | 2 + ucb/source/ucp/file/shell.cxx | 55 ++--- ucb/source/ucp/file/shell.hxx | 2 + ucb/source/ucp/ftp/curl.hxx | 3 + ucb/source/ucp/ftp/ftpcfunc.cxx | 3 + ucb/source/ucp/ftp/ftpcfunc.hxx | 3 + ucb/source/ucp/ftp/ftpcontainer.hxx | 2 + ucb/source/ucp/ftp/ftpcontent.cxx | 40 ++-- ucb/source/ucp/ftp/ftpcontent.hxx | 3 + ucb/source/ucp/ftp/ftpcontentcaps.cxx | 2 + ucb/source/ucp/ftp/ftpcontentidentifier.cxx | 4 +- ucb/source/ucp/ftp/ftpcontentidentifier.hxx | 3 + ucb/source/ucp/ftp/ftpcontentprovider.cxx | 9 +- ucb/source/ucp/ftp/ftpcontentprovider.hxx | 2 + ucb/source/ucp/ftp/ftpdirp.cxx | 3 + ucb/source/ucp/ftp/ftpdirp.hxx | 3 + ucb/source/ucp/ftp/ftpdynresultset.cxx | 4 +- ucb/source/ucp/ftp/ftpdynresultset.hxx | 2 + ucb/source/ucp/ftp/ftphandleprovider.hxx | 3 + ucb/source/ucp/ftp/ftpinpstr.cxx | 5 +- ucb/source/ucp/ftp/ftpinpstr.hxx | 3 + ucb/source/ucp/ftp/ftpintreq.cxx | 2 + ucb/source/ucp/ftp/ftpintreq.hxx | 3 + ucb/source/ucp/ftp/ftploaderthread.cxx | 2 + ucb/source/ucp/ftp/ftploaderthread.hxx | 3 + ucb/source/ucp/ftp/ftpresultsetI.cxx | 7 +- ucb/source/ucp/ftp/ftpresultsetI.hxx | 3 + ucb/source/ucp/ftp/ftpresultsetbase.cxx | 24 +-- ucb/source/ucp/ftp/ftpresultsetbase.hxx | 3 + ucb/source/ucp/ftp/ftpresultsetfactory.hxx | 3 + ucb/source/ucp/ftp/ftpservices.cxx | 2 + ucb/source/ucp/ftp/ftpstrcont.hxx | 3 + ucb/source/ucp/ftp/ftpurl.cxx | 46 +++-- ucb/source/ucp/ftp/ftpurl.hxx | 3 + ucb/source/ucp/ftp/test.cxx | 224 +------------------- ucb/source/ucp/ftp/test_activedatasink.cxx | 5 +- ucb/source/ucp/ftp/test_activedatasink.hxx | 3 + ucb/source/ucp/ftp/test_ftpurl.cxx | 22 +- ucb/source/ucp/ftp/test_ftpurl.hxx | 3 + ucb/source/ucp/ftp/test_interactionhandler.hxx | 3 + ucb/source/ucp/ftp/test_multiservicefac.cxx | 3 + ucb/source/ucp/ftp/test_multiservicefac.hxx | 2 + ucb/source/ucp/gio/gio_content.cxx | 30 +-- ucb/source/ucp/gio/gio_content.hxx | 3 + ucb/source/ucp/gio/gio_datasupplier.cxx | 7 +- ucb/source/ucp/gio/gio_datasupplier.hxx | 3 + ucb/source/ucp/gio/gio_inputstream.cxx | 3 + ucb/source/ucp/gio/gio_inputstream.hxx | 3 + ucb/source/ucp/gio/gio_mount.cxx | 3 + ucb/source/ucp/gio/gio_mount.hxx | 7 +- ucb/source/ucp/gio/gio_outputstream.cxx | 3 + ucb/source/ucp/gio/gio_outputstream.hxx | 3 + ucb/source/ucp/gio/gio_provider.cxx | 11 +- ucb/source/ucp/gio/gio_provider.hxx | 3 + ucb/source/ucp/gio/gio_resultset.cxx | 3 + ucb/source/ucp/gio/gio_resultset.hxx | 3 + ucb/source/ucp/gio/gio_seekable.cxx | 3 + ucb/source/ucp/gio/gio_seekable.hxx | 3 + ucb/source/ucp/gio/ucpgio.xml | 2 +- ucb/source/ucp/gvfs/gvfs_content.cxx | 50 +++-- ucb/source/ucp/gvfs/gvfs_content.hxx | 3 + ucb/source/ucp/gvfs/gvfs_directory.cxx | 12 +- ucb/source/ucp/gvfs/gvfs_directory.hxx | 3 + ucb/source/ucp/gvfs/gvfs_provider.cxx | 10 +- ucb/source/ucp/gvfs/gvfs_provider.hxx | 2 + ucb/source/ucp/gvfs/gvfs_stream.cxx | 3 + ucb/source/ucp/gvfs/gvfs_stream.hxx | 3 + ucb/source/ucp/hierarchy/dynamicresultset.cxx | 2 + ucb/source/ucp/hierarchy/dynamicresultset.hxx | 3 + ucb/source/ucp/hierarchy/hierarchycontent.cxx | 184 +++++++++-------- ucb/source/ucp/hierarchy/hierarchycontent.hxx | 11 +- ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx | 4 + ucb/source/ucp/hierarchy/hierarchydata.cxx | 75 ++----- ucb/source/ucp/hierarchy/hierarchydata.hxx | 3 + ucb/source/ucp/hierarchy/hierarchydatasource.cxx | 14 +- ucb/source/ucp/hierarchy/hierarchydatasource.hxx | 3 + ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx | 10 +- ucb/source/ucp/hierarchy/hierarchydatasupplier.hxx | 3 + ucb/source/ucp/hierarchy/hierarchyprovider.cxx | 22 +- ucb/source/ucp/hierarchy/hierarchyprovider.hxx | 3 + ucb/source/ucp/hierarchy/hierarchyservices.cxx | 2 + ucb/source/ucp/hierarchy/hierarchyuri.cxx | 16 +- ucb/source/ucp/hierarchy/hierarchyuri.hxx | 3 + ucb/source/ucp/inc/urihelper.hxx | 3 + ucb/source/ucp/odma/makefile.mk | 9 +- ucb/source/ucp/odma/odma.h | 3 + ucb/source/ucp/odma/odma_content.cxx | 223 +++++--------------- ucb/source/ucp/odma/odma_content.hxx | 5 +- ucb/source/ucp/odma/odma_contentcaps.cxx | 2 + ucb/source/ucp/odma/odma_contentprops.hxx | 3 + ucb/source/ucp/odma/odma_datasupplier.cxx | 13 +- ucb/source/ucp/odma/odma_datasupplier.hxx | 3 + ucb/source/ucp/odma/odma_inputstream.cxx | 3 + ucb/source/ucp/odma/odma_inputstream.hxx | 3 + ucb/source/ucp/odma/odma_lib.cxx | 30 ++- ucb/source/ucp/odma/odma_lib.hxx | 79 ++++--- ucb/source/ucp/odma/odma_main.cxx | 2 + ucb/source/ucp/odma/odma_provider.cxx | 45 ++-- ucb/source/ucp/odma/odma_provider.hxx | 18 +- ucb/source/ucp/odma/odma_resultset.cxx | 2 + ucb/source/ucp/odma/odma_resultset.hxx | 3 + ucb/source/ucp/odma/odma_services.cxx | 8 +- ucb/source/ucp/odma/ucpodma.xml | 2 +- ucb/source/ucp/package/pkgcontent.cxx | 228 +++++++++++---------- ucb/source/ucp/package/pkgcontent.hxx | 3 + ucb/source/ucp/package/pkgcontentcaps.cxx | 2 + ucb/source/ucp/package/pkgdatasupplier.cxx | 8 +- ucb/source/ucp/package/pkgdatasupplier.hxx | 3 + ucb/source/ucp/package/pkgprovider.cxx | 14 +- ucb/source/ucp/package/pkgprovider.hxx | 3 + ucb/source/ucp/package/pkgresultset.cxx | 2 + ucb/source/ucp/package/pkgresultset.hxx | 3 + ucb/source/ucp/package/pkgservices.cxx | 2 + ucb/source/ucp/package/pkguri.cxx | 3 + ucb/source/ucp/package/pkguri.hxx | 3 + ucb/source/ucp/tdoc/tdoc_content.cxx | 201 +++++++++--------- ucb/source/ucp/tdoc/tdoc_content.hxx | 12 +- ucb/source/ucp/tdoc/tdoc_contentcaps.cxx | 23 ++- ucb/source/ucp/tdoc/tdoc_datasupplier.cxx | 7 +- ucb/source/ucp/tdoc/tdoc_datasupplier.hxx | 3 + ucb/source/ucp/tdoc/tdoc_docmgr.cxx | 3 + ucb/source/ucp/tdoc/tdoc_docmgr.hxx | 3 + .../ucp/tdoc/tdoc_documentcontentfactory.cxx | 2 + .../ucp/tdoc/tdoc_documentcontentfactory.hxx | 3 + ucb/source/ucp/tdoc/tdoc_passwordrequest.cxx | 2 + ucb/source/ucp/tdoc/tdoc_passwordrequest.hxx | 2 + ucb/source/ucp/tdoc/tdoc_provider.cxx | 2 + ucb/source/ucp/tdoc/tdoc_provider.hxx | 3 + ucb/source/ucp/tdoc/tdoc_resultset.cxx | 2 + ucb/source/ucp/tdoc/tdoc_resultset.hxx | 3 + ucb/source/ucp/tdoc/tdoc_services.cxx | 2 + ucb/source/ucp/tdoc/tdoc_stgelems.cxx | 2 + ucb/source/ucp/tdoc/tdoc_stgelems.hxx | 3 + ucb/source/ucp/tdoc/tdoc_storage.cxx | 3 + ucb/source/ucp/tdoc/tdoc_storage.hxx | 3 + ucb/source/ucp/tdoc/tdoc_uri.cxx | 5 +- ucb/source/ucp/tdoc/tdoc_uri.hxx | 3 + ucb/source/ucp/tdoc/ucptdoc1.component.orig | 37 ++++ ucb/source/ucp/webdav/ContentProperties.cxx | 45 ++-- ucb/source/ucp/webdav/ContentProperties.hxx | 3 + ucb/source/ucp/webdav/DAVAuthListener.hxx | 3 + ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx | 3 + ucb/source/ucp/webdav/DAVException.hxx | 3 + ucb/source/ucp/webdav/DAVProperties.cxx | 48 ++--- ucb/source/ucp/webdav/DAVProperties.hxx | 3 + ucb/source/ucp/webdav/DAVRequestEnvironment.hxx | 3 + ucb/source/ucp/webdav/DAVResource.hxx | 3 + ucb/source/ucp/webdav/DAVResourceAccess.cxx | 4 + ucb/source/ucp/webdav/DAVResourceAccess.hxx | 3 + ucb/source/ucp/webdav/DAVSession.hxx | 1 + ucb/source/ucp/webdav/DAVSessionFactory.cxx | 2 + ucb/source/ucp/webdav/DAVSessionFactory.hxx | 3 + ucb/source/ucp/webdav/DAVTypes.hxx | 3 + ucb/source/ucp/webdav/DateTimeHelper.cxx | 2 + ucb/source/ucp/webdav/DateTimeHelper.hxx | 2 + ucb/source/ucp/webdav/LinkSequence.cxx | 11 +- ucb/source/ucp/webdav/LinkSequence.hxx | 3 + ucb/source/ucp/webdav/LockEntrySequence.cxx | 3 + ucb/source/ucp/webdav/LockEntrySequence.hxx | 3 + ucb/source/ucp/webdav/LockSequence.cxx | 3 + ucb/source/ucp/webdav/LockSequence.hxx | 3 + ucb/source/ucp/webdav/NeonHeadRequest.cxx | 2 + ucb/source/ucp/webdav/NeonHeadRequest.hxx | 2 + ucb/source/ucp/webdav/NeonInputStream.cxx | 3 + ucb/source/ucp/webdav/NeonInputStream.hxx | 3 + ucb/source/ucp/webdav/NeonPropFindRequest.cxx | 36 ++-- ucb/source/ucp/webdav/NeonPropFindRequest.hxx | 3 + ucb/source/ucp/webdav/NeonSession.cxx | 39 ++-- ucb/source/ucp/webdav/NeonSession.hxx | 3 + ucb/source/ucp/webdav/NeonTypes.hxx | 3 + ucb/source/ucp/webdav/NeonUri.cxx | 6 +- ucb/source/ucp/webdav/NeonUri.hxx | 3 + ucb/source/ucp/webdav/PropertyMap.hxx | 3 + ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx | 41 ++-- ucb/source/ucp/webdav/UCBDeadPropertyValue.hxx | 3 + ucb/source/ucp/webdav/webdavcontent.cxx | 152 +++++++------- ucb/source/ucp/webdav/webdavcontent.hxx | 3 + ucb/source/ucp/webdav/webdavcontentcaps.cxx | 1 + ucb/source/ucp/webdav/webdavdatasupplier.cxx | 12 +- ucb/source/ucp/webdav/webdavdatasupplier.hxx | 3 + ucb/source/ucp/webdav/webdavprovider.cxx | 24 ++- ucb/source/ucp/webdav/webdavprovider.hxx | 3 + ucb/source/ucp/webdav/webdavresultset.cxx | 4 +- ucb/source/ucp/webdav/webdavresultset.hxx | 3 + ucb/source/ucp/webdav/webdavservices.cxx | 2 + ucb/workben/cachemap/cachemapobject1.cxx | 3 + ucb/workben/cachemap/cachemapobject1.hxx | 3 + ucb/workben/cachemap/cachemapobject2.hxx | 3 + ucb/workben/cachemap/cachemapobject3.cxx | 3 + ucb/workben/cachemap/cachemapobject3.hxx | 3 + ucb/workben/cachemap/cachemapobjectcontainer2.cxx | 3 + ucb/workben/cachemap/cachemapobjectcontainer2.hxx | 3 + ucb/workben/cachemap/cachemaptest.cxx | 5 +- ucb/workben/ucb/srcharg.cxx | 4 +- ucb/workben/ucb/srcharg.hxx | 2 + ucb/workben/ucb/ucbdemo.cxx | 168 ++++++--------- 305 files changed, 2083 insertions(+), 1904 deletions(-) mode change 100755 => 100644 ucb/qa/complex/tdoc/_XChild.java mode change 100755 => 100644 ucb/qa/complex/tdoc/_XServiceInfo.java mode change 100755 => 100644 ucb/qa/complex/tdoc/_XTypeProvider.java delete mode 100644 ucb/source/ucp/ext/makefile.mk mode change 100755 => 100644 ucb/source/ucp/ftp/ftphandleprovider.hxx mode change 100755 => 100644 ucb/source/ucp/ftp/test_ftpurl.cxx mode change 100755 => 100644 ucb/source/ucp/ftp/test_ftpurl.hxx create mode 100644 ucb/source/ucp/tdoc/ucptdoc1.component.orig diff --git a/sysui/desktop/debian/control b/sysui/desktop/debian/control index 608496d9e2..da25ee4542 100644 --- a/sysui/desktop/debian/control +++ b/sysui/desktop/debian/control @@ -1,6 +1,6 @@ Description: %productname desktop integration -Maintainer: OpenOffice.org +Maintainer: LibreOffice Architecture: all -Provides: openoffice.org-desktop-integration, openoffice.org-unbundled -Conflicts: openofficeorg-desktop-integration, openofficeorg-debian-menus, openoffice.org-bundled -Replaces: openofficeorg-desktop-integration, openofficeorg-debian-menus +Provides: libreoffice-desktop-integration, libreoffice-unbundled +Conflicts: libreoffice-desktop-integration, libreoffice-debian-menus, libreoffice-bundled +Replaces: libreoffice-desktop-integration, libreoffice-debian-menus diff --git a/sysui/desktop/debian/openoffice.org-debian-menus b/sysui/desktop/debian/openoffice.org-debian-menus index bf30a918cf..c477d73635 100644 --- a/sysui/desktop/debian/openoffice.org-debian-menus +++ b/sysui/desktop/debian/openoffice.org-debian-menus @@ -1,39 +1,39 @@ -?package(openoffice.org-writer):needs="X11" section="Apps/Editors"\ +?package(libreoffice-writer):needs="X11" section="Apps/Editors"\ title="%PRODUCTNAME Writer" command="%PREFIX -writer"\ hints="Word Processors"\ kderemove="y"\ icon="/usr/share/icons/hicolor/32x32/apps/%ICONPREFIX-writer.png"\ icon16x16="/usr/share/icons/hicolor/16x16/apps/%ICONPREFIX-writer.png" -?package(openoffice.org-calc):needs="X11" section="Apps/Math"\ +?package(libreoffice-calc):needs="X11" section="Apps/Math"\ title="%PRODUCTNAME Calc" command="%PREFIX -calc"\ hints="Spreadsheets"\ kderemove="y"\ icon="/usr/share/icons/hicolor/32x32/apps/%ICONPREFIX-calc.png"\ icon16x16="/usr/share/icons/hicolor/16x16/apps/%ICONPREFIX-calc.png" -?package(openoffice.org-draw):needs="X11" section="Apps/Graphics"\ +?package(libreoffice-draw):needs="X11" section="Apps/Graphics"\ title="%PRODUCTNAME Draw" command="%PREFIX -draw"\ hints="Drawing"\ kderemove="y"\ icon="/usr/share/icons/hicolor/32x32/apps/%ICONPREFIX-draw.png"\ icon16x16="/usr/share/icons/hicolor/16x16/apps/%ICONPREFIX-draw.png" -?package(openoffice.org-impress):needs="X11" section="Apps/Graphics"\ +?package(libreoffice-impress):needs="X11" section="Apps/Graphics"\ title="%PRODUCTNAME Impress" command="%PREFIX -impress"\ hints="Presentation"\ kderemove="y"\ icon="/usr/share/icons/hicolor/32x32/apps/%ICONPREFIX-impress.png"\ icon16x16="/usr/share/icons/hicolor/16x16/apps/%ICONPREFIX-impress.png" -?package(openoffice.org-base):needs="X11" section="Apps/Databases"\ +?package(libreoffice-base):needs="X11" section="Apps/Databases"\ title="%PRODUCTNAME Base" command="%PREFIX -base"\ hints="Database"\ kderemove="y"\ icon="/usr/share/icons/hicolor/32x32/apps/%ICONPREFIX-base.png"\ icon16x16="/usr/share/icons/hicolor/16x16/apps/%ICONPREFIX-base.png" -?package(openoffice.org-core02):needs="X11" section="Apps/System"\ +?package(libreoffice-core02):needs="X11" section="Apps/System"\ title="%PRODUCTNAME Printer Administration"\ command="%PREFIX-printeradmin"\ hints="Setup,Printer,Config"\ diff --git a/sysui/desktop/debian/postinst b/sysui/desktop/debian/postinst index 19753b529e..67161dfa2e 100644 --- a/sysui/desktop/debian/postinst +++ b/sysui/desktop/debian/postinst @@ -80,7 +80,7 @@ if [ "$1" = "configure" ] then # backing out existing entries to avoid duplicates sed ' -/^# OpenOffice.org/d +/^# LibreOffice/d /^application\/vnd\.oasis\.opendocument/d /^application\/vnd\.openofficeorg/d /^application\/vnd\.sun/d @@ -96,7 +96,7 @@ then # now append our stuff to the temporary file cat >> /etc/mailcap.tmp$$ << END -# OpenOffice.org +# LibreOffice application/vnd.oasis.opendocument.text; %PREFIX -view %s application/vnd.oasis.opendocument.text-template; %PREFIX -view %s application/vnd.oasis.opendocument.text-web; %PREFIX -view %s diff --git a/sysui/desktop/freedesktop/freedesktop-menus.spec b/sysui/desktop/freedesktop/freedesktop-menus.spec index 1649971dad..30c2dd61e8 100644 --- a/sysui/desktop/freedesktop/freedesktop-menus.spec +++ b/sysui/desktop/freedesktop/freedesktop-menus.spec @@ -7,7 +7,7 @@ Name: %pkgprefix-freedesktop-menus #BuildRequires: perl Group: Office License: LGPL -Provides: openoffice.org3-desktop-integration +Provides: libreoffice-desktop-integration Conflicts: %pkgprefix-suse-menus Conflicts: %pkgprefix-debian-menus Conflicts: %pkgprefix-redhat-menus @@ -187,7 +187,7 @@ if [ "$1" = 1 ] then # backing out existing entries to avoid duplicates sed ' -/^# OpenOffice.org/d +/^# LibreOffice/d /^application\/vnd\.oasis\.opendocument/d /^application\/vnd\.openofficeorg/d /^application\/vnd\.sun/d @@ -203,7 +203,7 @@ then # now append our stuff to the temporary file cat >> /etc/mailcap.tmp$$ << END -# OpenOffice.org +# LibreOffice application/vnd.oasis.opendocument.text; %unixfilename -view %s application/vnd.oasis.opendocument.text-template; %unixfilename -view %s application/vnd.oasis.opendocument.text-web; %unixfilename -view %s @@ -318,6 +318,10 @@ done # glibc breaks rpm unless rpm is build with internal glob-matching (issue 49374) # https://bugzilla.redhat.com/beta/show_bug.cgi?id=134362 %defattr(-, root, root) +%if %unixfilename != libreoffice +# compat symlinks +%attr(0755, root, root) /opt/%unixfilename +%endif %attr(0755, root, root) /usr/bin/* /usr/share/applications/%unixfilename-base.desktop /usr/share/applications/%unixfilename-calc.desktop diff --git a/sysui/desktop/icons/database.ico b/sysui/desktop/icons/database.ico index 171d39bb96..a60ed8ef57 100644 Binary files a/sysui/desktop/icons/database.ico and b/sysui/desktop/icons/database.ico differ diff --git a/sysui/desktop/macosx/Info.plist b/sysui/desktop/macosx/Info.plist index cf04e8086a..8100df25d2 100644 --- a/sysui/desktop/macosx/Info.plist +++ b/sysui/desktop/macosx/Info.plist @@ -1390,7 +1390,7 @@ CFBundleShortVersionString ${ABOUTBOXPRODUCTVERSION} CFBundleIdentifier - org.openoffice.script + org.libreoffice.script CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -1398,7 +1398,7 @@ CFBundlePackageType APPL CFBundleSignature - OOo2 + LibO LSRequiresCarbon 1 NSPrincipalClass diff --git a/sysui/desktop/macosx/makefile.mk b/sysui/desktop/macosx/makefile.mk index 748002a6a7..ca8c644d7c 100644 --- a/sysui/desktop/macosx/makefile.mk +++ b/sysui/desktop/macosx/makefile.mk @@ -46,11 +46,7 @@ ZIP1TARGET = osxicons ZIP1DIR = ../icons ZIP1LIST := $(shell $(PERL) -w list_icons.pl < Info.plist) -.IF "$(GUIBASE)"!="aqua" -CREATOR_TYPE=OOo2 -EXECUTABLE=droplet -.ELSE -CREATOR_TYPE=OOO2 +CREATOR_TYPE=LIBO EXECUTABLE=soffice .ENDIF diff --git a/sysui/desktop/mandriva/mandriva-menus.spec b/sysui/desktop/mandriva/mandriva-menus.spec index 4c02c70d90..f068788577 100644 --- a/sysui/desktop/mandriva/mandriva-menus.spec +++ b/sysui/desktop/mandriva/mandriva-menus.spec @@ -13,7 +13,7 @@ BuildArch: noarch # here and check for the 'mandriva-release' in the future (next year). # Requires: mandrake-release -Provides: openoffice.org3-desktop-integration +Provides: libreoffice-desktop-integration %define _unpackaged_files_terminate_build 0 %define _binary_filedigest_algorithm 1 @@ -107,7 +107,7 @@ if [ "$1" = 1 ] then # backing out existing entries to avoid duplicates sed ' -/^# OpenOffice.org/d +/^# LibreOffice/d /^application\/vnd\.oasis\.opendocument/d /^application\/vnd\.openofficeorg/d /^application\/vnd\.sun/d @@ -309,7 +309,12 @@ fi %files -%attr(0755,root,root) /usr/bin/soffice +%if %unixfilename != libreoffice +# compat symlinks +%attr(0755,root,root) /opt/%unixfilename +%attr(0755,root,root) /usr/bin/libreoffice +%attr(0755,root,root) /usr/bin/libreoffice-printeradmin +%endif %attr(0755,root,root) %verify(not size md5) /usr/bin/%unixfilename %attr(0755,root,root) /usr/bin/%unixfilename-printeradmin %defattr(0644, root, root) diff --git a/sysui/desktop/menus/base.desktop b/sysui/desktop/menus/base.desktop index 9497666691..dbbff82a91 100644 --- a/sysui/desktop/menus/base.desktop +++ b/sysui/desktop/menus/base.desktop @@ -4,7 +4,7 @@ Terminal=false Icon=base Type=Application Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-MoreApplications-Databases; -Exec=openoffice -base %U +Exec=${UNIXBASISROOTNAME} --base %U MimeType=application/vnd.oasis.opendocument.database;application/vnd.sun.xml.base; Name=%PRODUCTNAME Base GenericName=Database Development diff --git a/sysui/desktop/menus/calc.desktop b/sysui/desktop/menus/calc.desktop index bc0c9ee8b6..3b3bcce4e5 100644 --- a/sysui/desktop/menus/calc.desktop +++ b/sysui/desktop/menus/calc.desktop @@ -4,7 +4,7 @@ Terminal=false Icon=calc Type=Application Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Spreadsheets; -Exec=openoffice -calc %U +Exec=${UNIXBASISROOTNAME} --calc %U MimeType=application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/vnd.stardivision.calc;application/vnd.stardivision.chart;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv;application/x-dbf; Name=%PRODUCTNAME Calc GenericName=Spreadsheet diff --git a/sysui/desktop/menus/draw.desktop b/sysui/desktop/menus/draw.desktop index 42db7c6f84..3fde5d00af 100644 --- a/sysui/desktop/menus/draw.desktop +++ b/sysui/desktop/menus/draw.desktop @@ -4,7 +4,7 @@ Terminal=false Icon=draw Type=Application Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Drawing; -Exec=openoffice -draw %U +Exec=${UNIXBASISROOTNAME} --draw %U MimeType=application/vnd.oasis.opendocument.graphics;application/vnd.oasis.opendocument.graphics-template;application/vnd.sun.xml.draw;application/vnd.sun.xml.draw.template;application/vnd.stardivision.draw; Name=%PRODUCTNAME Draw GenericName=Drawing Program diff --git a/sysui/desktop/menus/impress.desktop b/sysui/desktop/menus/impress.desktop index 90df11ac54..3f6ce2fc84 100644 --- a/sysui/desktop/menus/impress.desktop +++ b/sysui/desktop/menus/impress.desktop @@ -4,7 +4,7 @@ Terminal=false Icon=impress Type=Application Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Presentations; -Exec=openoffice -impress %U +Exec=${UNIXBASISROOTNAME} --impress %U MimeType=application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-template;application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/vnd.stardivision.impress;application/mspowerpoint;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint.presentation.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.ms-powerpoint.template.macroenabled.12; Name=%PRODUCTNAME Impress GenericName=Presentation diff --git a/sysui/desktop/menus/math.desktop b/sysui/desktop/menus/math.desktop index f97536d6ef..7b2e9807cb 100644 --- a/sysui/desktop/menus/math.desktop +++ b/sysui/desktop/menus/math.desktop @@ -4,7 +4,7 @@ Terminal=false Icon=math Type=Application Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Other; -Exec=openoffice -math %U +Exec=${UNIXBASISROOTNAME} --math %U MimeType=application/vnd.oasis.opendocument.formula;application/vnd.sun.xml.math;application/vnd.stardivision.math; Name=%PRODUCTNAME Math GenericName=Formula Editor diff --git a/sysui/desktop/menus/printeradmin.desktop b/sysui/desktop/menus/printeradmin.desktop index 9ddd9bff49..17b5831d5c 100644 --- a/sysui/desktop/menus/printeradmin.desktop +++ b/sysui/desktop/menus/printeradmin.desktop @@ -4,5 +4,5 @@ Terminal=false Icon=printeradmin Type=Application Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office; -Exec=openoffice-printeradmin +Exec=${UNIXBASISROOTNAME}-printeradmin Name=%PRODUCTNAME Printer Administration diff --git a/sysui/desktop/menus/qstart.desktop b/sysui/desktop/menus/qstart.desktop index 17e4edfff1..fc39c227ad 100644 --- a/sysui/desktop/menus/qstart.desktop +++ b/sysui/desktop/menus/qstart.desktop @@ -3,7 +3,7 @@ Version=1.0 Terminal=false Type=Application Categories=Office; -Exec=openoffice -quickstart -nologo -nodefault +Exec=${UNIXBASISROOTNAME} --quickstart --nologo --nodefault NoDisplay=true Name=%PRODUCTNAME Quickstarter Comment=Hook for quickstarter startup diff --git a/sysui/desktop/menus/startcenter.desktop b/sysui/desktop/menus/startcenter.desktop index 6302a5b162..3166b269c1 100644 --- a/sysui/desktop/menus/startcenter.desktop +++ b/sysui/desktop/menus/startcenter.desktop @@ -8,4 +8,4 @@ Exec=openoffice %U MimeType=application/vnd.openofficeorg.extension; Name=%PRODUCTNAME GenericName=Office -Comment=The office productivity suite compatible to the open and standardized ODF document format. Supported by Sun Microsystems. +Comment=The office productivity suite compatible to the open and standardized ODF document format. Supported by The Document Foundation. diff --git a/sysui/desktop/menus/writer.desktop b/sysui/desktop/menus/writer.desktop index 1509de0fb4..8f7bf2b164 100644 --- a/sysui/desktop/menus/writer.desktop +++ b/sysui/desktop/menus/writer.desktop @@ -4,7 +4,7 @@ Terminal=false Icon=writer Type=Application Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Wordprocessors; -Exec=openoffice -writer %U +Exec=${UNIXBASISROOTNAME} --writer %U MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/vnd.stardivision.writer;application/msword;application/vnd.ms-word;application/x-doc;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12; Name=%PRODUCTNAME Writer GenericName=Word Processor diff --git a/sysui/desktop/productversion.mk b/sysui/desktop/productversion.mk index 031e4d4363..a78021d881 100644 --- a/sysui/desktop/productversion.mk +++ b/sysui/desktop/productversion.mk @@ -33,7 +33,7 @@ PKGREV = $(LAST_MINOR:s/m//:s/s/./) ABSLOCALOUT:=$(shell @cd $(PRJ) && pwd)$/$(ROUT) # create desktop-integration subfolder on linux -.IF "$(OS)"=="LINUX" +.IF "$(OS)"=="LINUX" || "$(OS)"=="AIX" # rpm seems to require absolute paths here :( PKGDIR:=$(ABSLOCALOUT)$/bin$/desktop-integration RPMMACROS= \ @@ -43,7 +43,7 @@ RPMMACROS= \ PKGDIR=$(BIN) .ENDIF -PRODUCTLIST = openoffice.org broffice.org +.INCLUDE : productversion.mk # default values to minimize maintainance effort PRODUCTVERSION = 3.4 @@ -61,18 +61,18 @@ ICONVERSION = $(PRODUCTVERSIONSHORT:s/.//g) # which is need by other distributors, see http://www.openoffice.org/issues/show_bug.cgi?id=75366 UNIXWRAPPERNAME *= '$${{UNIXPRODUCTNAME}}$${{BRANDPACKAGEVERSION}}' -PRODUCTNAME.openoffice.org = OpenOffice.org -PRODUCTVERSION.openoffice.org = $(PRODUCTVERSION) -PRODUCTVERSIONSHORT.openoffice.org = $(PRODUCTVERSIONSHORT) -PKGVERSION.openoffice.org = $(PKGVERSION) -UNIXFILENAME.openoffice.org = $(PRODUCTNAME.openoffice.org:l)$(PRODUCTVERSIONSHORT.openoffice.org) -ICONPREFIX.openoffice.org = $(UNIXFILENAME.openoffice.org:s/.//g) +PRODUCTNAME.libreoffice = LibreOffice +PRODUCTVERSION.libreoffice = $(PRODUCTVERSION) +PRODUCTVERSIONSHORT.libreoffice = $(PRODUCTVERSIONSHORT) +PKGVERSION.libreoffice = $(PKGVERSION) +UNIXFILENAME.libreoffice = $(PRODUCTNAME.libreoffice:l) +ICONPREFIX.libreoffice = $(UNIXFILENAME.libreoffice:s/.//g) -PRODUCTNAME.broffice.org = BrOffice.org -PRODUCTVERSION.broffice.org = $(PRODUCTVERSION) -PRODUCTVERSIONSHORT.broffice.org = $(PRODUCTVERSIONSHORT) -PKGVERSION.broffice.org = $(PKGVERSION) -UNIXFILENAME.broffice.org = $(PRODUCTNAME.broffice.org:l)$(PRODUCTVERSIONSHORT.broffice.org) -ICONPREFIX.broffice.org = $(UNIXFILENAME.broffice.org:s/.//g) +PRODUCTNAME.broffice = BrOffice +PRODUCTVERSION.broffice = $(PRODUCTVERSION) +PRODUCTVERSIONSHORT.broffice = $(PRODUCTVERSIONSHORT) +PKGVERSION.broffice = $(PKGVERSION) +UNIXFILENAME.broffice = $(PRODUCTNAME.broffice:l) +ICONPREFIX.broffice = $(UNIXFILENAME.broffice:s/.//g) diff --git a/sysui/desktop/redhat/redhat-menus.spec b/sysui/desktop/redhat/redhat-menus.spec index 85e0a6a5d7..663fe23145 100644 --- a/sysui/desktop/redhat/redhat-menus.spec +++ b/sysui/desktop/redhat/redhat-menus.spec @@ -5,11 +5,11 @@ Summary: %productname desktop integration Name: %pkgprefix-redhat-menus Group: Office License: LGPL -Vendor: OpenOffice.org +Vendor: The Document Foundation AutoReqProv: no BuildArch: noarch Requires: redhat-release -Provides: openoffice.org3-desktop-integration +Provides: libreoffice-desktop-integration %define _unpackaged_files_terminate_build 0 %define _binary_filedigest_algorithm 1 %define _binary_payload w9.gzdio @@ -146,7 +146,7 @@ if [ "$1" = 1 ] then # backing out existing entries to avoid duplicates sed ' -/^# OpenOffice.org/d +/^# LibreOffice/d /^application\/vnd\.oasis\.opendocument/d /^application\/vnd\.openofficeorg/d /^application\/vnd\.sun/d @@ -162,7 +162,7 @@ then # now append our stuff to the temporary file cat >> /etc/mailcap.tmp$$ << END -# OpenOffice.org +# LibreOffice application/vnd.oasis.opendocument.text; %unixfilename -view %s application/vnd.oasis.opendocument.text-template; %unixfilename -view %s application/vnd.oasis.opendocument.text-web; %unixfilename -view %s @@ -268,7 +268,12 @@ for theme in gnome hicolor locolor; do done %files -%attr(0755,root,root) /usr/bin/soffice +%if %unixfilename != libreoffice +# compat symlinks +%attr(0755,root,root) /opt/%unixfilename +%attr(0755,root,root) /usr/bin/libreoffice +%attr(0755,root,root) /usr/bin/libreoffice-printeradmin +%endif %attr(0755,root,root) %verify(not size md5) /usr/bin/%unixfilename %attr(0755,root,root) /usr/bin/%unixfilename-printeradmin %defattr(0644, root, root) diff --git a/sysui/desktop/share/brand.pl b/sysui/desktop/share/brand.pl index ca66a51295..cebb7147e2 100644 --- a/sysui/desktop/share/brand.pl +++ b/sysui/desktop/share/brand.pl @@ -38,8 +38,8 @@ eval 'exec perl -wS $0 ${1+"$@"}' $destdir = pop @ARGV; mkdir $destdir,0777; -$productname = "OpenOffice.org"; -$productfilename = "openoffice"; +$productname = "LibreOffice"; +$productfilename = "libreoffice"; $prefix = ""; $iconprefix = ""; @@ -86,15 +86,15 @@ while (<>) { # remove possible Windows line-ends chomp; - # patch all occurances of openoffice in ICON line with + # patch all occurrences of openoffice in ICON line with # $prefix s/Icon=/Icon=$iconprefix/; - # patch all occurances of openoffice in icon_filename + # patch all occurrences of openoffice in icon_filename # line with $prefix s/icon_filename=/icon_filename=$iconprefix/; - # patch all occurances of openoffice in EXEC line with + # patch all occurrences of openoffice in EXEC line with # $productfilename if ( /Exec/ ) { s/openoffice/$productfilename/; diff --git a/sysui/desktop/share/create_mime_xml.pl b/sysui/desktop/share/create_mime_xml.pl index b6ff10a7fa..b16524ea2d 100644 --- a/sysui/desktop/share/create_mime_xml.pl +++ b/sysui/desktop/share/create_mime_xml.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl use File::Basename; $basedir = dirname($0); -$productname = 'OpenOffice.org'; +$productname = 'LibreOffice'; $mimedir = $basedir.'/../mimetypes'; $FS= ' '; # field seperator (space) - for documents.ulf diff --git a/sysui/desktop/share/create_tree.sh b/sysui/desktop/share/create_tree.sh index 84af1c75a4..160b2db44f 100644 --- a/sysui/desktop/share/create_tree.sh +++ b/sysui/desktop/share/create_tree.sh @@ -92,17 +92,26 @@ fi mkdir -p ${DESTDIR}/usr/bin -office_root=/opt/${PREFIX} +office_prefix=/opt +office_root=${office_prefix}/${PREFIX} -ln -sf ${office_root}/program/soffice ${DESTDIR}/usr/bin/soffice +#this symlink is needed to have the API boostrap functions running right +ln -sf ${office_root}/program/soffice ${DESTDIR}/usr/bin/libreoffice -cp openoffice.sh ${DESTDIR}/usr/bin/${PREFIX} cp printeradmin.sh ${DESTDIR}/usr/bin/${PREFIX}-printeradmin chmod 0755 ${DESTDIR}/usr/bin/${PREFIX} ${DESTDIR}/usr/bin/${PREFIX}-printeradmin +if test "${PREFIX}" != libreoffice ; then + # compat symlinks + mkdir -p ${DESTDIR}${office_prefix} + ln -sf libreoffice ${DESTDIR}${office_root} + ln -sf /usr/bin/${PREFIX} ${DESTDIR}/usr/bin/libreoffice + ln -sf /usr/bin/${PREFIX}-printeradmin ${DESTDIR}/usr/bin/libreoffice-printeradmin +fi + mkdir -p ${DESTDIR}/usr/share/mime/packages -cp openoffice.org.xml ${DESTDIR}/usr/share/mime/packages/ -chmod 0644 ${DESTDIR}/usr/share/mime/packages/openoffice.org.xml +cp openoffice.org.xml ${DESTDIR}/usr/share/mime/packages/libreoffice.xml +chmod 0644 ${DESTDIR}/usr/share/mime/packages/libreoffice.xml mkdir -p ${DESTDIR}/usr/share/applications for i in `cat launcherlist`; do diff --git a/sysui/desktop/share/translate.pl b/sysui/desktop/share/translate.pl index d34c5899ff..8c6cca0321 100644 --- a/sysui/desktop/share/translate.pl +++ b/sysui/desktop/share/translate.pl @@ -36,7 +36,7 @@ eval 'exec perl -wS $0 ${1+"$@"}' # my ($prefix, $ext, $key); -$productname = "OpenOffice.org"; +$productname = "LibreOffice"; $workdir = "."; while ($_ = $ARGV[0], /^-/) { diff --git a/sysui/desktop/slackware/slack-desc b/sysui/desktop/slackware/slack-desc index 42d6ce8dd8..d191373712 100644 --- a/sysui/desktop/slackware/slack-desc +++ b/sysui/desktop/slackware/slack-desc @@ -10,4 +10,4 @@ PKGNAME: default, make sure to adapt the link PKGNAME: /etc/UNIXFILENAME PKGNAME: accordingly to point to the correct location. PKGNAME: -PKGNAME: This package is provided by OpenOffice.org +PKGNAME: This package is provided by The Document Foundation diff --git a/sysui/desktop/suse/suse-menus.spec b/sysui/desktop/suse/suse-menus.spec index 14dbcde0f5..fe709694c3 100644 --- a/sysui/desktop/suse/suse-menus.spec +++ b/sysui/desktop/suse/suse-menus.spec @@ -5,14 +5,14 @@ Summary: %productname desktop integration Name: %pkgprefix-suse-menus Group: Office License: LGPL -Vendor: OpenOffice.org +Vendor: The Document Foundation AutoReqProv: no BuildArch: noarch # /etc/SuSE-release for SuSE, SLES and Novell Linux Desktop .. Requires: /etc/SuSE-release # .. but not for Sun JDS Conflicts: SunDesktopVersion -Provides: openoffice.org3-desktop-integration +Provides: libreoffice-desktop-integration %define _unpackaged_files_terminate_build 0 %define _binary_filedigest_algorithm 1 %define _binary_payload w9.gzdio @@ -280,7 +280,12 @@ for themedir in /opt/gnome/share/icons/gnome /opt/gnome/share/icons/hicolor /opt done %files -%attr(0755,root,root) /usr/bin/soffice +%if %unixfilename != libreoffice +# compat symlinks +%attr(0755,root,root) /opt/%unixfilename +%attr(0755,root,root) /usr/bin/libreoffice +%attr(0755,root,root) /usr/bin/libreoffice-printeradmin +%endif %attr(0755,root,root) %verify(not size md5) /usr/bin/%unixfilename %attr(0755,root,root) /usr/bin/%unixfilename-printeradmin %defattr(0644, root, root) diff --git a/sysui/source/win32/QuickStart/QuickStart.cpp b/sysui/source/win32/QuickStart/QuickStart.cpp index 496832f848..204b3d3a06 100644 --- a/sysui/source/win32/QuickStart/QuickStart.cpp +++ b/sysui/source/win32/QuickStart/QuickStart.cpp @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ // QuickStart.cpp : Defines the entry point for the application. // @@ -101,11 +102,11 @@ void NotifyListener( HWND hWnd ) nid.cbSize = sizeof(NOTIFYICONDATA); nid.hWnd = hWnd; nid.uID = IDM_QUICKSTART; - nid.szTip[elementsof(nid.szTip) - 1] = 0; + nid.szTip[SAL_N_ELEMENTS(nid.szTip) - 1] = 0; // nid.hIcon = bTerminateVeto ? hIconActive : hIconInActive; -// strncpy(nid.szTip, bTerminateVeto ? STRING_QUICKSTARTACTIVE : STRING_QUICKSTARTINACTIVE, elementsof(nid.szTip) - 1 ); +// strncpy(nid.szTip, bTerminateVeto ? STRING_QUICKSTARTACTIVE : STRING_QUICKSTARTINACTIVE, SAL_N_ELEMENTS(nid.szTip) - 1 ); nid.hIcon = hIconActive; - strncpy(nid.szTip, szTooltipString, elementsof(nid.szTip) - 1); + strncpy(nid.szTip, szTooltipString, SAL_N_ELEMENTS(nid.szTip) - 1); nid.uFlags = NIF_TIP|NIF_ICON; // update systray @@ -421,3 +422,5 @@ LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM) } return FALSE; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sysui/source/win32/QuickStart/QuickStart.h b/sysui/source/win32/QuickStart/QuickStart.h index d0afd98ec4..b61a04075e 100644 --- a/sysui/source/win32/QuickStart/QuickStart.h +++ b/sysui/source/win32/QuickStart/QuickStart.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #if !defined(AFX_QUICKSTART_H__7D38EE02_7699_4CF0_AFF9_FD92E05CC009__INCLUDED_) #define AFX_QUICKSTART_H__7D38EE02_7699_4CF0_AFF9_FD92E05CC009__INCLUDED_ @@ -10,3 +11,5 @@ #endif // !defined(AFX_QUICKSTART_H__7D38EE02_7699_4CF0_AFF9_FD92E05CC009__INCLUDED_) + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sysui/source/win32/QuickStart/StdAfx.h b/sysui/source/win32/QuickStart/StdAfx.h index 3a5bcf539c..88c24f4535 100644 --- a/sysui/source/win32/QuickStart/StdAfx.h +++ b/sysui/source/win32/QuickStart/StdAfx.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ // stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently @@ -37,3 +38,5 @@ // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_) + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sysui/source/win32/QuickStart/resource.h b/sysui/source/win32/QuickStart/resource.h index cd246c42e3..cd47c2ad1f 100644 --- a/sysui/source/win32/QuickStart/resource.h +++ b/sysui/source/win32/QuickStart/resource.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by QUICKSTART.RC @@ -30,3 +31,5 @@ #define _APS_NEXT_SYMED_VALUE 113 #endif #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sysui/source/win32/misc/AutoBuffer.cxx b/sysui/source/win32/misc/AutoBuffer.cxx index 76e6b588ad..c9f6a31812 100644 --- a/sysui/source/win32/misc/AutoBuffer.cxx +++ b/sysui/source/win32/misc/AutoBuffer.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 @@ void SAL_CALL CAutoUnicodeBuffer::init( ) empty( ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sysui/source/win32/misc/AutoBuffer.hxx b/sysui/source/win32/misc/AutoBuffer.hxx index 6f16a337cd..6e4b2d8206 100644 --- a/sysui/source/win32/misc/AutoBuffer.hxx +++ b/sysui/source/win32/misc/AutoBuffer.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,9 +35,7 @@ #include -#ifndef _RTL_USTRING_HXX_ #include -#endif //------------------------------------------------------------- // A simple unicode buffer management class, the class itself @@ -83,3 +82,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sysui/source/win32/misc/WinImplHelper.cxx b/sysui/source/win32/misc/WinImplHelper.cxx index 2af8729a91..de51993794 100644 --- a/sysui/source/win32/misc/WinImplHelper.cxx +++ b/sysui/source/win32/misc/WinImplHelper.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. @@ -132,7 +133,7 @@ void SAL_CALL ListboxAddItem( HWND hwnd, const Any& aItem, const Reference< XInt if ( !aItem.hasValue( ) || aItem.getValueType( ) != getCppuType((OUString*)0) ) throw IllegalArgumentException( - OUString::createFromAscii( "invalid value type or any has no value" ), + OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid value type or any has no value" )), rXInterface, aArgPos ); @@ -154,7 +155,7 @@ void SAL_CALL ListboxAddItems( HWND hwnd, const Any& aItemList, const Reference< if ( !aItemList.hasValue( ) || aItemList.getValueType( ) != getCppuType((Sequence*)0) ) throw IllegalArgumentException( - OUString::createFromAscii( "invalid value type or any has no value" ), + OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid value type or any has no value" )), rXInterface, aArgPos ); @@ -182,7 +183,7 @@ void SAL_CALL ListboxDeleteItem( HWND hwnd, const Any& aPosition, const Referenc (aPosition.getValueType( ) != getCppuType((sal_Int16*)0)) && (aPosition.getValueType( ) != getCppuType((sal_Int8*)0)) ) ) throw IllegalArgumentException( - OUString::createFromAscii( "invalid value type or any has no value" ), + OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid value type or any has no value" )), rXInterface, aArgPos ); @@ -195,7 +196,7 @@ void SAL_CALL ListboxDeleteItem( HWND hwnd, const Any& aPosition, const Referenc // index was not correct if ( CB_ERR == lRet ) throw IllegalArgumentException( - OUString::createFromAscii( "inavlid item position" ), + OUString(RTL_CONSTASCII_USTRINGPARAM( "inavlid item position" )), rXInterface, aArgPos ); } @@ -234,7 +235,7 @@ void SAL_CALL ListboxSetSelectedItem( HWND hwnd, const Any& aPosition, const Ref (aPosition.getValueType( ) != getCppuType((sal_Int16*)0)) && (aPosition.getValueType( ) != getCppuType((sal_Int8*)0)) ) ) throw IllegalArgumentException( - OUString::createFromAscii( "invalid value type or any has no value" ), + OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid value type or any has no value" )), rXInterface, aArgPos ); @@ -243,7 +244,7 @@ void SAL_CALL ListboxSetSelectedItem( HWND hwnd, const Any& aPosition, const Ref if ( nPos < -1 ) throw IllegalArgumentException( - OUString::createFromAscii("invalid index"), + OUString(RTL_CONSTASCII_USTRINGPARAM("invalid index")), rXInterface, aArgPos ); @@ -251,7 +252,7 @@ void SAL_CALL ListboxSetSelectedItem( HWND hwnd, const Any& aPosition, const Ref if ( (CB_ERR == lRet) && (-1 != nPos) ) throw IllegalArgumentException( - OUString::createFromAscii("invalid index"), + OUString(RTL_CONSTASCII_USTRINGPARAM("invalid index")), rXInterface, aArgPos ); } @@ -328,7 +329,7 @@ void SAL_CALL CheckboxSetState( if ( !aState.hasValue( ) || aState.getValueType( ) != getCppuType((sal_Bool*)0) ) throw IllegalArgumentException( - OUString::createFromAscii( "invalid value type or any has no value" ), + OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid value type or any has no value" )), rXInterface, aArgPos ); @@ -356,3 +357,5 @@ sal_uInt32 SAL_CALL _wcslenex( const sal_Unicode* pStr ) return strLen; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sysui/source/win32/misc/WinImplHelper.hxx b/sysui/source/win32/misc/WinImplHelper.hxx index c692e939bd..397c63c193 100644 --- a/sysui/source/win32/misc/WinImplHelper.hxx +++ b/sysui/source/win32/misc/WinImplHelper.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 -#ifndef _RTL_USTRING_HXX_ #include -#endif #include #include @@ -88,3 +87,5 @@ void SAL_CALL CheckboxSetState( sal_uInt32 SAL_CALL _wcslenex( const sal_Unicode* pStr ); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sysui/source/win32/misc/resourceprovider.cxx b/sysui/source/win32/misc/resourceprovider.cxx index 681f8e527e..b74e62996d 100644 --- a/sysui/source/win32/misc/resourceprovider.cxx +++ b/sysui/source/win32/misc/resourceprovider.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 @@ using namespace ::com::sun::star::ui::dialogs::CommonFilePickerElementIds; // id + 100 #define LB_LABEL_OFFSET 100 -const rtl::OUString TILDE = OUString::createFromAscii( "~" ); +const rtl::OUString TILDE = OUString(RTL_CONSTASCII_USTRINGPARAM( "~" )); const sal_Unicode TILDE_SIGN = L'~'; #define FOLDERPICKER_TITLE 500 @@ -227,3 +228,5 @@ OUString CResourceProvider::getResString( sal_Int32 aId ) { return m_pImpl->getResString( aId ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sysui/source/win32/misc/resourceprovider.hxx b/sysui/source/win32/misc/resourceprovider.hxx index b61e477acc..870585bfc6 100644 --- a/sysui/source/win32/misc/resourceprovider.hxx +++ b/sysui/source/win32/misc/resourceprovider.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 -#ifndef _RTL_USTRING_HXX_ #include -#endif //------------------------------------------------------------------------ // deklarations @@ -58,3 +57,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/inc/pch/precompiled_ucb.cxx b/ucb/inc/pch/precompiled_ucb.cxx index b913449afa..4d49c571cf 100644 --- a/ucb/inc/pch/precompiled_ucb.cxx +++ b/ucb/inc/pch/precompiled_ucb.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_ucb.hxx" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/inc/pch/precompiled_ucb.hxx b/ucb/inc/pch/precompiled_ucb.hxx index 48490e81f0..953d7d65b8 100644 --- a/ucb/inc/pch/precompiled_ucb.hxx +++ b/ucb/inc/pch/precompiled_ucb.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,6 +162,7 @@ #include "rtl/alloc.h" #include "rtl/memory.h" +#include "rtl/ref.hxx" #include "rtl/string.hxx" #include "rtl/ustrbuf.hxx" #include "rtl/ustring.h" @@ -174,11 +176,8 @@ #include "ucbhelper/macros.hxx" #include "ucbhelper/proxydecider.hxx" -#include "vos/diagnose.hxx" -#include "vos/mutex.hxx" -#include "vos/process.hxx" -#include "vos/ref.hxx" -#include "vos/refernce.hxx" //---MARKER--- #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/prj/d.lst b/ucb/prj/d.lst index 65a32e21fb..a8242541a5 100644 --- a/ucb/prj/d.lst +++ b/ucb/prj/d.lst @@ -23,6 +23,11 @@ ..\%__SRC%\lib\ucp*.uno.dylib %_DEST%\lib%_EXT%\ucp*.uno.dylib ..\%__SRC%\misc\ucp*.map %_DEST%\bin%_EXT%\ucp*.map ..\%__SRC%\misc\ucp*.sym %_DEST%\bin%_EXT%\ucp*.sym + +..\%__SRC%\slb\odma_lib.lib %_DEST%\lib%_EXT%\odma_lib.lib +..\source\ucp\odma\odma.h %_DEST%\inc%_EXT%\odma.h +..\source\ucp\odma\odma_lib.hxx %_DEST%\inc%_EXT%\odma_lib.hxx + ..\source\ucp\file\ucpfile.xml %_DEST%\xml%_EXT%\ucpfile.xml ..\source\ucp\ftp\ucpftp.xml %_DEST%\xml%_EXT%\ucpftp.xml ..\source\ucp\hierarchy\ucphier.xml %_DEST%\xml%_EXT%\ucphier.xml diff --git a/ucb/qa/complex/tdoc/_XChild.java b/ucb/qa/complex/tdoc/_XChild.java old mode 100755 new mode 100644 index 760fb32155..efc77f4bee --- a/ucb/qa/complex/tdoc/_XChild.java +++ b/ucb/qa/complex/tdoc/_XChild.java @@ -90,7 +90,7 @@ public class _XChild { oObj.setParent(gotten); } catch (com.sun.star.lang.NoSupportException ex) { - log.println("Exception occured during setParent() - " + (supported?"FAILED":"OK")); + log.println("Exception occurred during setParent() - " + (supported?"FAILED":"OK")); if (supported) { ex.printStackTrace((java.io.PrintWriter)log); return false; diff --git a/ucb/qa/complex/tdoc/_XServiceInfo.java b/ucb/qa/complex/tdoc/_XServiceInfo.java old mode 100755 new mode 100644 index 7b3bce1ffd..3a074ea971 --- a/ucb/qa/complex/tdoc/_XServiceInfo.java +++ b/ucb/qa/complex/tdoc/_XServiceInfo.java @@ -50,7 +50,7 @@ public class _XServiceInfo { /** * Just calls the method.

- * Has OK status if no runtime exceptions occured. + * Has OK status if no runtime exceptions occurred. */ public boolean _getImplementationName() { boolean result = true; @@ -66,7 +66,7 @@ public class _XServiceInfo { /** * Just calls the method.

- * Has OK status if no runtime exceptions occured. + * Has OK status if no runtime exceptions occurred. */ public boolean _getSupportedServiceNames() { boolean result = true; diff --git a/ucb/qa/complex/tdoc/_XTypeProvider.java b/ucb/qa/complex/tdoc/_XTypeProvider.java old mode 100755 new mode 100644 index 525800ad14..a5a0b1d5b8 --- a/ucb/qa/complex/tdoc/_XTypeProvider.java +++ b/ucb/qa/complex/tdoc/_XTypeProvider.java @@ -51,7 +51,7 @@ public class _XTypeProvider { /** * Just calls the method.

- * Has OK status if no runtime exceptions occured. + * Has OK status if no runtime exceptions occurred. */ public boolean _getImplementationId() { boolean result = true; diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx index b5efa2b9e9..12910f0b50 100644 --- a/ucb/source/cacher/cachedcontentresultset.cxx +++ b/ucb/source/cacher/cachedcontentresultset.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. @@ -443,10 +444,10 @@ public: throw( RuntimeException ); }; -OUString CCRS_PropertySetInfo::m_aPropertyNameForCount( OUString::createFromAscii( "RowCount" ) ); -OUString CCRS_PropertySetInfo::m_aPropertyNameForFinalCount( OUString::createFromAscii( "IsRowCountFinal" ) ); -OUString CCRS_PropertySetInfo::m_aPropertyNameForFetchSize( OUString::createFromAscii( "FetchSize" ) ); -OUString CCRS_PropertySetInfo::m_aPropertyNameForFetchDirection( OUString::createFromAscii( "FetchDirection" ) ); +OUString CCRS_PropertySetInfo::m_aPropertyNameForCount( RTL_CONSTASCII_USTRINGPARAM("RowCount") ); +OUString CCRS_PropertySetInfo::m_aPropertyNameForFinalCount( RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal") ); +OUString CCRS_PropertySetInfo::m_aPropertyNameForFetchSize( RTL_CONSTASCII_USTRINGPARAM("FetchSize") ); +OUString CCRS_PropertySetInfo::m_aPropertyNameForFetchDirection( RTL_CONSTASCII_USTRINGPARAM("FetchDirection") ); CCRS_PropertySetInfo::CCRS_PropertySetInfo( Reference< XPropertySetInfo > xInfo ) @@ -971,10 +972,10 @@ XTYPEPROVIDER_IMPL_11( CachedContentResultSet //-------------------------------------------------------------------------- XSERVICEINFO_NOFACTORY_IMPL_1( CachedContentResultSet, - OUString::createFromAscii( - "com.sun.star.comp.ucb.CachedContentResultSet" ), - OUString::createFromAscii( - CACHED_CONTENT_RESULTSET_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.CachedContentResultSet" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + CACHED_CONTENT_RESULTSET_SERVICE_NAME )) ); //-------------------------------------------------------------------------- // XPropertySet methods. ( inherited ) @@ -2150,8 +2151,8 @@ const Reference< XTypeConverter >& CachedContentResultSet::getTypeConverter() m_bTriedToGetTypeConverter = sal_True; m_xTypeConverter = Reference< XTypeConverter >( m_xSMgr->createInstance( - OUString::createFromAscii( - "com.sun.star.script.Converter" ) ), + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.script.Converter" )) ), UNO_QUERY ); OSL_ENSURE( m_xTypeConverter.is(), @@ -2200,10 +2201,10 @@ XTYPEPROVIDER_IMPL_3( CachedContentResultSetFactory, //-------------------------------------------------------------------------- XSERVICEINFO_IMPL_1( CachedContentResultSetFactory, - OUString::createFromAscii( - "com.sun.star.comp.ucb.CachedContentResultSetFactory" ), - OUString::createFromAscii( - CACHED_CONTENT_RESULTSET_FACTORY_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.CachedContentResultSetFactory" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + CACHED_CONTENT_RESULTSET_FACTORY_NAME )) ); //-------------------------------------------------------------------------- // Service factory implementation. @@ -2227,3 +2228,4 @@ Reference< XResultSet > SAL_CALL CachedContentResultSetFactory return xRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/cacher/cachedcontentresultset.hxx b/ucb/source/cacher/cachedcontentresultset.hxx index 8cca1605b8..44e48e7dc5 100644 --- a/ucb/source/cacher/cachedcontentresultset.hxx +++ b/ucb/source/cacher/cachedcontentresultset.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. @@ -519,3 +520,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/cacher/cachedcontentresultsetstub.cxx b/ucb/source/cacher/cachedcontentresultsetstub.cxx index 98ac358c67..9a87b67f52 100644 --- a/ucb/source/cacher/cachedcontentresultsetstub.cxx +++ b/ucb/source/cacher/cachedcontentresultsetstub.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. @@ -50,8 +51,8 @@ CachedContentResultSetStub::CachedContentResultSetStub( Reference< XResultSet > , m_bFirstFetchSizePropagationDone( sal_False ) , m_nLastFetchSize( 1 )//this value is not important at all , m_bLastFetchDirection( sal_True )//this value is not important at all - , m_aPropertyNameForFetchSize( OUString::createFromAscii( "FetchSize" ) ) - , m_aPropertyNameForFetchDirection( OUString::createFromAscii( "FetchDirection" ) ) + , m_aPropertyNameForFetchSize( OUString(RTL_CONSTASCII_USTRINGPARAM("FetchSize")) ) + , m_aPropertyNameForFetchDirection( OUString(RTL_CONSTASCII_USTRINGPARAM("FetchDirection")) ) { impl_init(); } @@ -165,73 +166,6 @@ Sequence< Type > SAL_CALL CachedContentResultSetStub } } return *pTypes; - /* - static cppu::OTypeCollection * pCollection = 0; - if (!pCollection) - { - osl::MutexGuard aGuard(osl::Mutex::getGlobalMutex()); - if (!pCollection) - { - static cppu::OTypeCollection - aTheCollection( - getCppuType( - static_cast< Reference< XTypeProvider > - const * >( - 0)), - getCppuType( - static_cast< Reference< XServiceInfo > - const * >( - 0)), - getCppuType( - static_cast< Reference< XComponent > - const * >( - 0)), - getCppuType( - static_cast< Reference< XCloseable > - const * >( - 0)), - getCppuType( - static_cast< Reference< XResultSetMetaDataSupplier > - const * >( - 0)), - getCppuType( - static_cast< Reference< XPropertySet > - const * >( - 0)), - getCppuType( - static_cast< Reference< XPropertyChangeListener > - const * >( - 0)), - getCppuType( - static_cast< Reference< XVetoableChangeListener > - const * >( - 0)), - getCppuType( - static_cast< Reference< XResultSet > - const * >( - 0)), - getCppuType( - static_cast< Reference< XContentAccess > - const * >( - 0)), - getCppuType( - static_cast< Reference< XRow > - const * >( - 0)), - getCppuType( - static_cast< Reference< XFetchProvider > - const * >( - 0)), - getCppuType( - static_cast< Reference< XFetchProviderForContentAccess > - const * >( - 0)) - ); - pCollection = &aTheCollection; - } - } - return pCollection->getTypes(); - */ } //-------------------------------------------------------------------------- @@ -239,10 +173,10 @@ Sequence< Type > SAL_CALL CachedContentResultSetStub //-------------------------------------------------------------------------- XSERVICEINFO_NOFACTORY_IMPL_1( CachedContentResultSetStub, - OUString::createFromAscii( - "com.sun.star.comp.ucb.CachedContentResultSetStub" ), - OUString::createFromAscii( - CACHED_CRS_STUB_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.CachedContentResultSetStub" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + CACHED_CRS_STUB_SERVICE_NAME )) ); //----------------------------------------------------------------- // XFetchProvider methods. @@ -598,10 +532,10 @@ XTYPEPROVIDER_IMPL_3( CachedContentResultSetStubFactory, //-------------------------------------------------------------------------- XSERVICEINFO_IMPL_1( CachedContentResultSetStubFactory, - OUString::createFromAscii( - "com.sun.star.comp.ucb.CachedContentResultSetStubFactory" ), - OUString::createFromAscii( - CACHED_CRS_STUB_FACTORY_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.CachedContentResultSetStubFactory" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + CACHED_CRS_STUB_FACTORY_NAME )) ); //-------------------------------------------------------------------------- // Service factory implementation. @@ -629,3 +563,4 @@ Reference< XResultSet > SAL_CALL CachedContentResultSetStubFactory } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/cacher/cachedcontentresultsetstub.hxx b/ucb/source/cacher/cachedcontentresultsetstub.hxx index 063315869d..217022d4e9 100644 --- a/ucb/source/cacher/cachedcontentresultsetstub.hxx +++ b/ucb/source/cacher/cachedcontentresultsetstub.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. @@ -200,3 +201,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/cacher/cacheddynamicresultset.cxx b/ucb/source/cacher/cacheddynamicresultset.cxx index c6badc9266..0384b486ab 100644 --- a/ucb/source/cacher/cacheddynamicresultset.cxx +++ b/ucb/source/cacher/cacheddynamicresultset.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,10 +121,10 @@ XTYPEPROVIDER_IMPL_4( CachedDynamicResultSet //-------------------------------------------------------------------------- XSERVICEINFO_NOFACTORY_IMPL_1( CachedDynamicResultSet, - OUString::createFromAscii( - "com.sun.star.comp.ucb.CachedDynamicResultSet" ), - OUString::createFromAscii( - CACHED_DRS_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.CachedDynamicResultSet" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + CACHED_DRS_SERVICE_NAME )) ); //-------------------------------------------------------------------------- // own methds. ( inherited ) @@ -176,10 +177,10 @@ XTYPEPROVIDER_IMPL_3( CachedDynamicResultSetFactory, //-------------------------------------------------------------------------- XSERVICEINFO_IMPL_1( CachedDynamicResultSetFactory, - OUString::createFromAscii( - "com.sun.star.comp.ucb.CachedDynamicResultSetFactory" ), - OUString::createFromAscii( - CACHED_DRS_FACTORY_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.CachedDynamicResultSetFactory" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + CACHED_DRS_FACTORY_NAME )) ); //-------------------------------------------------------------------------- // Service factory implementation. @@ -204,3 +205,4 @@ Reference< XDynamicResultSet > SAL_CALL CachedDynamicResultSetFactory } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/cacher/cacheddynamicresultset.hxx b/ucb/source/cacher/cacheddynamicresultset.hxx index f1ce145b03..54f2f090d4 100644 --- a/ucb/source/cacher/cacheddynamicresultset.hxx +++ b/ucb/source/cacher/cacheddynamicresultset.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. @@ -135,3 +136,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/cacher/cacheddynamicresultsetstub.cxx b/ucb/source/cacher/cacheddynamicresultsetstub.cxx index e719e037b9..3976e30540 100644 --- a/ucb/source/cacher/cacheddynamicresultsetstub.cxx +++ b/ucb/source/cacher/cacheddynamicresultsetstub.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. @@ -122,10 +123,10 @@ XTYPEPROVIDER_IMPL_5( CachedDynamicResultSetStub //-------------------------------------------------------------------------- XSERVICEINFO_NOFACTORY_IMPL_1( CachedDynamicResultSetStub, - OUString::createFromAscii( - "com.sun.star.comp.ucb.CachedDynamicResultSetStub" ), - OUString::createFromAscii( - CACHED_DRS_STUB_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.CachedDynamicResultSetStub" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + CACHED_DRS_STUB_SERVICE_NAME )) ); //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- @@ -166,10 +167,10 @@ XTYPEPROVIDER_IMPL_3( CachedDynamicResultSetStubFactory, //-------------------------------------------------------------------------- XSERVICEINFO_IMPL_1( CachedDynamicResultSetStubFactory, - OUString::createFromAscii( - "com.sun.star.comp.ucb.CachedDynamicResultSetStubFactory" ), - OUString::createFromAscii( - CACHED_DRS_STUB_FACTORY_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.CachedDynamicResultSetStubFactory" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + CACHED_DRS_STUB_FACTORY_NAME )) ); //-------------------------------------------------------------------------- // Service factory implementation. @@ -216,8 +217,8 @@ void SAL_CALL CachedDynamicResultSetStubFactory try { xSortFactory = Reference< XSortedDynamicResultSetFactory >( - m_xSMgr->createInstance( OUString::createFromAscii( - "com.sun.star.ucb.SortedDynamicResultSetFactory" ) ), + m_xSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ucb.SortedDynamicResultSetFactory" )) ), UNO_QUERY ); } catch ( Exception const & ) @@ -243,3 +244,4 @@ void SAL_CALL CachedDynamicResultSetStubFactory xTarget->setSource( xStub ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/cacher/cacheddynamicresultsetstub.hxx b/ucb/source/cacher/cacheddynamicresultsetstub.hxx index e5feb70e83..f84c67e1cb 100644 --- a/ucb/source/cacher/cacheddynamicresultsetstub.hxx +++ b/ucb/source/cacher/cacheddynamicresultsetstub.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. @@ -134,3 +135,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/cacher/cacheserv.cxx b/ucb/source/cacher/cacheserv.cxx index b9ed8e369a..82b419d931 100644 --- a/ucb/source/cacher/cacheserv.cxx +++ b/ucb/source/cacher/cacheserv.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. @@ -108,3 +109,4 @@ extern "C" void * SAL_CALL component_getFactory( return pRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx b/ucb/source/cacher/contentresultsetwrapper.cxx index a0b5df0524..ea307f5f9d 100644 --- a/ucb/source/cacher/contentresultsetwrapper.cxx +++ b/ucb/source/cacher/contentresultsetwrapper.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. @@ -319,7 +320,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper } aGuard.reacquire(); - rtl::OUString aName = OUString::createFromAscii( "ResultSetType" ); + rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("ResultSetType")); //find out, if we are ForwardOnly and cache the value: impl_init_xPropertySetOrigin(); @@ -1475,3 +1476,4 @@ void SAL_CALL ContentResultSetWrapperListener m_pOwner = NULL; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/cacher/contentresultsetwrapper.hxx b/ucb/source/cacher/contentresultsetwrapper.hxx index e9ff1b9a32..aa0c73eada 100644 --- a/ucb/source/cacher/contentresultsetwrapper.hxx +++ b/ucb/source/cacher/contentresultsetwrapper.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. @@ -585,3 +586,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/cacher/dynamicresultsetwrapper.cxx b/ucb/source/cacher/dynamicresultsetwrapper.cxx index 53ecdb17ca..b1f3a4ed2d 100644 --- a/ucb/source/cacher/dynamicresultsetwrapper.cxx +++ b/ucb/source/cacher/dynamicresultsetwrapper.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. @@ -427,8 +428,8 @@ void SAL_CALL DynamicResultSetWrapper { xStubFactory = Reference< XCachedDynamicResultSetStubFactory >( m_xSMgr->createInstance( - OUString::createFromAscii( - "com.sun.star.ucb.CachedDynamicResultSetStubFactory" ) ), + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ucb.CachedDynamicResultSetStubFactory" )) ), UNO_QUERY ); } catch ( Exception const & ) @@ -526,3 +527,4 @@ void SAL_CALL DynamicResultSetWrapperListener m_pOwner = NULL; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/cacher/dynamicresultsetwrapper.hxx b/ucb/source/cacher/dynamicresultsetwrapper.hxx index f5f5b47c9f..83416e1066 100644 --- a/ucb/source/cacher/dynamicresultsetwrapper.hxx +++ b/ucb/source/cacher/dynamicresultsetwrapper.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. @@ -227,3 +228,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/core/cmdenv.cxx b/ucb/source/core/cmdenv.cxx index e46418843d..4248b2e6cd 100755 --- a/ucb/source/core/cmdenv.cxx +++ b/ucb/source/core/cmdenv.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. @@ -189,3 +190,5 @@ UcbCommandEnvironment::createServiceFactory( UcbCommandEnvironment_CreateInstance, UcbCommandEnvironment::getSupportedServiceNames_Static() ) ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/core/cmdenv.hxx b/ucb/source/core/cmdenv.hxx index ee43eb0c78..09a3dff8d1 100644 --- a/ucb/source/core/cmdenv.hxx +++ b/ucb/source/core/cmdenv.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. @@ -100,3 +101,5 @@ private: } // namespace ucb_cmdenv #endif // INCLUDED_CMDENV_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/core/identify.cxx b/ucb/source/core/identify.cxx index 2a59aa5c4f..ca9b3a4b75 100644 --- a/ucb/source/core/identify.cxx +++ b/ucb/source/core/identify.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. @@ -114,3 +115,4 @@ OUString SAL_CALL ContentIdentifier::getContentProviderScheme() return m_aProviderScheme; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/core/identify.hxx b/ucb/source/core/identify.hxx index 28241cd302..e2a25a5eb6 100644 --- a/ucb/source/core/identify.hxx +++ b/ucb/source/core/identify.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. @@ -66,3 +67,5 @@ private: }; #endif /* !_IDENTIFY_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/core/providermap.hxx b/ucb/source/core/providermap.hxx index c27c3f092e..292707ea31 100644 --- a/ucb/source/core/providermap.hxx +++ b/ucb/source/core/providermap.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,4 @@ typedef ucb_impl::RegexpMap< ProviderList_Impl > ProviderMap_Impl; #endif // _UCB_PROVIDERMAP_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/core/provprox.cxx b/ucb/source/core/provprox.cxx index e37157bb10..d82167611e 100644 --- a/ucb/source/core/provprox.cxx +++ b/ucb/source/core/provprox.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. @@ -85,10 +86,10 @@ XTYPEPROVIDER_IMPL_3( UcbContentProviderProxyFactory, //========================================================================= XSERVICEINFO_IMPL_1( UcbContentProviderProxyFactory, - OUString::createFromAscii( - "com.sun.star.comp.ucb.UcbContentProviderProxyFactory" ), - OUString::createFromAscii( - PROVIDER_FACTORY_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.UcbContentProviderProxyFactory" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + PROVIDER_FACTORY_SERVICE_NAME )) ); //========================================================================= // @@ -213,10 +214,10 @@ Sequence< Type > SAL_CALL UcbContentProviderProxy::getTypes() //========================================================================= XSERVICEINFO_NOFACTORY_IMPL_1( UcbContentProviderProxy, - OUString::createFromAscii( - "com.sun.star.comp.ucb.UcbContentProviderProxy" ), - OUString::createFromAscii( - PROVIDER_PROXY_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.UcbContentProviderProxy" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + PROVIDER_PROXY_SERVICE_NAME )) ); //========================================================================= // @@ -347,7 +348,7 @@ UcbContentProviderProxy::getContentProvider() m_xProvider = Reference< XContentProvider >( m_xSMgr->createInstance( m_aService ), UNO_QUERY ); - if(m_aArguments.compareToAscii("NoConfig") == 0) + if(m_aArguments.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("NoConfig"))) { Reference xInit(m_xProvider,UNO_QUERY); if(xInit.is()) { @@ -399,3 +400,5 @@ UcbContentProviderProxy::getContentProvider() "UcbContentProviderProxy::getContentProvider - No provider!" ); return m_xTargetProvider; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/core/provprox.hxx b/ucb/source/core/provprox.hxx index 403ee6db8a..32c9a5aab3 100644 --- a/ucb/source/core/provprox.hxx +++ b/ucb/source/core/provprox.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. @@ -164,3 +165,5 @@ public: }; #endif /* !_PROVPROX_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx index 75a7f8bfc0..5088292de8 100644 --- a/ucb/source/core/ucb.cxx +++ b/ucb/source/core/ucb.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. @@ -350,10 +351,10 @@ void SAL_CALL UniversalContentBroker::removeEventListener( //========================================================================= XSERVICEINFO_IMPL_1( UniversalContentBroker, - OUString::createFromAscii( - "com.sun.star.comp.ucb.UniversalContentBroker" ), - OUString::createFromAscii( - UCB_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.UniversalContentBroker" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + UCB_SERVICE_NAME )) ); //========================================================================= // @@ -658,8 +659,8 @@ Any SAL_CALL UniversalContentBroker::execute( { ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); diff --git a/ucb/source/core/ucb.hxx b/ucb/source/core/ucb.hxx index f7318ad27d..8c5b434313 100644 --- a/ucb/source/core/ucb.hxx +++ b/ucb/source/core/ucb.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. @@ -218,3 +219,5 @@ private: }; #endif /* !_UCB_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx index d762b7fd67..77df54796a 100644 --- a/ucb/source/core/ucbcmds.cxx +++ b/ucb/source/core/ucbcmds.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. @@ -248,12 +249,12 @@ CommandProcessorInfo::CommandProcessorInfo() (*m_pInfo)[ 0 ] = ucb::CommandInfo( - rtl::OUString::createFromAscii( GETCOMMANDINFO_NAME ), // Name + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GETCOMMANDINFO_NAME )), // Name GETCOMMANDINFO_HANDLE, // Handle getCppuVoidType() ); // ArgType (*m_pInfo)[ 1 ] = ucb::CommandInfo( - rtl::OUString::createFromAscii( GLOBALTRANSFER_NAME ), // Name + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GLOBALTRANSFER_NAME )), // Name GLOBALTRANSFER_HANDLE, // Handle getCppuType( static_cast< @@ -508,7 +509,7 @@ bool setTitle( if ( aErrors[ 0 ].hasValue() ) { - // error occured. + // error occurred. OSL_ENSURE( sal_False, "error setting Title property!" ); return false; } @@ -633,7 +634,7 @@ uno::Reference< ucb::XContent > createNew( ucb::IOErrorCode_CANT_CREATE, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( "No types creatable!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No types creatable!")), rContext.xProcessor ); // Unreachable } @@ -699,8 +700,8 @@ uno::Reference< ucb::XContent > createNew( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Unknown transfer operation!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unknown transfer operation!" )), rContext.xProcessor, -1 ) ), rContext.xOrigEnv ); @@ -749,8 +750,8 @@ uno::Reference< ucb::XContent > createNew( ucb::IOErrorCode_CANT_CREATE, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "createNewContent failed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "createNewContent failed!" )), rContext.xProcessor ); // Unreachable } @@ -769,7 +770,7 @@ void transferProperties( throw( uno::Exception ) { ucb::Command aGetPropertySetInfoCommand( - rtl::OUString::createFromAscii( "getPropertySetInfo" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertySetInfo")), -1, uno::Any() ); @@ -790,8 +791,8 @@ void transferProperties( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "Unable to get propertyset info from source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to get propertyset info from source object!" )), rContext.xProcessor ); // Unreachable } @@ -799,7 +800,7 @@ void transferProperties( uno::Sequence< beans::Property > aAllProps = xInfo->getProperties(); ucb::Command aGetPropsCommand1( - rtl::OUString::createFromAscii( "getPropertyValues" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertyValues")), -1, uno::makeAny( aAllProps ) ); @@ -820,8 +821,8 @@ void transferProperties( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "Unable to get properties from source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to get properties from source object!" )), rContext.xProcessor ); // Unreachable } @@ -892,7 +893,7 @@ void transferProperties( if ( !bHasTitle && ( rContext.aArg.NewTitle.getLength() > 0 ) ) { aPropValues[ nWritePos ].Name - = rtl::OUString::createFromAscii( "Title" ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); aPropValues[ nWritePos ].Handle = -1; aPropValues[ nWritePos ].Value <<= rContext.aArg.NewTitle; @@ -904,7 +905,7 @@ void transferProperties( == ucb::TransferCommandOperation_LINK ) ) { aPropValues[ nWritePos ].Name - = rtl::OUString::createFromAscii( "TargetURL" ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")); aPropValues[ nWritePos ].Handle = -1; aPropValues[ nWritePos ].Value <<= rContext.aArg.SourceURL; @@ -916,7 +917,7 @@ void transferProperties( // Set properties at new object. ucb::Command aSetPropsCommand( - rtl::OUString::createFromAscii( "setPropertyValues" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("setPropertyValues")), -1, uno::makeAny( aPropValues ) ); @@ -951,7 +952,7 @@ uno::Reference< io::XInputStream > getInputStream( aArg.Properties = uno::Sequence< beans::Property >( 0 ); // unused ucb::Command aOpenCommand( - rtl::OUString::createFromAscii( "open" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("open")), -1, uno::makeAny( aArg ) ); @@ -979,7 +980,7 @@ uno::Reference< io::XInputStream > getInputStream( { uno::Reference< io::XOutputStream > xOutputStream( rContext.xSMgr->createInstance( - rtl::OUString::createFromAscii( "com.sun.star.io.Pipe" ) ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe")) ), uno::UNO_QUERY ); if ( xOutputStream.is() ) @@ -991,7 +992,7 @@ uno::Reference< io::XInputStream > getInputStream( aArg.Properties = uno::Sequence< beans::Property >( 0 ); ucb::Command aOpenCommand( - rtl::OUString::createFromAscii( "open" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("open")), -1, uno::makeAny( aArg ) ); @@ -1024,11 +1025,11 @@ uno::Reference< sdbc::XResultSet > getResultSet( uno::Sequence< beans::Property > aProps( 3 ); - aProps[ 0 ].Name = rtl::OUString::createFromAscii( "IsFolder" ); + aProps[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")); aProps[ 0 ].Handle = -1; /* unknown */ - aProps[ 1 ].Name = rtl::OUString::createFromAscii( "IsDocument" ); + aProps[ 1 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")); aProps[ 1 ].Handle = -1; /* unknown */ - aProps[ 2 ].Name = rtl::OUString::createFromAscii( "TargetURL" ); + aProps[ 2 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")); aProps[ 2 ].Handle = -1; /* unknown */ ucb::OpenCommandArgument2 aArg; @@ -1037,7 +1038,7 @@ uno::Reference< sdbc::XResultSet > getResultSet( aArg.Sink = 0; aArg.Properties = aProps; - ucb::Command aOpenCommand( rtl::OUString::createFromAscii( "open" ), + ucb::Command aOpenCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("open")), -1, uno::makeAny( aArg ) ); try @@ -1075,11 +1076,11 @@ void handleNameClashRename( // Obtain old title. uno::Sequence< beans::Property > aProps( 1 ); - aProps[ 0 ].Name = rtl::OUString::createFromAscii( "Title" ); + aProps[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); aProps[ 0 ].Handle = -1; ucb::Command aGetPropsCommand( - rtl::OUString::createFromAscii( "getPropertyValues" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertyValues")), -1, uno::makeAny( aProps ) ); @@ -1100,8 +1101,8 @@ void handleNameClashRename( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >( &aProps2, 1 ), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "Unable to get properties from new object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to get properties from new object!" )), rContext.xProcessor ); // Unreachable } @@ -1111,9 +1112,9 @@ void handleNameClashRename( { ucbhelper::cancelCommandExecution( uno::makeAny( beans::UnknownPropertyException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Unable to get property 'Title' " - "from new object!" ), + "from new object!" )), rContext.xProcessor ) ), rContext.xOrigEnv ); // Unreachable @@ -1132,7 +1133,7 @@ void handleNameClashRename( aOldTitlePre = aOldTitle; if ( nPos > 0 ) - aOldTitlePre += rtl::OUString::createFromAscii( "_" ); + aOldTitlePre += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_")); sal_Bool bContinue = sal_True; do @@ -1193,8 +1194,8 @@ void handleNameClashRename( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >( &aProps2, 1 ), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "Got no data stream from source!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Got no data stream from source!" )), rContext.xProcessor ); // Unreachable } @@ -1206,7 +1207,7 @@ void handleNameClashRename( aArg.ReplaceExisting = sal_False; ucb::Command aInsertCommand( - rtl::OUString::createFromAscii( "insert" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("insert")), -1, uno::makeAny( aArg ) ); @@ -1230,8 +1231,8 @@ void handleNameClashRename( ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedNameClashException( - rtl::OUString::createFromAscii( - "Unable to resolve name clash!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to resolve name clash!" )), rContext.xProcessor, ucb::NameClash::RENAME ) ), rContext.xOrigEnv ); @@ -1253,9 +1254,9 @@ void globalTransfer_( { ucbhelper::cancelCommandExecution( uno::makeAny( beans::UnknownPropertyException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Unable to get property 'IsFolder' " - "from source object!" ), + "from source object!" )), rContext.xProcessor ) ), rContext.xOrigEnv ); // Unreachable @@ -1267,9 +1268,9 @@ void globalTransfer_( { ucbhelper::cancelCommandExecution( uno::makeAny( beans::UnknownPropertyException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Unable to get property 'IsDocument' " - "from source object!" ), + "from source object!" )), rContext.xProcessor ) ), rContext.xOrigEnv ); // Unreachable @@ -1303,8 +1304,8 @@ void globalTransfer_( ucb::IOErrorCode_CANT_CREATE, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "No matching content type at target!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No matching content type at target!" )), rContext.xProcessor ); // Unreachable } @@ -1332,8 +1333,8 @@ void globalTransfer_( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "New content is not a XCommandProcessor!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "New content is not a XCommandProcessor!" )), rContext.xProcessor ); // Unreachable } @@ -1355,8 +1356,8 @@ void globalTransfer_( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "Source content is not a XCommandProcessor!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Source content is not a XCommandProcessor!" )), rContext.xProcessor ); // Unreachable } @@ -1425,7 +1426,7 @@ void globalTransfer_( try { ucb::Command aInsertCommand( - rtl::OUString::createFromAscii( "insert" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("insert")), -1, uno::makeAny( aArg ) ); @@ -1443,9 +1444,9 @@ void globalTransfer_( // No chance to solve name clashes, because I'm not able to detect // whether there is one. throw ucb::UnsupportedNameClashException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Unable to resolve name clashes, no chance to detect " - "that there is one!" ), + "that there is one!" )), rContext.xProcessor, rContext.aArg.NameClash ); } @@ -1471,9 +1472,9 @@ void globalTransfer_( ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedNameClashException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "BUG: insert + replace == true MUST NOT " - "throw NameClashException." ), + "throw NameClashException." )), rContext.xProcessor, rContext.aArg.NameClash ) ), rContext.xOrigEnv ); @@ -1616,8 +1617,8 @@ void globalTransfer_( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "Unable to get properties from children of source!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to get properties from children of source!" )), rContext.xProcessor ); // Unreachable } @@ -1639,8 +1640,8 @@ void globalTransfer_( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), rContext.xOrigEnv, - rtl::OUString::createFromAscii( - "Unable to get children of source!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to get children of source!" )), rContext.xProcessor ); // Unreachable } @@ -1696,7 +1697,7 @@ void globalTransfer_( aAny = xcp->execute( ucb::Command( - rtl::OUString::createFromAscii("getCommandInfo"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getCommandInfo")), -1, uno::Any()), 0, @@ -1791,8 +1792,8 @@ void UniversalContentBroker::globalTransfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Can't instanciate target object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Can't instanciate target object!" )), this ); // Unreachable } @@ -1816,8 +1817,8 @@ void UniversalContentBroker::globalTransfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Target content is not a XCommandProcessor!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Target content is not a XCommandProcessor!" )), this ); // Unreachable } @@ -1837,7 +1838,7 @@ void UniversalContentBroker::globalTransfer( try { ucb::Command aCommand( - rtl::OUString::createFromAscii( "transfer" ), // Name + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("transfer")), // Name -1, // Handle uno::makeAny( aTransferArg ) ); // Argument @@ -1873,7 +1874,7 @@ void UniversalContentBroker::globalTransfer( ucb::NameClash::ERROR ); ucb::Command aCommand1( - rtl::OUString::createFromAscii( "transfer" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("transfer")), -1, uno::makeAny( aTransferArg1 ) ); @@ -1980,8 +1981,8 @@ void UniversalContentBroker::globalTransfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Can't instanciate source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Can't instanciate source object!" )), this ); // Unreachable } @@ -2001,8 +2002,8 @@ void UniversalContentBroker::globalTransfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Source content is not a XCommandProcessor!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Source content is not a XCommandProcessor!" )), this ); // Unreachable } @@ -2011,17 +2012,17 @@ void UniversalContentBroker::globalTransfer( uno::Sequence< beans::Property > aProps( 4 ); - aProps[ 0 ].Name = rtl::OUString::createFromAscii( "IsFolder" ); + aProps[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")); aProps[ 0 ].Handle = -1; /* unknown */ - aProps[ 1 ].Name = rtl::OUString::createFromAscii( "IsDocument" ); + aProps[ 1 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")); aProps[ 1 ].Handle = -1; /* unknown */ - aProps[ 2 ].Name = rtl::OUString::createFromAscii( "TargetURL" ); + aProps[ 2 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")); aProps[ 2 ].Handle = -1; /* unknown */ - aProps[ 3 ].Name = rtl::OUString::createFromAscii( "BaseURI" ); + aProps[ 3 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BaseURI")); aProps[ 3 ].Handle = -1; /* unknown */ ucb::Command aGetPropsCommand( - rtl::OUString::createFromAscii( "getPropertyValues" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertyValues")), -1, uno::makeAny( aProps ) ); @@ -2041,8 +2042,8 @@ void UniversalContentBroker::globalTransfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps2, 1), xEnv, - rtl::OUString::createFromAscii( - "Unable to get properties from source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to get properties from source object!" )), this ); // Unreachable } @@ -2088,3 +2089,5 @@ void UniversalContentBroker::globalTransfer( } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/core/ucbcmds.hxx b/ucb/source/core/ucbcmds.hxx index 9e608216fb..4a760367d6 100644 --- a/ucb/source/core/ucbcmds.hxx +++ b/ucb/source/core/ucbcmds.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. @@ -41,3 +42,5 @@ #define GLOBALTRANSFER_HANDLE 1025 #endif /* !_UCBCMDS_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/core/ucbprops.cxx b/ucb/source/core/ucbprops.cxx index 2a66df86ad..a4011061cf 100644 --- a/ucb/source/core/ucbprops.cxx +++ b/ucb/source/core/ucbprops.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. @@ -357,10 +358,10 @@ XTYPEPROVIDER_IMPL_3( UcbPropertiesManager, //========================================================================= XSERVICEINFO_IMPL_1( UcbPropertiesManager, - OUString::createFromAscii( - "com.sun.star.comp.ucb.UcbPropertiesManager" ), - OUString::createFromAscii( - PROPERTIES_MANAGER_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.UcbPropertiesManager" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + PROPERTIES_MANAGER_SERVICE_NAME )) ); //========================================================================= // @@ -475,3 +476,4 @@ sal_Bool UcbPropertiesManager::queryProperty( return sal_False; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/core/ucbprops.hxx b/ucb/source/core/ucbprops.hxx index 4b5793b928..444dbf802a 100644 --- a/ucb/source/core/ucbprops.hxx +++ b/ucb/source/core/ucbprops.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. @@ -91,3 +92,4 @@ public: #endif /* !_UCBPROPS_HXX */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/core/ucbserv.cxx b/ucb/source/core/ucbserv.cxx index a0f28b8c55..213f769340 100644 --- a/ucb/source/core/ucbserv.cxx +++ b/ucb/source/core/ucbserv.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. @@ -119,3 +120,4 @@ extern "C" void * SAL_CALL component_getFactory( return pRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx index 9b4be3d28b..5b6be55f1d 100644 --- a/ucb/source/core/ucbstore.cxx +++ b/ucb/source/core/ucbstore.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. @@ -243,10 +244,10 @@ XTYPEPROVIDER_IMPL_4( UcbStore, //========================================================================= XSERVICEINFO_IMPL_1( UcbStore, - OUString::createFromAscii( - "com.sun.star.comp.ucb.UcbStore" ), - OUString::createFromAscii( - STORE_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.UcbStore" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + STORE_SERVICE_NAME )) ); //========================================================================= // @@ -382,10 +383,10 @@ XTYPEPROVIDER_IMPL_4( PropertySetRegistry, //========================================================================= XSERVICEINFO_NOFACTORY_IMPL_1( PropertySetRegistry, - OUString::createFromAscii( - "com.sun.star.comp.ucb.PropertySetRegistry" ), - OUString::createFromAscii( - PROPSET_REG_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.PropertySetRegistry" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + PROPSET_REG_SERVICE_NAME )) ); //========================================================================= // @@ -460,7 +461,7 @@ PropertySetRegistry::openPropertySet( const OUString& key, sal_Bool create ) // // Set Values // xNameReplace->replaceByName( -// OUString::createFromAscii( "Values" ), +// OUString(RTL_CONSTASCII_USTRINGPARAM("Values")), // makeAny( ... ) ); // Insert new item. @@ -844,7 +845,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, { rtl::OUString aOldValuesKey = makeHierarchalNameSegment( rOldKey ); - aOldValuesKey += OUString::createFromAscii( "/Values" ); + aOldValuesKey += OUString(RTL_CONSTASCII_USTRINGPARAM("/Values")); Reference< XNameAccess > xOldNameAccess; xRootHierNameAccess->getByHierarchicalName( @@ -866,7 +867,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, { rtl::OUString aNewValuesKey = makeHierarchalNameSegment( rNewKey ); - aNewValuesKey += OUString::createFromAscii( "/Values" ); + aNewValuesKey += OUString(RTL_CONSTASCII_USTRINGPARAM("/Values")); Reference< XSingleServiceFactory > xNewFac; xRootHierNameAccess->getByHierarchicalName( @@ -890,16 +891,12 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, return; } - aOldValuesKey += OUString::createFromAscii( "/" ); + aOldValuesKey += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - OUString aHandleKey - = OUString::createFromAscii( "/Handle" ); - OUString aValueKey - = OUString::createFromAscii( "/Value" ); - OUString aStateKey - = OUString::createFromAscii( "/State" ); - OUString aAttrKey - = OUString::createFromAscii( "/Attributes" ); + OUString aHandleKey(RTL_CONSTASCII_USTRINGPARAM("/Handle")); + OUString aValueKey(RTL_CONSTASCII_USTRINGPARAM("/Value")); + OUString aStateKey(RTL_CONSTASCII_USTRINGPARAM("/State")); + OUString aAttrKey(RTL_CONSTASCII_USTRINGPARAM("/Attributes")); for ( sal_Int32 n = 0; n < nCount; ++n ) { @@ -930,7 +927,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, xRootHierNameAccess->getByHierarchicalName( aNewKey1 ); xNewPropNameReplace->replaceByName( - OUString::createFromAscii( "Handle" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Handle")), aAny ); // ... value @@ -940,7 +937,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, xRootHierNameAccess->getByHierarchicalName( aNewKey1 ); xNewPropNameReplace->replaceByName( - OUString::createFromAscii( "Value" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Value")), aAny ); // ... state @@ -950,7 +947,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, xRootHierNameAccess->getByHierarchicalName( aNewKey1 ); xNewPropNameReplace->replaceByName( - OUString::createFromAscii( "State" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("State")), aAny ); // ... attributes @@ -960,7 +957,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, xRootHierNameAccess->getByHierarchicalName( aNewKey1 ); xNewPropNameReplace->replaceByName( - OUString::createFromAscii( "Attributes" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Attributes")), aAny ); // Insert new item. @@ -1090,9 +1087,9 @@ Reference< XMultiServiceFactory > PropertySetRegistry::getConfigProvider() m_pImpl->m_xConfigProvider = Reference< XMultiServiceFactory >( m_xSMgr->createInstance( - OUString::createFromAscii( + OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration." - "ConfigurationProvider" ) ), + "ConfigurationProvider" )) ), UNO_QUERY ); OSL_ENSURE( m_pImpl->m_xConfigProvider.is(), @@ -1148,8 +1145,8 @@ Reference< XInterface > PropertySetRegistry::getRootConfigReadAccess() m_pImpl->m_xRootReadAccess = m_pImpl->m_xConfigProvider->createInstanceWithArguments( - OUString::createFromAscii( - "com.sun.star.configuration.ConfigurationAccess" ), + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.configuration.ConfigurationAccess" )), aArguments ); if ( m_pImpl->m_xRootReadAccess.is() ) @@ -1220,8 +1217,8 @@ Reference< XInterface > PropertySetRegistry::getConfigWriteAccess( m_pImpl->m_xRootWriteAccess = m_pImpl->m_xConfigProvider->createInstanceWithArguments( - OUString::createFromAscii( - "com.sun.star.configuration.ConfigurationUpdateAccess" ), + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.configuration.ConfigurationUpdateAccess" )), aArguments ); OSL_ENSURE( m_pImpl->m_xRootWriteAccess.is(), @@ -1400,10 +1397,10 @@ XTYPEPROVIDER_IMPL_8( PersistentPropertySet, //========================================================================= XSERVICEINFO_NOFACTORY_IMPL_1( PersistentPropertySet, - OUString::createFromAscii( - "com.sun.star.comp.ucb.PersistentPropertySet" ), - OUString::createFromAscii( - PERS_PROPSET_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.PersistentPropertySet" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + PERS_PROPSET_SERVICE_NAME )) ); //========================================================================= // @@ -1506,7 +1503,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( if ( xRootHierNameAccess.is() ) { OUString aFullPropName( getFullKey() ); - aFullPropName += OUString::createFromAscii( "/" ); + aFullPropName += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aFullPropName += makeHierarchalNameSegment( aPropertyName ); // Does property exist? @@ -1525,7 +1522,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( { // Obtain old value OUString aValueName = aFullPropName; - aValueName += OUString::createFromAscii( "/Value" ); + aValueName += OUString(RTL_CONSTASCII_USTRINGPARAM("/Value")); Any aOldValue = xRootHierNameAccess->getByHierarchicalName( aValueName ); @@ -1538,7 +1535,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( // Write value xNameReplace->replaceByName( - OUString::createFromAscii( "Value" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Value")), aValue ); // Write state ( Now it is a directly set value ) @@ -1556,7 +1553,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValue( { // Obtain handle aValueName = aFullPropName; - aValueName += OUString::createFromAscii( "/Handle" ); + aValueName += OUString(RTL_CONSTASCII_USTRINGPARAM("/Handle")); sal_Int32 nHandle = -1; xRootHierNameAccess->getByHierarchicalName( aValueName ) >>= nHandle; @@ -1612,9 +1609,9 @@ Any SAL_CALL PersistentPropertySet::getPropertyValue( if ( xNameAccess.is() ) { OUString aFullPropName( getFullKey() ); - aFullPropName += OUString::createFromAscii( "/" ); + aFullPropName += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aFullPropName += makeHierarchalNameSegment( PropertyName ); - aFullPropName += OUString::createFromAscii( "/Value" ); + aFullPropName += OUString(RTL_CONSTASCII_USTRINGPARAM("/Value")); try { return xNameAccess->getByHierarchicalName( aFullPropName ); @@ -1773,7 +1770,7 @@ void SAL_CALL PersistentPropertySet::addProperty( { aFullValuesName = getFullKey(); OUString aFullPropName = aFullValuesName; - aFullPropName += OUString::createFromAscii( "/" ); + aFullPropName += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aFullPropName += makeHierarchalNameSegment( Name ); if ( xRootHierNameAccess->hasByHierarchicalName( aFullPropName ) ) @@ -1819,12 +1816,12 @@ void SAL_CALL PersistentPropertySet::addProperty( // Set handle xNameReplace->replaceByName( - OUString::createFromAscii( "Handle" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Handle")), makeAny( sal_Int32( -1 ) ) ); // Set default value xNameReplace->replaceByName( - OUString::createFromAscii( "Value" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Value")), DefaultValue ); // Set state ( always "default" ) @@ -1836,7 +1833,7 @@ void SAL_CALL PersistentPropertySet::addProperty( // Set attributes xNameReplace->replaceByName( - OUString::createFromAscii( "Attributes" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Attributes")), makeAny( sal_Int32( Attributes ) ) ); // Insert new item. @@ -1929,7 +1926,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name ) { aFullValuesName = getFullKey(); aFullPropName = aFullValuesName; - aFullPropName += OUString::createFromAscii( "/" ); + aFullPropName += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aFullPropName += makeHierarchalNameSegment( Name ); // Property in set? @@ -1940,7 +1937,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name ) try { OUString aFullAttrName = aFullPropName; - aFullAttrName += OUString::createFromAscii( "/Attributes" ); + aFullAttrName += OUString(RTL_CONSTASCII_USTRINGPARAM("/Attributes")); sal_Int32 nAttribs = 0; if ( xRootHierNameAccess->getByHierarchicalName( aFullAttrName ) @@ -2000,7 +1997,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name ) { OUString aFullHandleName = aFullPropName; aFullHandleName - += OUString::createFromAscii( "/Handle" ); + += OUString(RTL_CONSTASCII_USTRINGPARAM("/Handle")); if ( ! ( xRootHierNameAccess->getByHierarchicalName( aFullHandleName ) >>= nHandle ) ) @@ -2134,12 +2131,9 @@ Sequence< PropertyValue > SAL_CALL PersistentPropertySet::getPropertyValues() { Sequence< PropertyValue > aValues( nCount ); - const OUString aHandleName - = OUString::createFromAscii( "/Handle" ); - const OUString aValueName - = OUString::createFromAscii( "/Value" ); - const OUString aStateName - = OUString::createFromAscii( "/State" ); + const OUString aHandleName(RTL_CONSTASCII_USTRINGPARAM("/Handle")); + const OUString aValueName(RTL_CONSTASCII_USTRINGPARAM("/Value")); + const OUString aStateName(RTL_CONSTASCII_USTRINGPARAM("/State")); for ( sal_Int32 n = 0; n < nCount; ++n ) { @@ -2264,7 +2258,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValues( Events aEvents; OUString aFullPropNamePrefix( getFullKey() ); - aFullPropNamePrefix += OUString::createFromAscii( "/" ); + aFullPropNamePrefix += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); // Iterate over given property value sequence. for ( sal_Int32 n = 0; n < nCount; ++n ) @@ -2291,18 +2285,18 @@ void SAL_CALL PersistentPropertySet::setPropertyValues( { // Write handle xNameReplace->replaceByName( - OUString::createFromAscii( "Handle" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Handle")), makeAny( rNewValue.Handle ) ); // Save old value OUString aValueName = aFullPropName; - aValueName += OUString::createFromAscii( "/Value" ); + aValueName += OUString(RTL_CONSTASCII_USTRINGPARAM("/Value")); Any aOldValue = xRootHierNameAccess->getByHierarchicalName( aValueName ); // Write value xNameReplace->replaceByName( - OUString::createFromAscii( "Value" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Value")), rNewValue.Value ); // Write state ( Now it is a directly set value ) @@ -2356,7 +2350,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValues( while ( it != end ) { notifyPropertyChangeEvent( (*it) ); - it++; + ++it; } } @@ -2544,12 +2538,9 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties() if ( xHierNameAccess.is() ) { - const OUString aHandleName - = OUString::createFromAscii( "/Handle" ); - const OUString aValueName - = OUString::createFromAscii( "/Value" ); - const OUString aAttrName - = OUString::createFromAscii( "/Attributes" ); + const OUString aHandleName(RTL_CONSTASCII_USTRINGPARAM("/Handle")); + const OUString aValueName(RTL_CONSTASCII_USTRINGPARAM("/Value")); + const OUString aAttrName(RTL_CONSTASCII_USTRINGPARAM("/Attributes")); Property* pProps = pPropSeq->getArray(); @@ -2671,7 +2662,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName( if ( xRootHierNameAccess.is() ) { OUString aFullPropName( m_pOwner->getFullKey() ); - aFullPropName += OUString::createFromAscii( "/" ); + aFullPropName += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aFullPropName += makeHierarchalNameSegment( aName ); // Does property exist? @@ -2684,7 +2675,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName( // Obtain handle. OUString aKey = aFullPropName; - aKey += OUString::createFromAscii( "/Handle" ); + aKey += OUString(RTL_CONSTASCII_USTRINGPARAM("/Handle")); if ( !( xRootHierNameAccess->getByHierarchicalName( aKey ) >>= aProp.Handle ) ) @@ -2697,7 +2688,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName( // Obtain Value and extract type. aKey = aFullPropName; - aKey += OUString::createFromAscii( "/Value" ); + aKey += OUString(RTL_CONSTASCII_USTRINGPARAM("/Value")); Any aValue = xRootHierNameAccess->getByHierarchicalName( aKey ); if ( !aValue.hasValue() ) @@ -2712,7 +2703,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName( // Obtain Attributes. aKey = aFullPropName; - aKey += OUString::createFromAscii( "/Attributes" ); + aKey += OUString(RTL_CONSTASCII_USTRINGPARAM("/Attributes")); sal_Int32 nAttribs = 0; if ( xRootHierNameAccess->getByHierarchicalName( aKey ) @@ -2759,7 +2750,7 @@ sal_Bool SAL_CALL PropertySetInfo_Impl::hasPropertyByName( if ( xRootHierNameAccess.is() ) { OUString aFullPropName( m_pOwner->getFullKey() ); - aFullPropName += OUString::createFromAscii( "/" ); + aFullPropName += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aFullPropName += makeHierarchalNameSegment( Name ); return xRootHierNameAccess->hasByHierarchicalName( aFullPropName ); @@ -2768,3 +2759,4 @@ sal_Bool SAL_CALL PropertySetInfo_Impl::hasPropertyByName( return sal_False; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/core/ucbstore.hxx b/ucb/source/core/ucbstore.hxx index e1043adf0a..f9c153b80d 100644 --- a/ucb/source/core/ucbstore.hxx +++ b/ucb/source/core/ucbstore.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. @@ -343,3 +344,5 @@ public: }; #endif /* !_UCBSTORE_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/inc/regexp.hxx b/ucb/source/inc/regexp.hxx index 7126b3cbe7..84beaba797 100644 --- a/ucb/source/inc/regexp.hxx +++ b/ucb/source/inc/regexp.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. @@ -82,3 +83,4 @@ inline bool Regexp::operator ==(Regexp const & rOther) const #endif // _UCB_REGEXP_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/inc/regexpmap.hxx b/ucb/source/inc/regexpmap.hxx index 1027424b08..9f3c6383bf 100644 --- a/ucb/source/inc/regexpmap.hxx +++ b/ucb/source/inc/regexpmap.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. @@ -186,3 +187,4 @@ inline bool operator !=(ucb_impl::RegexpMapConstIter< Val > const & rIter1, #endif // _UCB_REGEXPMAP_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/regexp/regexp.cxx b/ucb/source/regexp/regexp.cxx index cb5d972217..b61772efb9 100644 --- a/ucb/source/regexp/regexp.cxx +++ b/ucb/source/regexp/regexp.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. @@ -60,7 +61,7 @@ inline Regexp::Regexp(Kind eTheKind, rtl::OUString const & rThePrefix, m_bTranslation(bTheTranslation) { OSL_ASSERT(m_eKind == KIND_DOMAIN - || !m_bEmptyDomain && m_aInfix.getLength() == 0); + || (!m_bEmptyDomain && m_aInfix.getLength() == 0)); OSL_ASSERT(m_bTranslation || m_aReversePrefix.getLength() == 0); } @@ -471,3 +472,4 @@ Regexp Regexp::parse(rtl::OUString const & rRegexp) } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx index 39d273bc18..d3a666cdd9 100644 --- a/ucb/source/sorter/sortdynres.cxx +++ b/ucb/source/sorter/sortdynres.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. @@ -135,10 +136,10 @@ XTYPEPROVIDER_IMPL_3( SortedDynamicResultSet, //-------------------------------------------------------------------------- XSERVICEINFO_NOFACTORY_IMPL_1( SortedDynamicResultSet, - OUString::createFromAscii( - "com.sun.star.comp.ucb.SortedDynamicResultSet" ), - OUString::createFromAscii( - DYNAMIC_RESULTSET_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.SortedDynamicResultSet" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + DYNAMIC_RESULTSET_SERVICE_NAME )) ); //-------------------------------------------------------------------------- // XComponent methods. @@ -254,8 +255,8 @@ SortedDynamicResultSet::connectToCache( { xStubFactory = Reference< XCachedDynamicResultSetStubFactory >( mxSMgr->createInstance( - OUString::createFromAscii( - "com.sun.star.ucb.CachedDynamicResultSetStubFactory" ) ), + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ucb.CachedDynamicResultSetStubFactory" )) ), UNO_QUERY ); } catch ( Exception const & ) @@ -340,7 +341,7 @@ SortedDynamicResultSet::impl_notify( const ListEvent& Changes ) Any aRet; try { - aRet = pCurSet->getPropertyValue( OUString::createFromAscii( "IsRowCountFinal" ) ); + aRet = pCurSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) ); } catch ( UnknownPropertyException ) {} catch ( WrappedTargetException ) {} @@ -511,10 +512,10 @@ XTYPEPROVIDER_IMPL_3( SortedDynamicResultSetFactory, //-------------------------------------------------------------------------- XSERVICEINFO_IMPL_1( SortedDynamicResultSetFactory, - OUString::createFromAscii( - "com.sun.star.comp.ucb.SortedDynamicResultSetFactory" ), - OUString::createFromAscii( - DYNAMIC_RESULTSET_FACTORY_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.SortedDynamicResultSetFactory" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + DYNAMIC_RESULTSET_FACTORY_NAME )) ); //-------------------------------------------------------------------------- // Service factory implementation. @@ -626,3 +627,4 @@ SortedDynamicResultSetListener::impl_OwnerDies() mpOwner = NULL; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/sorter/sortdynres.hxx b/ucb/source/sorter/sortdynres.hxx index 27b9fc4326..adf60a4fbd 100644 --- a/ucb/source/sorter/sortdynres.hxx +++ b/ucb/source/sorter/sortdynres.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. @@ -255,3 +256,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/sorter/sortmain.cxx b/ucb/source/sorter/sortmain.cxx index 1f533c3948..2220e736e3 100644 --- a/ucb/source/sorter/sortmain.cxx +++ b/ucb/source/sorter/sortmain.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,3 +74,4 @@ extern "C" void * SAL_CALL component_getFactory( return pRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx index e49de7a394..02f2d05be8 100644 --- a/ucb/source/sorter/sortresult.cxx +++ b/ucb/source/sorter/sortresult.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. @@ -247,10 +248,10 @@ XTYPEPROVIDER_IMPL_9( SortedResultSet, //-------------------------------------------------------------------------- XSERVICEINFO_NOFACTORY_IMPL_1( SortedResultSet, - OUString::createFromAscii( - "com.sun.star.comp.ucb.SortedResultSet" ), - OUString::createFromAscii( - RESULTSET_SERVICE_NAME ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.SortedResultSet" )), + OUString(RTL_CONSTASCII_USTRINGPARAM( + RESULTSET_SERVICE_NAME )) ); //-------------------------------------------------------------------------- // XComponent methods. @@ -937,7 +938,6 @@ Any SAL_CALL SortedResultSet::getPropertyValue( const OUString& PropertyName ) } else if ( PropertyName.compareToAscii( "IsRowCountFinal" ) == 0 ) { - sal_uInt32 nOrgCount = 0; sal_Bool bOrgFinal = false; Any aOrgRet; @@ -950,7 +950,8 @@ Any SAL_CALL SortedResultSet::getPropertyValue( const OUString& PropertyName ) if ( bOrgFinal ) { aOrgRet = Reference< XPropertySet >::query(mxOriginal)-> - getPropertyValue( OUString::createFromAscii( "RowCount" ) ); + getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ); + sal_uInt32 nOrgCount = 0; aOrgRet >>= nOrgCount; if ( nOrgCount == maS2O.Count() ) aRet <<= (sal_Bool) sal_True; @@ -1468,7 +1469,7 @@ void SortedResultSet::Initialize( // insert some dummy entries first and replace then // the entries with the right ones - sal_uInt32 i; + size_t i; for ( i=1; i>= bIsFinal) && bIsFinal != bWasFinal ) { @@ -2002,12 +2003,12 @@ void SimpleList::Replace( void* pData, sal_uInt32 nPos ) SRSPropertySetInfo::SRSPropertySetInfo() { - maProps[0].Name = OUString::createFromAscii( "RowCount" ); + maProps[0].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")); maProps[0].Handle = -1; maProps[0].Type = ::getCppuType( (const OUString*) NULL ); maProps[0].Attributes = -1; - maProps[1].Name = OUString::createFromAscii( "IsRowCountFinal" ); + maProps[1].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")); maProps[1].Handle = -1; maProps[1].Type = ::getBooleanCppuType(); maProps[1].Attributes = -1; @@ -2068,3 +2069,4 @@ SRSPropertySetInfo::hasPropertyByName( const OUString& Name ) return sal_False; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/sorter/sortresult.hxx b/ucb/source/sorter/sortresult.hxx index 95d59f0b52..5c337ec081 100644 --- a/ucb/source/sorter/sortresult.hxx +++ b/ucb/source/sorter/sortresult.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. @@ -453,3 +454,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/expand/ucpexpand.cxx b/ucb/source/ucp/expand/ucpexpand.cxx index 7f691ece8c..f5fb2dbe86 100644 --- a/ucb/source/ucp/expand/ucpexpand.cxx +++ b/ucb/source/ucp/expand/ucpexpand.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. @@ -283,3 +284,5 @@ void * SAL_CALL component_getFactory( } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ext/makefile.mk b/ucb/source/ucp/ext/makefile.mk deleted file mode 100644 index e106b8e1ba..0000000000 --- a/ucb/source/ucp/ext/makefile.mk +++ /dev/null @@ -1,73 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4 $ -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ = ..$/..$/.. -PRJNAME = ucb -TARGET = ucpext.uno -ENABLE_EXCEPTIONS = TRUE - -.INCLUDE : settings.mk -DLLPRE = - -SLOFILES= \ - $(SLO)$/ucpext_provider.obj \ - $(SLO)$/ucpext_content.obj \ - $(SLO)$/ucpext_services.obj \ - $(SLO)$/ucpext_resultset.obj \ - $(SLO)$/ucpext_datasupplier.obj - -SHL1STDLIBS = \ - $(UCBHELPERLIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) \ - $(SALHELPERLIB) - -SHL1VERSIONMAP = $(SOLARENV)/src/component.map -SHL1TARGET = $(TARGET) - -SHL1DEPN = -SHL1IMPLIB = i$(TARGET) -SHL1LIBS = $(SLB)$/$(TARGET).lib -SHL1DEF = $(MISC)$/$(SHL1TARGET).def - -DEF1NAME = $(SHL1TARGET) - -.INCLUDE : target.mk - -ALLTAR : $(MISC)/ucpext.component - -$(MISC)/ucpext.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - ucpext.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt ucpext.component diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx index 5b9adebe18..b2f9b117a1 100644 --- a/ucb/source/ucp/file/bc.cxx +++ b/ucb/source/ucp/file/bc.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,9 +34,7 @@ #include "osl/diagnose.h" #include -#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBBUTE_HPP_ #include -#endif #include #include #include @@ -51,9 +50,7 @@ #include "filrow.hxx" #include "bc.hxx" #include "prov.hxx" -#ifndef _FILERROR_HXX_ #include "filerror.hxx" -#endif #include "filinsreq.hxx" @@ -270,7 +267,7 @@ rtl::OUString SAL_CALL BaseContent::getImplementationName() throw( RuntimeException) { - return rtl::OUString::createFromAscii( "com.sun.star.comp.ucb.FileContent" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ucb.FileContent")); } @@ -279,7 +276,7 @@ sal_Bool SAL_CALL BaseContent::supportsService( const rtl::OUString& ServiceName ) throw( RuntimeException) { - if( ServiceName.compareToAscii( "com.sun.star.ucb.FileContent" ) == 0 ) + if (ServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.ucb.FileContent"))) return true; else return false; @@ -292,7 +289,7 @@ BaseContent::getSupportedServiceNames() throw( RuntimeException ) { Sequence< rtl::OUString > ret( 1 ); - ret[0] = rtl::OUString::createFromAscii( "com.sun.star.ucb.FileContent" ); + ret[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.FileContent")); return ret; } @@ -352,15 +349,15 @@ BaseContent::execute( const Command& aCommand, Any aAny; - if( ! aCommand.Name.compareToAscii( "getPropertySetInfo" ) ) // No exceptions + if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getPropertySetInfo"))) // No exceptions { aAny <<= getPropertySetInfo( CommandId ); } - else if( ! aCommand.Name.compareToAscii( "getCommandInfo" ) ) // no exceptions + else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getCommandInfo"))) // no exceptions { aAny <<= getCommandInfo(); } - else if( ! aCommand.Name.compareToAscii( "setPropertyValues" ) ) + else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("setPropertyValues"))) { Sequence< beans::PropertyValue > sPropertyValues; @@ -370,7 +367,7 @@ BaseContent::execute( const Command& aCommand, else aAny <<= setPropertyValues( CommandId,sPropertyValues ); // calls endTask by itself } - else if( ! aCommand.Name.compareToAscii( "getPropertyValues" ) ) + else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getPropertyValues"))) { Sequence< beans::Property > ListOfRequestedProperties; @@ -381,7 +378,7 @@ BaseContent::execute( const Command& aCommand, aAny <<= getPropertyValues( CommandId, ListOfRequestedProperties ); } - else if( ! aCommand.Name.compareToAscii( "open" ) ) + else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("open"))) { OpenCommandArgument2 aOpenArgument; if( ! ( aCommand.Argument >>= aOpenArgument ) ) @@ -394,7 +391,7 @@ BaseContent::execute( const Command& aCommand, aAny <<= result; } } - else if( ! aCommand.Name.compareToAscii( "delete" ) ) + else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("delete"))) { if( ! aCommand.Argument.has< sal_Bool >() ) m_pMyShell->installError( CommandId, @@ -402,7 +399,7 @@ BaseContent::execute( const Command& aCommand, else deleteContent( CommandId ); } - else if( ! aCommand.Name.compareToAscii( "transfer" ) ) + else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("transfer"))) { TransferInfo aTransferInfo; if( ! ( aCommand.Argument >>= aTransferInfo ) ) @@ -411,7 +408,7 @@ BaseContent::execute( const Command& aCommand, else transfer( CommandId, aTransferInfo ); } - else if( ! aCommand.Name.compareToAscii( "insert" ) ) + else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("insert"))) { InsertCommandArgument aInsertArgument; if( ! ( aCommand.Argument >>= aInsertArgument ) ) @@ -420,11 +417,11 @@ BaseContent::execute( const Command& aCommand, else insert( CommandId,aInsertArgument ); } - else if( ! aCommand.Name.compareToAscii( "getCasePreservingURL" ) ) + else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getCasePreservingURL"))) { Sequence< beans::Property > seq(1); seq[0] = beans::Property( - rtl::OUString::createFromAscii("CasePreservingURL"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CasePreservingURL")), -1, getCppuType( static_cast< sal_Bool* >(0) ), 0 ); @@ -839,16 +836,16 @@ BaseContent::getPropertyValues( const beans::Property& rProp = pProps[ n ]; Any& rValue = pValues[ n ]; - if( rProp.Name.compareToAscii( "ContentType" ) == 0 ) + if (rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ContentType"))) { rValue <<= m_bFolder ? m_pMyShell->FolderContentType : m_pMyShell->FileContentType; } - else if( rProp.Name.compareToAscii( "IsFolder" ) == 0 ) + else if (rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsFolder"))) { rValue <<= m_bFolder; } - else if( rProp.Name.compareToAscii( "IsDocument" ) == 0 ) + else if (rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsDocument"))) { rValue <<= sal_Bool( !m_bFolder ); } @@ -875,7 +872,7 @@ BaseContent::setPropertyValues( return Sequence< Any >( Values.getLength() ); } - const rtl::OUString Title = rtl::OUString::createFromAscii( "Title" ); + const rtl::OUString Title(RTL_CONSTASCII_USTRINGPARAM("Title")); // Special handling for files which have to be inserted if( m_nState & JustInserted ) @@ -929,7 +926,7 @@ BaseContent::setPropertyValues( // m_aUncPath contains parent's URI. if( m_aUncPath.lastIndexOf( sal_Unicode('/') ) != m_aUncPath.getLength() - 1 ) - m_aUncPath += rtl::OUString::createFromAscii("/"); + m_aUncPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); m_aUncPath += rtl::Uri::encode( NewTitle, rtl_UriCharClassPchar, @@ -970,7 +967,7 @@ BaseContent::setPropertyValues( rtl::OUString aDstName = getParentName( m_aUncPath ); if( aDstName.lastIndexOf( sal_Unicode('/') ) != aDstName.getLength() - 1 ) - aDstName += rtl::OUString::createFromAscii("/"); + aDstName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aDstName += rtl::Uri::encode( NewTitle, rtl_UriCharClassPchar, @@ -1132,7 +1129,7 @@ BaseContent::transfer( sal_Int32 nMyCommandIdentifier, // Is destination a document or a folder ? Sequence< beans::Property > seq(1); - seq[0] = beans::Property( rtl::OUString::createFromAscii("IsDocument"), + seq[0] = beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), -1, getCppuType( static_cast< sal_Bool* >(0) ), 0 ); @@ -1155,7 +1152,7 @@ BaseContent::transfer( sal_Int32 nMyCommandIdentifier, // as child dstUncPath = m_aUncPath; - dstUncPath += ( rtl::OUString::createFromAscii( "/" ) + NewTitle ); + dstUncPath += ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + NewTitle ); sal_Int32 NameClash = aTransferInfo.NameClash; @@ -1201,7 +1198,7 @@ void SAL_CALL BaseContent::insert( sal_Int32 nMyCommandIdentifier, sal_Bool bDocument = false; Sequence< beans::Property > seq(1); - seq[0] = beans::Property( rtl::OUString::createFromAscii("IsDocument"), + seq[0] = beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), -1, getCppuType( static_cast< sal_Bool* >(0) ), 0 ); @@ -1267,7 +1264,7 @@ void SAL_CALL BaseContent::insert( sal_Int32 nMyCommandIdentifier, m_pMyShell->clearError( nMyCommandIdentifier ); m_aUncPath = getParentName( m_aUncPath ); if( m_aUncPath.lastIndexOf( sal_Unicode('/') ) != m_aUncPath.getLength() - 1 ) - m_aUncPath += rtl::OUString::createFromAscii("/"); + m_aUncPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); m_aUncPath += rtl::Uri::encode( aRequestImpl->newName(), rtl_UriCharClassPchar, @@ -1407,3 +1404,5 @@ rtl::OUString BaseContent::getKey( void ) { return m_aUncPath; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/bc.hxx b/ucb/source/ucp/file/bc.hxx index f62b262808..5b4298fb1d 100644 --- a/ucb/source/ucp/file/bc.hxx +++ b/ucb/source/ucp/file/bc.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,9 +41,7 @@ #include #include #include -#ifndef _COM_SUN_STAR_UCB_XRESULTSET_HPP_ #include -#endif #include #include #include @@ -59,9 +58,7 @@ #include #include #include -#ifndef _COM_SUN_STAR_UCB_SHELL_HXX_ #include "shell.hxx" -#endif namespace fileaccess { @@ -351,3 +348,4 @@ namespace fileaccess { #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filcmd.cxx b/ucb/source/ucp/file/filcmd.cxx index 23bc660a45..c86608dbc3 100644 --- a/ucb/source/ucp/file/filcmd.cxx +++ b/ucb/source/ucp/file/filcmd.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,3 +140,5 @@ XCommandInfo_impl::hasCommandByHandle( return false; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filcmd.hxx b/ucb/source/ucp/file/filcmd.hxx index ddd8fa5487..10285ac3bd 100644 --- a/ucb/source/ucp/file/filcmd.hxx +++ b/ucb/source/ucp/file/filcmd.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. @@ -106,3 +107,5 @@ namespace fileaccess { } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filerror.hxx b/ucb/source/ucp/file/filerror.hxx index c605f826ac..67bc001a53 100644 --- a/ucb/source/ucp/file/filerror.hxx +++ b/ucb/source/ucp/file/filerror.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,4 @@ namespace fileaccess { +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx index 2a3df432fb..3b7af59ede 100644 --- a/ucb/source/ucp/file/filglob.cxx +++ b/ucb/source/ucp/file/filglob.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. @@ -29,9 +30,7 @@ #include "precompiled_ucb.hxx" #include #include "filglob.hxx" -#ifndef _FILERROR_HXX_ #include "filerror.hxx" -#endif #include "shell.hxx" #include "bc.hxx" #include @@ -223,10 +222,10 @@ namespace fileaccess { rtl::OUString aParent = aFileName.copy( 0,lastIndex ); if( aParent[ aParent.getLength()-1] == sal_Unicode(':') && aParent.getLength() == 6 ) - aParent += rtl::OUString::createFromAscii( "/" ); + aParent += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - if( 0 == aParent.compareToAscii( "file://" ) ) - aParent = rtl::OUString::createFromAscii( "file:///" ); + if( aParent.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("file://")) ) + aParent = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///")); return aParent; } @@ -390,7 +389,7 @@ namespace fileaccess { xEnv, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "an error occured during file opening")), + "an error occurred during file opening")), xComProc); } else if( errorCode == TASKHANDLING_OPEN_FOR_DIRECTORYLISTING || @@ -445,7 +444,7 @@ namespace fileaccess { xEnv, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "an error occured during opening a directory")), + "an error occurred during opening a directory")), xComProc); } else if( errorCode == TASKHANDLING_NOTCONNECTED_FOR_WRITE || @@ -462,7 +461,7 @@ namespace fileaccess { xEnv, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "an error occured writing or reading from a file")), + "an error occurred writing or reading from a file")), xComProc ); } else if( errorCode == TASKHANDLING_FILEIOERROR_FOR_NO_SPACE ) @@ -528,7 +527,7 @@ namespace fileaccess { xEnv, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "an error occured during opening a file")), + "an error occurred during opening a file")), xComProc); } else if( errorCode == TASKHANDLING_NONAMESET_INSERT_COMMAND || @@ -537,8 +536,8 @@ namespace fileaccess { Sequence< ::rtl::OUString > aSeq( 1 ); aSeq[0] = ( errorCode == TASKHANDLING_NONAMESET_INSERT_COMMAND ) ? - rtl::OUString::createFromAscii( "Title" ) : - rtl::OUString::createFromAscii( "ContentType" ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) : + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")); aAny <<= MissingPropertiesException( rtl::OUString( @@ -604,7 +603,7 @@ namespace fileaccess { InteractiveAugmentedIOException excep; excep.Code = IOErrorCode_INVALID_CHARACTER; PropertyValue prop; - prop.Name = rtl::OUString::createFromAscii("ResourceName"); + prop.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ResourceName")); prop.Handle = -1; rtl::OUString m_aClashingName( rtl::Uri::decode( @@ -952,3 +951,5 @@ namespace fileaccess { } // end namespace fileaccess + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filglob.hxx b/ucb/source/ucp/file/filglob.hxx index e3464ba7a3..e4e745aa67 100644 --- a/ucb/source/ucp/file/filglob.hxx +++ b/ucb/source/ucp/file/filglob.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 @@ namespace fileaccess { } // end namespace fileaccess #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filid.cxx b/ucb/source/ucp/file/filid.cxx index 88abcc1fb4..3a4ba0797d 100644 --- a/ucb/source/ucp/file/filid.cxx +++ b/ucb/source/ucp/file/filid.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. @@ -146,3 +147,5 @@ FileContentIdentifier::getContentProviderScheme( { return m_aProviderScheme; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filid.hxx b/ucb/source/ucp/file/filid.hxx index 12d1a44fd9..bf3c4e5238 100644 --- a/ucb/source/ucp/file/filid.hxx +++ b/ucb/source/ucp/file/filid.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. @@ -100,3 +101,5 @@ namespace fileaccess { #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filinl.hxx b/ucb/source/ucp/file/filinl.hxx index 22205d9e84..dea296572b 100644 --- a/ucb/source/ucp/file/filinl.hxx +++ b/ucb/source/ucp/file/filinl.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. @@ -74,3 +75,5 @@ inline void SAL_CALL shell::MyProperty::setAttributes( const sal_Int16& __Attrib #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filinpstr.cxx b/ucb/source/ucp/file/filinpstr.cxx index f9ff8d4da0..368a1299e0 100644 --- a/ucb/source/ucp/file/filinpstr.cxx +++ b/ucb/source/ucp/file/filinpstr.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. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_ucb.hxx" #include "filinpstr.hxx" -#ifndef _FILERROR_HXX_ #include "filerror.hxx" -#endif #include "shell.hxx" #include "prov.hxx" @@ -49,9 +48,9 @@ XInputStream_impl::XInputStream_impl( shell* pMyShell,const rtl::OUString& aUncP m_nErrorCode( TASKHANDLER_NO_ERROR ), m_nMinorErrorCode( TASKHANDLER_NO_ERROR ) { - sal_uInt32 nFlags = OpenFlag_Read; + sal_uInt32 nFlags = osl_File_OpenFlag_Read; if ( !bLock ) - nFlags |= OpenFlag_NoLock; + nFlags |= osl_File_OpenFlag_NoLock; osl::FileBase::RC err = m_aFile.open( nFlags ); if( err != osl::FileBase::E_None ) @@ -260,3 +259,5 @@ XInputStream_impl::getLength( else return sal_Int64( uEndPos ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filinpstr.hxx b/ucb/source/ucp/file/filinpstr.hxx index 05e5672751..bdc35d8320 100644 --- a/ucb/source/ucp/file/filinpstr.hxx +++ b/ucb/source/ucp/file/filinpstr.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. @@ -162,3 +163,5 @@ namespace fileaccess { } // end namespace XInputStream_impl #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filinsreq.cxx b/ucb/source/ucp/file/filinsreq.cxx index 986db15430..6597713c35 100644 --- a/ucb/source/ucp/file/filinsreq.cxx +++ b/ucb/source/ucp/file/filinsreq.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. @@ -206,7 +207,7 @@ XInteractionRequestImpl::getRequest() InteractiveAugmentedIOException excep; excep.Code = IOErrorCode_INVALID_CHARACTER; PropertyValue prop; - prop.Name = rtl::OUString::createFromAscii("ResourceName"); + prop.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ResourceName")); prop.Handle = -1; prop.Value <<= m_aClashingName; Sequence seq(1); @@ -222,3 +223,5 @@ XInteractionRequestImpl::getRequest() } return aAny; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filinsreq.hxx b/ucb/source/ucp/file/filinsreq.hxx index 617809965d..6b069cb3f0 100644 --- a/ucb/source/ucp/file/filinsreq.hxx +++ b/ucb/source/ucp/file/filinsreq.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. @@ -238,3 +239,5 @@ namespace fileaccess { #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filnot.cxx b/ucb/source/ucp/file/filnot.cxx index 3abb89adcd..ea128f382d 100644 --- a/ucb/source/ucp/file/filnot.cxx +++ b/ucb/source/ucp/file/filnot.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. @@ -267,3 +268,5 @@ void PropertyChangeNotifier::notifyPropertyChanged( } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filnot.hxx b/ucb/source/ucp/file/filnot.hxx index 46b808ab86..d0582431c6 100644 --- a/ucb/source/ucp/file/filnot.hxx +++ b/ucb/source/ucp/file/filnot.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. @@ -135,3 +136,5 @@ namespace fileaccess { } // end namespace fileaccess #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filprp.cxx b/ucb/source/ucp/file/filprp.cxx index 9e45763d18..1db269e4df 100644 --- a/ucb/source/ucp/file/filprp.cxx +++ b/ucb/source/ucp/file/filprp.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. @@ -149,3 +150,5 @@ XPropertySetInfo_impl::hasPropertyByName( if( m_seq[i].Name == aName ) return true; return false; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filprp.hxx b/ucb/source/ucp/file/filprp.hxx index 6a62bc4567..879a1c65af 100644 --- a/ucb/source/ucp/file/filprp.hxx +++ b/ucb/source/ucp/file/filprp.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. @@ -95,3 +96,4 @@ namespace fileaccess { #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filrec.cxx b/ucb/source/ucp/file/filrec.cxx index 424ece5df2..a4a07b02ca 100644 --- a/ucb/source/ucp/file/filrec.cxx +++ b/ucb/source/ucp/file/filrec.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,7 +46,7 @@ sal_Bool ReconnectingFile::reconnect() { disconnect(); if ( m_aFile.open( m_nFlags ) == ::osl::FileBase::E_None - || m_aFile.open( OpenFlag_Read ) == ::osl::FileBase::E_None ) + || m_aFile.open( osl_File_OpenFlag_Read ) == ::osl::FileBase::E_None ) { m_bDisconnect = sal_False; bResult = sal_True; @@ -60,8 +61,8 @@ sal_Bool ReconnectingFile::reconnect() ::osl::FileBase::RC nResult = m_aFile.open( uFlags ); if ( nResult == ::osl::FileBase::E_None ) { - if ( uFlags & OpenFlag_Create ) - m_nFlags = (uFlags & ( ~OpenFlag_Create )) | OpenFlag_Write; + if ( uFlags & osl_File_OpenFlag_Create ) + m_nFlags = (uFlags & ( ~osl_File_OpenFlag_Create )) | osl_File_OpenFlag_Write; else m_nFlags = uFlags; @@ -199,3 +200,4 @@ sal_Bool ReconnectingFile::reconnect() } // namespace fileaccess +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filrec.hxx b/ucb/source/ucp/file/filrec.hxx index de8def9077..432e005889 100644 --- a/ucb/source/ucp/file/filrec.hxx +++ b/ucb/source/ucp/file/filrec.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. @@ -84,3 +85,4 @@ public: } // namespace fileaccess #endif // _FILREC_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filrow.cxx b/ucb/source/ucp/file/filrow.cxx index 0b2ad97aea..70314ca336 100644 --- a/ucb/source/ucp/file/filrow.cxx +++ b/ucb/source/ucp/file/filrow.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. @@ -55,7 +56,7 @@ sal_Bool convert( shell* pShell, { xConverter = uno::Reference< script::XTypeConverter >( pShell->m_xMultiServiceFactory->createInstance( - rtl::OUString::createFromAscii( "com.sun.star.script.Converter" ) ),uno::UNO_QUERY ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter")) ), uno::UNO_QUERY ); /* DBG_ASSERT( m_xTypeConverter.is(), "PropertyValueSet::getTypeConverter() - " @@ -427,3 +428,5 @@ XRow_impl::getArray( Value ); return Value; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filrow.hxx b/ucb/source/ucp/file/filrow.hxx index 9d7b0bff09..baca86162e 100644 --- a/ucb/source/ucp/file/filrow.hxx +++ b/ucb/source/ucp/file/filrow.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. @@ -202,3 +203,5 @@ namespace fileaccess { } // end namespace fileaccess #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx index e0bd6a0080..84a94bb2fd 100644 --- a/ucb/source/ucp/file/filrset.cxx +++ b/ucb/source/ucp/file/filrset.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,7 @@ #include "prov.hxx" #include -#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBBUTE_HPP_ #include -#endif #include #include #include @@ -238,7 +237,7 @@ void XResultSet_impl::rowCountChanged() aOldValue = aNewValue-1; } beans::PropertyChangeEvent aEv; - aEv.PropertyName = rtl::OUString::createFromAscii( "RowCount" ); + aEv.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")); aEv.Further = false; aEv.PropertyHandle = -1; aEv.OldValue <<= aOldValue; @@ -263,7 +262,7 @@ void XResultSet_impl::isFinalChanged() m_bRowCountFinal = true; } beans::PropertyChangeEvent aEv; - aEv.PropertyName = rtl::OUString::createFromAscii( "IsRowCountFinal" ); + aEv.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")); aEv.Further = false; aEv.PropertyHandle = -1; sal_Bool fval = false; @@ -735,8 +734,8 @@ XResultSet_impl::connectToCache( xStubFactory = uno::Reference< ucb::XCachedDynamicResultSetStubFactory >( mxSMgr->createInstance( - rtl::OUString::createFromAscii( - "com.sun.star.ucb.CachedDynamicResultSetStubFactory" ) ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ucb.CachedDynamicResultSetStubFactory" )) ), uno::UNO_QUERY ); } catch ( uno::Exception const & ) @@ -807,12 +806,12 @@ XResultSet_impl::getPropertySetInfo() { uno::Sequence< beans::Property > seq(2); - seq[0].Name = rtl::OUString::createFromAscii( "RowCount" ); + seq[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")); seq[0].Handle = -1; seq[0].Type = getCppuType( static_cast< sal_Int32* >(0) ); seq[0].Attributes = beans::PropertyAttribute::READONLY; - seq[0].Name = rtl::OUString::createFromAscii( "IsRowCountFinal" ); + seq[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")); seq[0].Handle = -1; seq[0].Type = getCppuType( static_cast< sal_Bool* >(0) ); seq[0].Attributes = beans::PropertyAttribute::READONLY; @@ -832,8 +831,8 @@ void SAL_CALL XResultSet_impl::setPropertyValue( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) || - aPropertyName == rtl::OUString::createFromAscii( "RowCount" ) ) + if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) || + aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) return; throw beans::UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); } @@ -845,13 +844,13 @@ uno::Any SAL_CALL XResultSet_impl::getPropertyValue( lang::WrappedTargetException, uno::RuntimeException) { - if( PropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) ) + if( PropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) ) { uno::Any aAny; aAny <<= m_bRowCountFinal; return aAny; } - else if ( PropertyName == rtl::OUString::createFromAscii( "RowCount" ) ) + else if ( PropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) { uno::Any aAny; sal_Int32 count = sal::static_int_cast(m_aItems.size()); @@ -870,7 +869,7 @@ void SAL_CALL XResultSet_impl::addPropertyChangeListener( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) ) + if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) ) { osl::MutexGuard aGuard( m_aMutex ); if ( ! m_pIsFinalListeners ) @@ -879,7 +878,7 @@ void SAL_CALL XResultSet_impl::addPropertyChangeListener( m_pIsFinalListeners->addInterface( xListener ); } - else if ( aPropertyName == rtl::OUString::createFromAscii( "RowCount" ) ) + else if ( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) { osl::MutexGuard aGuard( m_aMutex ); if ( ! m_pRowCountListeners ) @@ -899,13 +898,13 @@ void SAL_CALL XResultSet_impl::removePropertyChangeListener( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) && + if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) && m_pIsFinalListeners ) { osl::MutexGuard aGuard( m_aMutex ); m_pIsFinalListeners->removeInterface( aListener ); } - else if ( aPropertyName == rtl::OUString::createFromAscii( "RowCount" ) && + else if ( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) && m_pRowCountListeners ) { osl::MutexGuard aGuard( m_aMutex ); @@ -934,3 +933,5 @@ void SAL_CALL XResultSet_impl::removeVetoableChangeListener( uno::RuntimeException) { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filrset.hxx b/ucb/source/ucp/file/filrset.hxx index 329889af6c..83e17fe6ef 100644 --- a/ucb/source/ucp/file/filrset.hxx +++ b/ucb/source/ucp/file/filrset.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 _FILRSET_HXX_ #define _FILRSET_HXX_ -#ifndef __SGI_STL_VECTOR #include -#endif #include #include @@ -40,9 +39,7 @@ #include #include #include -#ifndef _COM_SUN_STAR_UCB_XDYNAMICRESULTSET_HPP__ #include -#endif #include #include #include @@ -681,3 +678,5 @@ namespace fileaccess { #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx index 494413acc0..5a28a4c138 100644 --- a/ucb/source/ucp/file/filstr.cxx +++ b/ucb/source/ucp/file/filstr.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. @@ -109,9 +110,9 @@ XStream_impl::XStream_impl( shell* pMyShell,const rtl::OUString& aUncPath, sal_B m_nErrorCode( TASKHANDLER_NO_ERROR ), m_nMinorErrorCode( TASKHANDLER_NO_ERROR ) { - sal_uInt32 nFlags = ( OpenFlag_Read | OpenFlag_Write ); + sal_uInt32 nFlags = ( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write ); if ( !bLock ) - nFlags |= OpenFlag_NoLock; + nFlags |= osl_File_OpenFlag_NoLock; osl::FileBase::RC err = m_aFile.open( nFlags ); if( err != osl::FileBase::E_None ) @@ -302,8 +303,8 @@ XStream_impl::closeStream( if( err != osl::FileBase::E_None ) { io::IOException ex; - ex.Message = rtl::OUString::createFromAscii( - "could not close file"); + ex.Message = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "could not close file")); throw ex; } @@ -402,3 +403,5 @@ void XStream_impl::waitForCompletion() static_cast< OWeakObject * >(this)); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filstr.hxx b/ucb/source/ucp/file/filstr.hxx index 393eda0c6c..c846c73f7c 100644 --- a/ucb/source/ucp/file/filstr.hxx +++ b/ucb/source/ucp/file/filstr.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. @@ -244,3 +245,5 @@ namespace fileaccess { } // end namespace XStream_impl #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx index df0b85e4fa..dd151311d8 100644 --- a/ucb/source/ucp/file/filtask.cxx +++ b/ucb/source/ucp/file/filtask.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. @@ -182,3 +183,5 @@ void SAL_CALL TaskManager::handleTask( it->second.setHandled(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/filtask.hxx b/ucb/source/ucp/file/filtask.hxx index 610e251ebb..0b499c98bf 100644 --- a/ucb/source/ucp/file/filtask.hxx +++ b/ucb/source/ucp/file/filtask.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,7 +93,7 @@ namespace fileaccess m_bHandled = true; } - bool isHandled() + bool isHandled() const { return true; } @@ -223,3 +224,5 @@ namespace fileaccess }; } // end namespace TaskHandling + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx index 04a51d7f70..afe831eeb7 100644 --- a/ucb/source/ucp/file/prov.cxx +++ b/ucb/source/ucp/file/prov.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,6 @@ #include #ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBBUTE_HPP_ #include -#endif #include #include #include "filglob.hxx" @@ -210,7 +210,7 @@ FileProvider::supportsService( const rtl::OUString& ServiceName ) throw( RuntimeException ) { - return ServiceName == rtl::OUString::createFromAscii( "com.sun.star.ucb.FileContentProvider" ); + return ServiceName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.FileContentProvider")); } @@ -415,17 +415,17 @@ private: XPropertySetInfoImpl2::XPropertySetInfoImpl2() : m_seq( 3 ) { - m_seq[0] = Property( rtl::OUString::createFromAscii( "HostName" ), + m_seq[0] = Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HostName")), -1, getCppuType( static_cast< rtl::OUString* >( 0 ) ), PropertyAttribute::READONLY ); - m_seq[1] = Property( rtl::OUString::createFromAscii( "HomeDirectory" ), + m_seq[1] = Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HomeDirectory")), -1, getCppuType( static_cast< rtl::OUString* >( 0 ) ), PropertyAttribute::READONLY ); - m_seq[2] = Property( rtl::OUString::createFromAscii( "FileSystemNotation" ), + m_seq[2] = Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FileSystemNotation")), -1, getCppuType( static_cast< sal_Int32* >( 0 ) ), PropertyAttribute::READONLY ); @@ -682,3 +682,4 @@ rtl::OUString SAL_CALL FileProvider::getSystemPathFromFileURL( const rtl::OUStri return aSystemPath; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/prov.hxx b/ucb/source/ucp/file/prov.hxx index 30fc55b9fc..be5d9356e2 100644 --- a/ucb/source/ucp/file/prov.hxx +++ b/ucb/source/ucp/file/prov.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. @@ -236,3 +237,4 @@ namespace fileaccess { #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx index 52f88a4807..f7cfab840d 100644 --- a/ucb/source/ucp/file/shell.cxx +++ b/ucb/source/ucp/file/shell.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. @@ -166,7 +167,7 @@ shell::shell( const uno::Reference< lang::XMultiServiceFactory >& xMultiServiceF m_bWithConfig( bWithConfig ), m_pProvider( pProvider ), m_xMultiServiceFactory( xMultiServiceFactory ), - Title( rtl::OUString::createFromAscii( "Title" ) ), + Title( RTL_CONSTASCII_USTRINGPARAM("Title") ), CasePreservingURL( rtl::OUString::createFromAscii( "CasePreservingURL" ) ), IsDocument( rtl::OUString::createFromAscii( "IsDocument" ) ), @@ -363,35 +364,35 @@ shell::shell( const uno::Reference< lang::XMultiServiceFactory >& xMultiServiceF | beans::PropertyAttribute::READONLY ) ); // Commands - m_sCommandInfo[0].Name = rtl::OUString::createFromAscii( "getCommandInfo" ); + m_sCommandInfo[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getCommandInfo")); m_sCommandInfo[0].Handle = -1; m_sCommandInfo[0].ArgType = getCppuVoidType(); - m_sCommandInfo[1].Name = rtl::OUString::createFromAscii( "getPropertySetInfo" ); + m_sCommandInfo[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertySetInfo")); m_sCommandInfo[1].Handle = -1; m_sCommandInfo[1].ArgType = getCppuVoidType(); - m_sCommandInfo[2].Name = rtl::OUString::createFromAscii( "getPropertyValues" ); + m_sCommandInfo[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertyValues")); m_sCommandInfo[2].Handle = -1; m_sCommandInfo[2].ArgType = getCppuType( static_cast< uno::Sequence< beans::Property >* >( 0 ) ); - m_sCommandInfo[3].Name = rtl::OUString::createFromAscii( "setPropertyValues" ); + m_sCommandInfo[3].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("setPropertyValues")); m_sCommandInfo[3].Handle = -1; m_sCommandInfo[3].ArgType = getCppuType( static_cast< uno::Sequence< beans::PropertyValue >* >( 0 ) ); - m_sCommandInfo[4].Name = rtl::OUString::createFromAscii( "open" ); + m_sCommandInfo[4].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("open")); m_sCommandInfo[4].Handle = -1; m_sCommandInfo[4].ArgType = getCppuType( static_cast< OpenCommandArgument* >( 0 ) ); - m_sCommandInfo[5].Name = rtl::OUString::createFromAscii( "transfer" ); + m_sCommandInfo[5].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("transfer")); m_sCommandInfo[5].Handle = -1; m_sCommandInfo[5].ArgType = getCppuType( static_cast< TransferInfo* >( 0 ) ); - m_sCommandInfo[6].Name = rtl::OUString::createFromAscii( "delete" ); + m_sCommandInfo[6].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")); m_sCommandInfo[6].Handle = -1; m_sCommandInfo[6].ArgType = getCppuType( static_cast< sal_Bool* >( 0 ) ); - m_sCommandInfo[7].Name = rtl::OUString::createFromAscii( "insert" ); + m_sCommandInfo[7].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("insert")); m_sCommandInfo[7].Handle = -1; m_sCommandInfo[7].ArgType = getCppuType( static_cast< InsertCommandArgument* > ( 0 ) ); @@ -401,7 +402,7 @@ shell::shell( const uno::Reference< lang::XMultiServiceFactory >& xMultiServiceF if(m_bWithConfig) { - rtl::OUString Store = rtl::OUString::createFromAscii( "com.sun.star.ucb.Store" ); + rtl::OUString Store(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.Store")); uno::Reference< XPropertySetRegistryFactory > xRegFac( m_xMultiServiceFactory->createInstance( Store ), uno::UNO_QUERY ); @@ -593,7 +594,7 @@ void SAL_CALL shell::page( sal_Int32 CommandId, { uno::Reference< XContentProvider > xProvider( m_pProvider ); osl::File aFile( aUnqPath ); - osl::FileBase::RC err = aFile.open( OpenFlag_Read ); + osl::FileBase::RC err = aFile.open( osl_File_OpenFlag_Read ); if( err != osl::FileBase::E_None ) { @@ -904,7 +905,7 @@ shell::setv( const rtl::OUString& aUnqPath, { // valid value for the size osl::File aFile(aUnqPath); bool err = - aFile.open(OpenFlag_Write) != osl::FileBase::E_None || + aFile.open(osl_File_OpenFlag_Write) != osl::FileBase::E_None || aFile.setSize(sal_uInt64(newSize)) != osl::FileBase::E_None || aFile.close() != osl::FileBase::E_None; @@ -913,7 +914,7 @@ shell::setv( const rtl::OUString& aUnqPath, --propChanged; // unsuccessful setting uno::Sequence< uno::Any > names( 1 ); ret[0] <<= beans::PropertyValue( - rtl::OUString::createFromAscii("Uri"), -1, + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")), -1, uno::makeAny(aUnqPath), beans::PropertyState_DIRECT_VALUE); IOErrorCode ioError(IOErrorCode_GENERAL); @@ -977,7 +978,7 @@ shell::setv( const rtl::OUString& aUnqPath, --propChanged; // unsuccessful setting uno::Sequence< uno::Any > names( 1 ); names[0] <<= beans::PropertyValue( - rtl::OUString::createFromAscii("Uri"), -1, + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")), -1, uno::makeAny(aUnqPath), beans::PropertyState_DIRECT_VALUE); IOErrorCode ioError; @@ -1207,7 +1208,7 @@ shell::move( sal_Int32 CommandId, { newDstUnqPath = dstUnqPath; - rtl::OUString aPostFix( rtl::OUString::createFromAscii( "_" ) ); + rtl::OUString aPostFix( RTL_CONSTASCII_USTRINGPARAM("_") ); aPostFix += rtl::OUString::valueOf( ++nTry ); newDstUnqPath = newDstUnqPath.replaceAt( nPos, 0, aPostFix ); @@ -1437,7 +1438,7 @@ shell::copy( { newDstUnqPath = dstUnqPath; - rtl::OUString aPostFix( rtl::OUString::createFromAscii( "_" ) ); + rtl::OUString aPostFix( RTL_CONSTASCII_USTRINGPARAM("_") ); aPostFix += rtl::OUString::valueOf( ++nTry ); newDstUnqPath = newDstUnqPath.replaceAt( nPos, 0, aPostFix ); @@ -1799,7 +1800,7 @@ shell::write( sal_Int32 CommandId, if( OverWrite ) { - err = aFile.open( OpenFlag_Write | OpenFlag_Create ); + err = aFile.open( osl_File_OpenFlag_Write | osl_File_OpenFlag_Create ); if( err != osl::FileBase::E_None ) { @@ -1829,7 +1830,7 @@ shell::write( sal_Int32 CommandId, } else { - err = aFile.open( OpenFlag_Read | OpenFlag_NoLock ); + err = aFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_NoLock ); if( err == osl::FileBase::E_None ) // The file exists and shall not be overwritten { installError( CommandId, @@ -1842,7 +1843,7 @@ shell::write( sal_Int32 CommandId, // as a temporary solution the creation does not lock the file at all // in future it should be possible to create the file without lock explicitly - err = aFile.open( OpenFlag_Write | OpenFlag_Create | OpenFlag_NoLock ); + err = aFile.open( osl_File_OpenFlag_Write | osl_File_OpenFlag_Create | osl_File_OpenFlag_NoLock ); if( err != osl::FileBase::E_None ) { @@ -1976,11 +1977,11 @@ void SAL_CALL shell::insertDefaultProperties( const rtl::OUString& aUnqPath ) sal_Bool SAL_CALL shell::getUnqFromUrl( const rtl::OUString& Url,rtl::OUString& Unq ) { - if( 0 == Url.compareToAscii( "file:///" ) || - 0 == Url.compareToAscii( "file://localhost/" ) || - 0 == Url.compareToAscii( "file://127.0.0.1/" ) ) + if (Url.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("file:///")) || + Url.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("file://localhost/")) || + Url.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("file://127.0.0.1/"))) { - Unq = rtl::OUString::createFromAscii( "file:///" ); + Unq = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///")); return false; } @@ -3055,20 +3056,22 @@ uno::Sequence< ucb::ContentInfo > shell::queryCreatableContentsInfo() void SAL_CALL shell::getScheme( rtl::OUString& Scheme ) { - Scheme = rtl::OUString::createFromAscii( "file" ); + Scheme = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file")); } rtl::OUString SAL_CALL shell::getImplementationName_static( void ) { - return rtl::OUString::createFromAscii( "com.sun.star.comp.ucb.FileProvider" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ucb.FileProvider")); } uno::Sequence< rtl::OUString > SAL_CALL shell::getSupportedServiceNames_static( void ) { - rtl::OUString Supported = rtl::OUString::createFromAscii( "com.sun.star.ucb.FileContentProvider" ) ; + rtl::OUString Supported(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.FileContentProvider")); com::sun::star::uno::Sequence< rtl::OUString > Seq( &Supported,1 ); return Seq; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/file/shell.hxx b/ucb/source/ucp/file/shell.hxx index e7e67e36f3..88b7695827 100644 --- a/ucb/source/ucp/file/shell.hxx +++ b/ucb/source/ucp/file/shell.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. @@ -605,3 +606,4 @@ namespace fileaccess { #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/curl.hxx b/ucb/source/ucp/ftp/curl.hxx index 761a9466af..fdfeefeb63 100644 --- a/ucb/source/ucp/ftp/curl.hxx +++ b/ucb/source/ucp/ftp/curl.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. @@ -39,3 +40,5 @@ #endif #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpcfunc.cxx b/ucb/source/ucp/ftp/ftpcfunc.cxx index 1f4be95862..6a7244c866 100644 --- a/ucb/source/ucp/ftp/ftpcfunc.cxx +++ b/ucb/source/ucp/ftp/ftpcfunc.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,3 +55,5 @@ extern "C" { } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpcfunc.hxx b/ucb/source/ucp/ftp/ftpcfunc.hxx index 63e98df698..9d6427ab1d 100644 --- a/ucb/source/ucp/ftp/ftpcfunc.hxx +++ b/ucb/source/ucp/ftp/ftpcfunc.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 @@ extern "C" { } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpcontainer.hxx b/ucb/source/ucp/ftp/ftpcontainer.hxx index 8d8829bcbe..8f0f3286b4 100644 --- a/ucb/source/ucp/ftp/ftpcontainer.hxx +++ b/ucb/source/ucp/ftp/ftpcontainer.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. @@ -59,3 +60,4 @@ public: extern "C" int memory_write( void *buffer,size_t size,size_t nmemb,void *stream); +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx index e01a209bcf..a1e36926fd 100644 --- a/ucb/source/ucp/ftp/ftpcontent.cxx +++ b/ucb/source/ucp/ftp/ftpcontent.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,6 @@ #include #include #include -//#include #include #include @@ -177,10 +177,10 @@ XTYPEPROVIDER_IMPL_6( FTPContent, #define XSERVICEINFO_CREATE_INSTANCE_IMPL( Class ) XSERVICEINFO_IMPL_1( FTPContent, - rtl::OUString::createFromAscii( - "com.sun.star.comp.FTPContent"), - rtl::OUString::createFromAscii( - "com.sun.star.ucb.FTPContent")); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.FTPContent")), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ucb.FTPContent"))); @@ -194,7 +194,7 @@ XSERVICEINFO_IMPL_1( FTPContent, rtl::OUString SAL_CALL FTPContent::getContentType() throw( RuntimeException ) { - return rtl::OUString::createFromAscii(FTP_CONTENT_TYPE); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(FTP_CONTENT_TYPE)); } @@ -533,7 +533,7 @@ Any SAL_CALL FTPContent::execute( Sequence seq(1); PropertyValue value; value.Name = - rtl::OUString::createFromAscii("Uri"); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")); value.Handle = -1; value.Value <<= m_aFTPURL.ident(false,false); value.State = PropertyState_DIRECT_VALUE; @@ -635,13 +635,13 @@ Any SAL_CALL FTPContent::execute( } } -#define FTP_FILE rtl::OUString::createFromAscii( \ +#define FTP_FILE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( \ "application/" \ - "vnd.sun.staroffice.ftp-file") + "vnd.sun.staroffice.ftp-file")) -#define FTP_FOLDER rtl::OUString::createFromAscii( \ +#define FTP_FOLDER rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( \ "application/" \ - "vnd.sun.staroffice.ftp-folder") + "vnd.sun.staroffice.ftp-folder")) Sequence SAL_CALL FTPContent::queryCreatableContentsInfo( ) @@ -662,7 +662,7 @@ FTPContent::queryCreatableContentsInfo_Static( ) | ContentInfoAttribute::KIND_DOCUMENT; Sequence< Property > props( 1 ); props[0] = Property( - rtl::OUString::createFromAscii( "Title" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< rtl::OUString* >( 0 ) ), PropertyAttribute::MAYBEVOID @@ -681,10 +681,10 @@ Reference SAL_CALL FTPContent::createNewContent( const ContentInfo& Info ) throw (RuntimeException) { - if(Info.Type.equalsAscii("application/" - "vnd.sun.staroffice.ftp-file") || - Info.Type.equalsAscii("application/" - "vnd.sun.staroffice.ftp-folder")) + if(Info.Type.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("application/" + "vnd.sun.staroffice.ftp-file")) || + Info.Type.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("application/" + "vnd.sun.staroffice.ftp-folder"))) return new FTPContent(m_xSMgr, m_pFCP, m_xIdentifier,Info); @@ -762,7 +762,7 @@ void FTPContent::insert(const InsertCommandArgument& aInsertCommand, if(m_bInserted && !m_bTitleSet) { MissingPropertiesException excep; excep.Properties.realloc(1); - excep.Properties[0] = rtl::OUString::createFromAscii("Title"); + excep.Properties[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); Any aAny; aAny <<= excep; ucbhelper::cancelCommandExecution(aAny,Env); } @@ -895,7 +895,7 @@ Sequence FTPContent::setPropertyValues( osl::MutexGuard aGuard(m_aMutex); for(sal_Int32 i = 0; i < ret.getLength(); ++i) { - if(seqPropVal[i].Name.equalsAscii("Title")) { + if(seqPropVal[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Title"))) { rtl::OUString Title; if(!(seqPropVal[i].Value >>= Title)) { ret[i] <<= IllegalTypeException(); @@ -915,7 +915,7 @@ Sequence FTPContent::setPropertyValues( rtl::OUString OldTitle = m_aFTPURL.ren(Title); evt.realloc(1); evt[0].PropertyName = - rtl::OUString::createFromAscii("Title"); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); evt[0].Further = false; evt[0].PropertyHandle = -1; evt[0].OldValue <<= OldTitle; @@ -955,3 +955,5 @@ Sequence FTPContent::setPropertyValues( return ret; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpcontent.hxx b/ucb/source/ucp/ftp/ftpcontent.hxx index 9dcb8103a5..ee73d7f231 100644 --- a/ucb/source/ucp/ftp/ftpcontent.hxx +++ b/ucb/source/ucp/ftp/ftpcontent.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. @@ -181,3 +182,5 @@ namespace ftp } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpcontentcaps.cxx b/ucb/source/ucp/ftp/ftpcontentcaps.cxx index 607ecbc4b0..73abe6cd45 100644 --- a/ucb/source/ucp/ftp/ftpcontentcaps.cxx +++ b/ucb/source/ucp/ftp/ftpcontentcaps.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. @@ -185,3 +186,4 @@ uno::Sequence< ucb::CommandInfo > FTPContent::getCommands( return uno::Sequence< ucb::CommandInfo >( aCommandInfoTable, COMMAND_COUNT ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpcontentidentifier.cxx b/ucb/source/ucp/ftp/ftpcontentidentifier.cxx index eaff30cce1..5c61a36937 100644 --- a/ucb/source/ucp/ftp/ftpcontentidentifier.cxx +++ b/ucb/source/ucp/ftp/ftpcontentidentifier.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. @@ -140,7 +141,7 @@ FTPContentIdentifier::getContentProviderScheme( com::sun::star::uno::RuntimeException ) { - return rtl::OUString::createFromAscii("ftp"); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ftp")); } @@ -148,3 +149,4 @@ FTPContentIdentifier::getContentProviderScheme( +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpcontentidentifier.hxx b/ucb/source/ucp/ftp/ftpcontentidentifier.hxx index d4f423b059..e4cb3d0778 100644 --- a/ucb/source/ucp/ftp/ftpcontentidentifier.hxx +++ b/ucb/source/ucp/ftp/ftpcontentidentifier.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 @@ namespace ftp { #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.cxx b/ucb/source/ucp/ftp/ftpcontentprovider.cxx index f0e1f09624..3eef2d911d 100644 --- a/ucb/source/ucp/ftp/ftpcontentprovider.cxx +++ b/ucb/source/ucp/ftp/ftpcontentprovider.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. @@ -104,8 +105,8 @@ XTYPEPROVIDER_IMPL_3(FTPContentProvider, XSERVICEINFO_IMPL_1( FTPContentProvider, - rtl::OUString::createFromAscii("com.sun.star.comp.FTPContentProvider"), - rtl::OUString::createFromAscii(FTP_CONTENT_PROVIDER_SERVICE_NAME)); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.FTPContentProvider")), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(FTP_CONTENT_PROVIDER_SERVICE_NAME))); //========================================================================= // @@ -159,7 +160,7 @@ FTPContentProvider::queryContent( this); if(!m_pProxyDecider->shouldUseProxy( - rtl::OUString::createFromAscii("ftp"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ftp")), aURL.host(), aURL.port().toInt32())) { @@ -278,3 +279,5 @@ FTPContentProvider::getHttpProvider() return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.hxx b/ucb/source/ucp/ftp/ftpcontentprovider.hxx index 9e67a8c6fd..79d1fb83e1 100644 --- a/ucb/source/ucp/ftp/ftpcontentprovider.hxx +++ b/ucb/source/ucp/ftp/ftpcontentprovider.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,4 @@ namespace ftp { #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpdirp.cxx b/ucb/source/ucp/ftp/ftpdirp.cxx index 0a47535d59..6bccaa2afe 100644 --- a/ucb/source/ucp/ftp/ftpdirp.cxx +++ b/ucb/source/ucp/ftp/ftpdirp.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. @@ -1290,3 +1291,5 @@ sal_Bool FTPDirectoryParser::setPath ( } return (!!value); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpdirp.hxx b/ucb/source/ucp/ftp/ftpdirp.hxx index 810d45f101..b55727069c 100644 --- a/ucb/source/ucp/ftp/ftpdirp.hxx +++ b/ucb/source/ucp/ftp/ftpdirp.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. @@ -187,3 +188,5 @@ namespace ftp { #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpdynresultset.cxx b/ucb/source/ucp/ftp/ftpdynresultset.cxx index ac6b5b5546..2e351f5023 100644 --- a/ucb/source/ucp/ftp/ftpdynresultset.cxx +++ b/ucb/source/ucp/ftp/ftpdynresultset.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. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_ucb.hxx" #include -#ifndef _FTP_FTPDYNRESULTSET_HXX_ #include "ftpdynresultset.hxx" -#endif #include "ftpresultsetfactory.hxx" using namespace com::sun::star::lang; @@ -89,3 +88,4 @@ void DynamicResultSet::initDynamic() +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpdynresultset.hxx b/ucb/source/ucp/ftp/ftpdynresultset.hxx index b1d9194f75..5781aaf8e6 100644 --- a/ucb/source/ucp/ftp/ftpdynresultset.hxx +++ b/ucb/source/ucp/ftp/ftpdynresultset.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 ftp { #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftphandleprovider.hxx b/ucb/source/ucp/ftp/ftphandleprovider.hxx old mode 100755 new mode 100644 index d3b1e4f28f..b050601ea4 --- a/ucb/source/ucp/ftp/ftphandleprovider.hxx +++ b/ucb/source/ucp/ftp/ftphandleprovider.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #include #include "curl.hxx" @@ -27,3 +28,5 @@ namespace ftp { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpinpstr.cxx b/ucb/source/ucp/ftp/ftpinpstr.cxx index 2faac1e932..c1f7558d45 100644 --- a/ucb/source/ucp/ftp/ftpinpstr.cxx +++ b/ucb/source/ucp/ftp/ftpinpstr.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,9 +35,7 @@ *************************************************************************/ #include "ftpinpstr.hxx" -#ifndef _RTL_ALLOC_H #include -#endif #ifndef STD_ALGORITHM #include #define STD_ALGORITHM @@ -215,3 +214,5 @@ sal_Int64 SAL_CALL FTPInputStream::getLength( { return m_nLength; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpinpstr.hxx b/ucb/source/ucp/ftp/ftpinpstr.hxx index 83431371ec..cb6f4c8887 100644 --- a/ucb/source/ucp/ftp/ftpinpstr.hxx +++ b/ucb/source/ucp/ftp/ftpinpstr.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. @@ -149,3 +150,5 @@ namespace ftp { } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpintreq.cxx b/ucb/source/ucp/ftp/ftpintreq.cxx index 9d9bf49b28..ac668c4541 100644 --- a/ucb/source/ucp/ftp/ftpintreq.cxx +++ b/ucb/source/ucp/ftp/ftpintreq.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. @@ -228,3 +229,4 @@ bool XInteractionRequestImpl::approved() const return p1->isSelected(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpintreq.hxx b/ucb/source/ucp/ftp/ftpintreq.hxx index 8ffb48232d..69b5f69850 100644 --- a/ucb/source/ucp/ftp/ftpintreq.hxx +++ b/ucb/source/ucp/ftp/ftpintreq.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. @@ -179,3 +180,5 @@ namespace ftp { #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftploaderthread.cxx b/ucb/source/ucp/ftp/ftploaderthread.cxx index 0d81ee9a82..100782b218 100644 --- a/ucb/source/ucp/ftp/ftploaderthread.cxx +++ b/ucb/source/ucp/ftp/ftploaderthread.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. @@ -107,3 +108,4 @@ CURL* FTPLoaderThread::handle() { } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftploaderthread.hxx b/ucb/source/ucp/ftp/ftploaderthread.hxx index ac3048080e..2ece821b42 100644 --- a/ucb/source/ucp/ftp/ftploaderthread.hxx +++ b/ucb/source/ucp/ftp/ftploaderthread.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. @@ -71,3 +72,5 @@ namespace ftp { #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpresultsetI.cxx b/ucb/source/ucp/ftp/ftpresultsetI.cxx index f9944f363f..056a87ed61 100644 --- a/ucb/source/ucp/ftp/ftpresultsetI.cxx +++ b/ucb/source/ucp/ftp/ftpresultsetI.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. @@ -71,8 +72,8 @@ ResultSetI::ResultSetI(const Reference& xMSF, const rtl::OUString& Name = seqProp[i].Name; if(Name.compareToAscii("ContentType") == 0 ) xRow->appendString(seqProp[i], - rtl::OUString::createFromAscii( - "application/ftp" )); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "application/ftp" ))); else if(Name.compareToAscii("Title") == 0) xRow->appendString(seqProp[i],dirvec[n].m_aName); else if(Name.compareToAscii("IsReadOnly") == 0) @@ -103,3 +104,5 @@ ResultSetI::ResultSetI(const Reference& xMSF, m_aItems[n] = Reference(xRow.get()); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpresultsetI.hxx b/ucb/source/ucp/ftp/ftpresultsetI.hxx index f108063c06..a0ea618a6a 100644 --- a/ucb/source/ucp/ftp/ftpresultsetI.hxx +++ b/ucb/source/ucp/ftp/ftpresultsetI.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 ftp { #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpresultsetbase.cxx b/ucb/source/ucp/ftp/ftpresultsetbase.cxx index ead162c99d..210d7d4167 100644 --- a/ucb/source/ucp/ftp/ftpresultsetbase.cxx +++ b/ucb/source/ucp/ftp/ftpresultsetbase.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,7 @@ #include #include #include -#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBBUTE_HPP_ #include -#endif #include #include #include @@ -513,12 +512,12 @@ ResultSetBase::getPropertySetInfo() throw( uno::RuntimeException) { uno::Sequence< beans::Property > seq(2); - seq[0].Name = rtl::OUString::createFromAscii( "RowCount" ); + seq[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")); seq[0].Handle = -1; seq[0].Type = getCppuType( static_cast< sal_Int32* >(0) ); seq[0].Attributes = beans::PropertyAttribute::READONLY; - seq[1].Name = rtl::OUString::createFromAscii( "IsRowCountFinal" ); + seq[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")); seq[1].Handle = -1; seq[1].Type = getCppuType( static_cast< sal_Bool* >(0) ); seq[1].Attributes = beans::PropertyAttribute::READONLY; @@ -538,8 +537,8 @@ void SAL_CALL ResultSetBase::setPropertyValue( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) || - aPropertyName == rtl::OUString::createFromAscii( "RowCount" ) ) + if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) || + aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) return; throw beans::UnknownPropertyException(); @@ -552,13 +551,13 @@ uno::Any SAL_CALL ResultSetBase::getPropertyValue( lang::WrappedTargetException, uno::RuntimeException) { - if( PropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) ) + if( PropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) ) { uno::Any aAny; aAny <<= m_bRowCountFinal; return aAny; } - else if ( PropertyName == rtl::OUString::createFromAscii( "RowCount" ) ) + else if ( PropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) { uno::Any aAny; sal_Int32 count = m_aItems.size(); @@ -577,7 +576,7 @@ void SAL_CALL ResultSetBase::addPropertyChangeListener( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) ) + if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) ) { osl::MutexGuard aGuard( m_aMutex ); if ( ! m_pIsFinalListeners ) @@ -586,7 +585,7 @@ void SAL_CALL ResultSetBase::addPropertyChangeListener( m_pIsFinalListeners->addInterface( xListener ); } - else if ( aPropertyName == rtl::OUString::createFromAscii( "RowCount" ) ) + else if ( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) { osl::MutexGuard aGuard( m_aMutex ); if ( ! m_pRowCountListeners ) @@ -606,13 +605,13 @@ void SAL_CALL ResultSetBase::removePropertyChangeListener( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString::createFromAscii( "IsRowCountFinal" ) && + if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) && m_pIsFinalListeners ) { osl::MutexGuard aGuard( m_aMutex ); m_pIsFinalListeners->removeInterface( aListener ); } - else if ( aPropertyName == rtl::OUString::createFromAscii( "RowCount" ) && + else if ( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) && m_pRowCountListeners ) { osl::MutexGuard aGuard( m_aMutex ); @@ -660,3 +659,4 @@ ResultSetBase::getMetaData( +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpresultsetbase.hxx b/ucb/source/ucp/ftp/ftpresultsetbase.hxx index 75198bea70..f257dc96a2 100644 --- a/ucb/source/ucp/ftp/ftpresultsetbase.hxx +++ b/ucb/source/ucp/ftp/ftpresultsetbase.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. @@ -606,3 +607,5 @@ namespace ftp { #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpresultsetfactory.hxx b/ucb/source/ucp/ftp/ftpresultsetfactory.hxx index b609ff30e4..a6b9066532 100644 --- a/ucb/source/ucp/ftp/ftpresultsetfactory.hxx +++ b/ucb/source/ucp/ftp/ftpresultsetfactory.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. @@ -55,3 +56,5 @@ namespace ftp { #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpservices.cxx b/ucb/source/ucp/ftp/ftpservices.cxx index 1eb9feca51..86ccaaf142 100644 --- a/ucb/source/ucp/ftp/ftpservices.cxx +++ b/ucb/source/ucp/ftp/ftpservices.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. @@ -72,3 +73,4 @@ extern "C" void * SAL_CALL component_getFactory( return pRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpstrcont.hxx b/ucb/source/ucp/ftp/ftpstrcont.hxx index c79c8e8a01..1afadd3cd9 100644 --- a/ucb/source/ucp/ftp/ftpstrcont.hxx +++ b/ucb/source/ucp/ftp/ftpstrcont.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. @@ -85,3 +86,5 @@ namespace ftp { #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx index c107d3b16d..376c77205b 100644 --- a/ucb/source/ucp/ftp/ftpurl.cxx +++ b/ucb/source/ucp/ftp/ftpurl.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,9 +139,9 @@ FTPURL::FTPURL(const rtl::OUString& url, malformed_exception ) : m_pFCP(pFCP), - m_aUsername(rtl::OUString::createFromAscii("anonymous")), + m_aUsername(RTL_CONSTASCII_USTRINGPARAM("anonymous")), m_bShowPassword(false), - m_aPort(rtl::OUString::createFromAscii("21")) + m_aPort(RTL_CONSTASCII_USTRINGPARAM("21")) { parse(url); // can reset m_bShowPassword } @@ -219,7 +220,7 @@ void FTPURL::parse(const rtl::OUString& url) if(buffer[0]) { if(strcmp(buffer,"..") == 0 && m_aPathSegmentVec.size() && - ! m_aPathSegmentVec.back().equalsAscii("..")) + ! m_aPathSegmentVec.back().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".."))) m_aPathSegmentVec.pop_back(); else if(strcmp(buffer,".") == 0) ; // Ignore @@ -259,7 +260,7 @@ rtl::OUString FTPURL::ident(bool withslash,bool internal) const rtl::OUStringBuffer bff; bff.appendAscii("ftp://"); - if(!m_aUsername.equalsAscii("anonymous")) { + if(!m_aUsername.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("anonymous"))) { bff.append(m_aUsername); rtl::OUString aPassword,aAccount; @@ -278,7 +279,7 @@ rtl::OUString FTPURL::ident(bool withslash,bool internal) const } bff.append(m_aHost); - if(!m_aPort.equalsAscii("21")) + if(!m_aPort.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("21"))) bff.append(sal_Unicode(':')) .append(m_aPort) .append(sal_Unicode('/')); @@ -305,7 +306,7 @@ rtl::OUString FTPURL::parent(bool internal) const bff.appendAscii("ftp://"); - if(!m_aUsername.equalsAscii("anonymous")) { + if(!m_aUsername.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("anonymous"))) { bff.append(m_aUsername); rtl::OUString aPassword,aAccount; @@ -324,7 +325,7 @@ rtl::OUString FTPURL::parent(bool internal) const bff.append(m_aHost); - if(!m_aPort.equalsAscii("21")) + if(!m_aPort.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("21"))) bff.append(sal_Unicode(':')) .append(m_aPort) .append(sal_Unicode('/')); @@ -343,7 +344,7 @@ rtl::OUString FTPURL::parent(bool internal) const if(!last.getLength()) bff.appendAscii(".."); - else if(last.equalsAscii("..")) + else if(last.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".."))) bff.append(last).appendAscii("/.."); bff.append(m_aType); @@ -405,7 +406,7 @@ namespace ftp { // Setting username:password #define SET_USER_PASSWORD(username,password) \ rtl::OUString combi(username + \ - rtl::OUString::createFromAscii(":") + \ + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":")) + \ password); \ rtl::OString aUserPsswd(combi.getStr(), \ combi.getLength(), \ @@ -507,8 +508,8 @@ std::vector FTPURL::list( } aDirEntry.m_aName = aDirEntry.m_aName.trim(); if(osKind != int(FTP_UNKNOWN) && - !aDirEntry.m_aName.equalsAscii("..") && - !aDirEntry.m_aName.equalsAscii(".")) { + !aDirEntry.m_aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("..")) && + !aDirEntry.m_aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("."))) { aDirEntry.m_aURL = viewurl + encodePathSegment(aDirEntry.m_aName); sal_Bool isDir = @@ -555,7 +556,7 @@ rtl::OUString FTPURL::net_title() const if(try_more && 1+url.lastIndexOf(sal_Unicode('/')) != url.getLength()) - url += rtl::OUString::createFromAscii("/"); // add end-slash + url += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); // add end-slash else if(!try_more && 1+url.lastIndexOf(sal_Unicode('/')) == url.getLength()) url = url.copy(0,url.getLength()-1); // remove end-slash @@ -573,11 +574,11 @@ rtl::OUString FTPURL::net_title() const // Format of current working directory: // 257 "/bla/bla" is current directory sal_Int32 index1 = aNetTitle.lastIndexOf( - rtl::OUString::createFromAscii("257")); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("257"))); index1 = 1+aNetTitle.indexOf(sal_Unicode('"'),index1); sal_Int32 index2 = aNetTitle.indexOf(sal_Unicode('"'),index1); aNetTitle = aNetTitle.copy(index1,index2-index1); - if(!aNetTitle.equalsAscii("/")) { + if(!aNetTitle.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("/"))) { index1 = aNetTitle.lastIndexOf(sal_Unicode('/')); aNetTitle = aNetTitle.copy(1+index1); } @@ -601,7 +602,7 @@ rtl::OUString FTPURL::net_title() const aNetTitle = decodePathSegment(m_aPathSegmentVec.back()); else // must be root - aNetTitle = rtl::OUString::createFromAscii("/"); + aNetTitle = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); try_more = false; } @@ -623,15 +624,15 @@ FTPDirentry FTPURL::direntry() const FTPDirentry aDirentry; aDirentry.m_aName = nettitle; // init aDirentry - if(nettitle.equalsAscii("/") || - nettitle.equalsAscii("..")) + if(nettitle.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("/")) || + nettitle.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".."))) aDirentry.m_nMode = INETCOREFTP_FILEMODE_ISDIR; else aDirentry.m_nMode = INETCOREFTP_FILEMODE_UNKNOWN; aDirentry.m_nSize = 0; - if(!nettitle.equalsAscii("/")) { + if(!nettitle.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("/"))) { // try to open the parent directory FTPURL aURL(parent(),m_pFCP); @@ -736,7 +737,7 @@ void FTPURL::mkdir(bool ReplaceExisting) const rtl::OUString url(parent(true)); if(1+url.lastIndexOf(sal_Unicode('/')) != url.getLength()) - url += rtl::OUString::createFromAscii("/"); + url += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); SET_URL(url); CURLcode err = curl_easy_perform(curl); @@ -776,7 +777,7 @@ rtl::OUString FTPURL::ren(const rtl::OUString& NewTitle) rtl::OUString url(parent(true)); if(1+url.lastIndexOf(sal_Unicode('/')) != url.getLength()) - url += rtl::OUString::createFromAscii("/"); + url += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); SET_URL(url); CURLcode err = curl_easy_perform(curl); @@ -784,7 +785,7 @@ rtl::OUString FTPURL::ren(const rtl::OUString& NewTitle) if(err != CURLE_OK) throw curl_exception(err); else if(m_aPathSegmentVec.size() && - !m_aPathSegmentVec.back().equalsAscii("..")) + !m_aPathSegmentVec.back().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".."))) m_aPathSegmentVec.back() = encodePathSegment(NewTitle); return OldTitle; } @@ -827,7 +828,7 @@ void FTPURL::del() const rtl::OUString url(parent(true)); if(1+url.lastIndexOf(sal_Unicode('/')) != url.getLength()) - url += rtl::OUString::createFromAscii("/"); + url += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); SET_URL(url); CURLcode err = curl_easy_perform(curl); @@ -836,3 +837,4 @@ void FTPURL::del() const throw curl_exception(err); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpurl.hxx b/ucb/source/ucp/ftp/ftpurl.hxx index d595573a76..bc94e8ed57 100644 --- a/ucb/source/ucp/ftp/ftpurl.hxx +++ b/ucb/source/ucp/ftp/ftpurl.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. @@ -176,3 +177,5 @@ namespace ftp { #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/test.cxx b/ucb/source/ucp/ftp/test.cxx index d15cbf9279..e3d89e43fc 100644 --- a/ucb/source/ucp/ftp/test.cxx +++ b/ucb/source/ucp/ftp/test.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,152 +38,11 @@ #include "test_ftpurl.hxx" #include #include - -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include - - -// #include "debughelper.hxx" -// #include "test_activedatasink.hxx" -// #include "test_ftpurl.hxx" -// #include "test_multiservicefac.hxx" -// #include "ftpcontentprovider.hxx" -// #include "ftpcontentidentifier.hxx" - - -// using namespace test_ftp; -// using namespace rtl; -// using namespace com::sun::star::uno; -// using namespace com::sun::star::lang; -// using namespace com::sun::star::ucb; -// using namespace com::sun::star::beans; -// using namespace com::sun::star::io; - - - -// class FTPThread -// : public osl::Thread -// { -// public: - -// FTPThread(); - -// int number_of_errors() { return _number_of_errors; } - -// protected: - -// void SAL_CALL run(); - - -// private: - -// ftp::FTPContentProvider *pProvider; -// Reference xProvider; -// Reference xFac; - -// int _number_of_errors; -// }; - - -// Reference< XMultiServiceFactory > createApplicationServiceManager() -// { -// try -// { -// Reference xComponentContext = -// ::cppu::defaultBootstrap_InitialComponentContext(); -// Reference xMS( -// xComponentContext->getServiceManager(), -// UNO_QUERY); - -// return xMS; -// } -// catch( ::com::sun::star::uno::Exception& ) -// { -// return Reference< XMultiServiceFactory >(); -// } -// } - - -// FTPThread::FTPThread() -// : _number_of_errors(0), -// xFac(createApplicationServiceManager()) -// { -// pProvider = new ftp::FTPContentProvider(xFac); -// xProvider = Reference(pProvider); - -// if(!xProvider.is()) -// ++_number_of_errors; -// } - - -// void FTPThread::run() { -// if(!xFac.is()) { -// ++_number_of_errors; -// exit(1); -// } - -// Reference xIdent( -// new ftp::FTPContentIdentifier( -// rtl::OUString::createFromAscii("ftp://abi:psswd@abi-1/file"), -// pProvider)); - -// Reference xContent = xProvider->queryContent(xIdent); -// if(!xContent.is()) -// { -// err_msg("no content",OUString()); -// exit(1); -// } - - -// Reference xActDS(new Test_ActiveDataSink()); -// OpenCommandArgument2 aOpenCommand(OpenMode::DOCUMENT, -// 0, -// Reference(xActDS,UNO_QUERY), -// Sequence(0), -// Sequence(0)); -// Any aAny; aAny <<= aOpenCommand; - -// Command aCommand(OUString::createFromAscii("open"), -// -1, -// aAny); - -// Reference xCommandProcessor(xContent,UNO_QUERY); -// if(!xCommandProcessor.is()) -// { -// err_msg("no command_processor",OUString()); -// exit(1); -// } -// xCommandProcessor->execute(aCommand, -// 0,Reference(0)); - -// Reference xInputStream = xActDS->getInputStream(); -// if(!xInputStream.is()) -// ; -// } int main(int argc,char* argv[]) { -// FTPThread aThread; -// aThread.create(); -// aThread.join(); typedef int (*INT_FUNC)(void); INT_FUNC tests[] = { test_ftpurl, @@ -215,84 +75,4 @@ int main(int argc,char* argv[]) return err_level; } - - -// char *scefile = 0; -// if(strcmp(argv[1],"-sce") == 0) -// scefile = argv[2]; - -// if(!scefile) { -// fprintf(stderr,"usage: ftptest -sce filename\n"); -// return 1; -// } - -// rtl::OUString sceurl; -// osl::FileBase::RC err = -// osl::FileBase::getFileURLFromSystemPath( -// rtl::OUString(scefile, -// strlen(scefile), -// RTL_TEXTENCODING_UTF8), -// sceurl); - -// osl::File aFile(sceurl); -// err = aFile.open(OpenFlag_Read); -// if(err != osl::FileBase::E_None) { -// fprintf(stderr,"could not open sce-file %s\n",scefile); -// return 1; -// } - -// sal_uInt64 n; -// char buffer[256]; -// rtl::OUStringBuffer bff; -// do { -// err = aFile.read((void*)buffer,256,n); -// bff.appendAscii(buffer,sal_Int32(n)); -// } while(err == osl::FileBase::E_None && n == 256); - -// aFile.close(); - -// rtl::OUString sce = bff.makeStringAndClear(); - -// fprintf(stderr,rtl::OString(sce.getStr(), -// sce.getLength(), -// RTL_TEXTENCODING_UTF8).getStr()); - -// rtl::OUString lib,tmp,testlib; -// std::vector tests; -// sal_Int32 TEST = sce.indexOf(rtl::OUString::createFromAscii("TEST")); -// sal_Int32 WITH = sce.indexOf(rtl::OUString::createFromAscii("WITH")); -// sal_Int32 FROM = sce.indexOf(rtl::OUString::createFromAscii("FROM")); -// lib = sce.copy(TEST+4,WITH-TEST-4).trim(); - -// tmp = sce.copy(WITH+4,FROM-WITH-4).trim(); -// sal_Int32 nIndex = 0; -// do -// { -// rtl::OUString token = tmp.getToken(0,';',nIndex).trim(); -// if(token.getLength()) -// tests.push_back(token); -// } while(nIndex >= 0); - -// testlib = sce.copy(FROM+4).trim(); - -// // fprintf(stderr,"%s\n", -// // rtl::OString(token.getStr(), -// // token.getLength(), -// // RTL_TEXTENCODING_UTF8).getStr()); - -// osl::Module testLib; -// if(!testLib.load(testlib)) { -// fprintf(stderr,"library not found: %s\n", -// rtl::OString(testlib.getStr(), -// testlib.getLength(), -// RTL_TEXTENCODING_UTF8).getStr()); -// return 1; -// } - -// osl::Module mathLib; -// mathLib.load(rtl::OUString::createFromAscii("libm.so")); -// typedef double (*DF)(double); -// DF func = (DF)mathLib.getSymbol(rtl::OUString::createFromAscii("cos")); -// fprintf(stderr,"-------double %f ----------\n",(*func)(2.0)); - -// fprintf(stderr,"-------testing %s ----------\n",scefile); +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/test_activedatasink.cxx b/ucb/source/ucp/ftp/test_activedatasink.cxx index 3d609e1a99..29798c671b 100644 --- a/ucb/source/ucp/ftp/test_activedatasink.cxx +++ b/ucb/source/ucp/ftp/test_activedatasink.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,9 +35,7 @@ *************************************************************************/ -#ifndef _TEST_ACTIVEDATASINK_HXX_ #include "test_activedatasink.hxx" -#endif using namespace test_ftp; @@ -62,3 +61,5 @@ void SAL_CALL Test_ActiveDataSink::acquire( void ) throw() { void SAL_CALL Test_ActiveDataSink::release( void ) throw() { OWeakObject::release(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/test_activedatasink.hxx b/ucb/source/ucp/ftp/test_activedatasink.hxx index 096710aae9..b9930babcb 100644 --- a/ucb/source/ucp/ftp/test_activedatasink.hxx +++ b/ucb/source/ucp/ftp/test_activedatasink.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. @@ -87,3 +88,5 @@ namespace test_ftp { #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/test_ftpurl.cxx b/ucb/source/ucp/ftp/test_ftpurl.cxx old mode 100755 new mode 100644 index 5eaa165003..8cb80dc97c --- a/ucb/source/ucp/ftp/test_ftpurl.cxx +++ b/ucb/source/ucp/ftp/test_ftpurl.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,8 +164,8 @@ int test_ftplist(void) { FTPHandleProviderI provider; ftp::FTPURL url( - rtl::OUString::createFromAscii( - "ftp://abi:psswd@abi-1/dir"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "ftp://abi:psswd@abi-1/dir")), &provider); std::vector vec = @@ -173,9 +174,9 @@ int test_ftplist(void) { if(vec.size() != 3) ++number_of_errors; - if(!(vec[0].m_aName.equalsAscii("dir1") && - vec[1].m_aName.equalsAscii("dir2") && - vec[2].m_aName.equalsAscii("file1"))) + if(!(vec[0].m_aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dir1")) && + vec[1].m_aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dir2")) && + vec[2].m_aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("file1")))) ++number_of_errors; TESTEVAL; @@ -229,13 +230,13 @@ int test_ftpproperties(void) { FTPHandleProviderI provider; ftp::FTPURL url( - rtl::OUString::createFromAscii( - "ftp://abi:psswd@abi-1/file"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "ftp://abi:psswd@abi-1/file")), &provider); ftp::FTPDirentry ade(url.direntry()); - if(!(ade.m_aName.equalsAscii("file") && + if(!(ade.m_aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("file")) && ade.isFile())) ++number_of_errors; @@ -250,8 +251,8 @@ int test_ftpopen(void) FTPHandleProviderI provider; ftp::FTPURL url( - rtl::OUString::createFromAscii( - "ftp://abi:psswd@abi-1/file"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "ftp://abi:psswd@abi-1/file")), &provider); FILE* file = url.open(); @@ -282,3 +283,4 @@ int test_ftpopen(void) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/test_ftpurl.hxx b/ucb/source/ucp/ftp/test_ftpurl.hxx old mode 100755 new mode 100644 index 641e29fa80..1f7356a690 --- a/ucb/source/ucp/ftp/test_ftpurl.hxx +++ b/ucb/source/ucp/ftp/test_ftpurl.hxx @@ -1,5 +1,8 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ extern int test_ftpurl(void); extern int test_ftpproperties(void); extern int test_ftpopen(void); extern int test_ftplist(void); extern int test_ftpparent(void); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/test_interactionhandler.hxx b/ucb/source/ucp/ftp/test_interactionhandler.hxx index edb27f5651..6a0f4f6013 100644 --- a/ucb/source/ucp/ftp/test_interactionhandler.hxx +++ b/ucb/source/ucp/ftp/test_interactionhandler.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. @@ -73,3 +74,5 @@ namespace test_ftp { #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/test_multiservicefac.cxx b/ucb/source/ucp/ftp/test_multiservicefac.cxx index 5c7e2a31a8..82452f316b 100644 --- a/ucb/source/ucp/ftp/test_multiservicefac.cxx +++ b/ucb/source/ucp/ftp/test_multiservicefac.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. @@ -111,3 +112,5 @@ Test_MultiServiceFactory::getAvailableServiceNames( { return Sequence< ::rtl::OUString >(0); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/test_multiservicefac.hxx b/ucb/source/ucp/ftp/test_multiservicefac.hxx index 6e99e953ed..7947962946 100644 --- a/ucb/source/ucp/ftp/test_multiservicefac.hxx +++ b/ucb/source/ucp/ftp/test_multiservicefac.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,4 @@ namespace test_ftp { #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx index 249eace0ea..cd1547e642 100644 --- a/ucb/source/ucp/gio/gio_content.cxx +++ b/ucb/source/ucp/gio/gio_content.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. @@ -28,7 +29,7 @@ #include #include #include - +#include #include #include @@ -528,7 +529,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( static lang::IllegalAccessException getReadOnlyException( const uno::Reference< uno::XInterface >& rContext ) { - return lang::IllegalAccessException ( rtl::OUString::createFromAscii( "Property is read-only!" ), rContext ); + return lang::IllegalAccessException ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property is read-only!")), rContext ); } void Content::queryChildren( ContentRefList& rChildren ) @@ -544,7 +545,7 @@ void Content::queryChildren( ContentRefList& rChildren ) sal_Int32 nURLPos = aURL.lastIndexOf( '/' ); if ( nURLPos != ( aURL.getLength() - 1 ) ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); sal_Int32 nLen = aURL.getLength(); @@ -676,7 +677,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if (!( rValue.Value >>= aNewTitle )) { aRet[ n ] <<= beans::IllegalTypeException - ( rtl::OUString::createFromAscii( "Property value has wrong type!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property value has wrong type!")), static_cast< cppu::OWeakObject * >( this ) ); continue; } @@ -684,7 +685,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if ( aNewTitle.getLength() <= 0 ) { aRet[ n ] <<= lang::IllegalArgumentException - ( rtl::OUString::createFromAscii( "Empty title not allowed!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Empty title not allowed!")), static_cast< cppu::OWeakObject * >( this ), -1 ); continue; @@ -700,7 +701,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( g_warning ("Set new name to '%s'", newName); #endif - aEvent.PropertyName = rtl::OUString::createFromAscii( "Title" ); + aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); if (oldName) aEvent.OldValue = uno::makeAny(rtl::OUString(oldName, strlen(oldName), RTL_TEXTENCODING_UTF8)); aEvent.NewValue = uno::makeAny(aNewTitle); @@ -744,7 +745,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if (!exchangeIdentity( xNewId ) ) { aRet[ nTitlePos ] <<= uno::Exception - ( rtl::OUString::createFromAscii( "Exchange failed!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Exchange failed!")), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1025,7 +1026,8 @@ void Content::insert(const uno::Reference< io::XInputStream > &xInputStream, GError *pError = NULL; GFileInfo *pInfo = getGFileInfo(xEnv); - if ( g_file_info_has_attribute(pInfo, G_FILE_ATTRIBUTE_STANDARD_TYPE) && + if ( pInfo && + g_file_info_has_attribute(pInfo, G_FILE_ATTRIBUTE_STANDARD_TYPE) && g_file_info_get_file_type(pInfo) == G_FILE_TYPE_DIRECTORY ) { #ifdef DEBUG @@ -1083,7 +1085,7 @@ void Content::transfer( const ucb::TransferInfo& aTransferInfo, const uno::Refer if (aTransferInfo.MoveData) bSuccess = g_file_move(pSource, pDest, G_FILE_COPY_OVERWRITE, NULL, NULL, 0, &pError); else - bSuccess = g_file_copy(pSource, pDest, G_FILE_COPY_OVERWRITE, NULL, NULL, 0, &pError); + bSuccess = g_file_copy(pSource, pDest, DEFAULT_COPYDATA_FLAGS, NULL, NULL, 0, &pError); g_object_unref(pSource); g_object_unref(pDest); if (!bSuccess) @@ -1158,7 +1160,7 @@ uno::Reference< ucb::XContent > rtl::OUString aURL = m_xIdentifier->getContentIdentifier(); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); name = create_document ? "[New_Content]" : "[New_Collection]"; aURL += rtl::OUString::createFromAscii( name ); @@ -1254,7 +1256,7 @@ uno::Sequence< beans::Property > Content::getProperties( beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ) }; - const int nProps = sizeof (aGenericProperties) / sizeof (aGenericProperties[0]); + const int nProps = SAL_N_ELEMENTS(aGenericProperties); return uno::Sequence< beans::Property > ( aGenericProperties, nProps ); } @@ -1320,15 +1322,17 @@ uno::Any SAL_CALL Content::queryInterface( const uno::Type & rType ) throw ( uno rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString::createFromAscii("com.sun.star.comp.GIOContent" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.GIOContent")); } uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() throw( uno::RuntimeException ) { uno::Sequence< rtl::OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii("com.sun.star.ucb.GIOContent" ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.GIOContent")); return aSNS; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gio/gio_content.hxx b/ucb/source/ucp/gio/gio_content.hxx index b48a018680..9e6ed77602 100644 --- a/ucb/source/ucp/gio/gio_content.hxx +++ b/ucb/source/ucp/gio/gio_content.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. @@ -198,3 +199,5 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gio/gio_datasupplier.cxx b/ucb/source/ucp/gio/gio_datasupplier.cxx index ec849a3beb..50e5246eab 100644 --- a/ucb/source/ucp/gio/gio_datasupplier.cxx +++ b/ucb/source/ucp/gio/gio_datasupplier.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. @@ -102,7 +103,7 @@ DataSupplier::~DataSupplier() while ( it != end ) { delete (*it); - it++; + ++it; } } @@ -129,7 +130,7 @@ DataSupplier::~DataSupplier() g_uri_escape_string( g_file_info_get_name(maResults[ nIndex ]->pInfo) , NULL, false); if ( ( aId.lastIndexOf( '/' ) + 1 ) != aId.getLength() ) - aId += rtl::OUString::createFromAscii( "/" ); + aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aId += rtl::OUString::createFromAscii( escaped_name ); @@ -280,3 +281,5 @@ void DataSupplier::validate() throw( ucb::ResultSetException ) } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gio/gio_datasupplier.hxx b/ucb/source/ucp/gio/gio_datasupplier.hxx index 6b15ccf1ec..b68a24f704 100644 --- a/ucb/source/ucp/gio/gio_datasupplier.hxx +++ b/ucb/source/ucp/gio/gio_datasupplier.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 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gio/gio_inputstream.cxx b/ucb/source/ucp/gio/gio_inputstream.cxx index 008d9c4cdc..3519ccc581 100644 --- a/ucb/source/ucp/gio/gio_inputstream.cxx +++ b/ucb/source/ucp/gio/gio_inputstream.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. @@ -118,3 +119,5 @@ uno::Any InputStream::queryInterface( const uno::Type &type ) throw( uno::Runtim } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gio/gio_inputstream.hxx b/ucb/source/ucp/gio/gio_inputstream.hxx index 70a65236c8..154d803602 100644 --- a/ucb/source/ucp/gio/gio_inputstream.hxx +++ b/ucb/source/ucp/gio/gio_inputstream.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 @@ public: } // namespace gio #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gio/gio_mount.cxx b/ucb/source/ucp/gio/gio_mount.cxx index 3617ed9ee7..fb721303dd 100644 --- a/ucb/source/ucp/gio/gio_mount.cxx +++ b/ucb/source/ucp/gio/gio_mount.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. @@ -181,3 +182,5 @@ GMountOperation *ooo_mount_operation_new(const uno::Reference< ucb::XCommandEnvi pRet->pEnv = &rEnv; return (GMountOperation*)pRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gio/gio_mount.hxx b/ucb/source/ucp/gio/gio_mount.hxx index 21fa002274..31d1a749ce 100644 --- a/ucb/source/ucp/gio/gio_mount.hxx +++ b/ucb/source/ucp/gio/gio_mount.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,10 +41,6 @@ G_BEGIN_DECLS #define OOO_IS_MOUNT_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), OOO_TYPE_MOUNT_OPERATION)) #define OOO_MOUNT_OPERATION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), OOO_TYPE_MOUNT_OPERATION, OOoMountOperationClass)) -typedef struct OOoMountOperation OOoMountOperation; -typedef struct OOoMountOperationClass OOoMountOperationClass; -typedef struct OOoMountOperationPrivate OOoMountOperationPrivate; - struct OOoMountOperation { GMountOperation parent_instance; @@ -70,3 +67,5 @@ GMountOperation *ooo_mount_operation_new(const com::sun::star::uno::Reference< c G_END_DECLS #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gio/gio_outputstream.cxx b/ucb/source/ucp/gio/gio_outputstream.cxx index 2d10e25eb1..492126e385 100644 --- a/ucb/source/ucp/gio/gio_outputstream.cxx +++ b/ucb/source/ucp/gio/gio_outputstream.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. @@ -90,3 +91,5 @@ uno::Any OutputStream::queryInterface( const uno::Type &type ) throw( uno::Runti } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gio/gio_outputstream.hxx b/ucb/source/ucp/gio/gio_outputstream.hxx index aa8e22f11a..f330e401a1 100644 --- a/ucb/source/ucp/gio/gio_outputstream.hxx +++ b/ucb/source/ucp/gio/gio_outputstream.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. @@ -80,3 +81,5 @@ public: } // namespace gio #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gio/gio_provider.cxx b/ucb/source/ucp/gio/gio_provider.cxx index 72869dc46a..3b9b4fc39b 100644 --- a/ucb/source/ucp/gio/gio_provider.cxx +++ b/ucb/source/ucp/gio/gio_provider.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. @@ -93,10 +94,10 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, com::sun::star::ucb::XContentProvider ); XSERVICEINFO_IMPL_1( ContentProvider, - rtl::OUString::createFromAscii( - "com.sun.star.comp.GIOContentProvider" ), - rtl::OUString::createFromAscii( - "com.sun.star.ucb.GIOContentProvider" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.GIOContentProvider" )), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ucb.GIOContentProvider" )) ); ONE_INSTANCE_SERVICE_FACTORY_IMPL( ContentProvider ); @@ -130,3 +131,5 @@ extern "C" void * SAL_CALL component_getFactory( const sal_Char *pImplName, return pRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gio/gio_provider.hxx b/ucb/source/ucp/gio/gio_provider.hxx index a4bf10d62a..03cd826080 100644 --- a/ucb/source/ucp/gio/gio_provider.hxx +++ b/ucb/source/ucp/gio/gio_provider.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. @@ -64,3 +65,5 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gio/gio_resultset.cxx b/ucb/source/ucp/gio/gio_resultset.cxx index 847be8b9d6..a0f9505182 100644 --- a/ucb/source/ucp/gio/gio_resultset.cxx +++ b/ucb/source/ucp/gio/gio_resultset.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. @@ -57,3 +58,5 @@ void DynamicResultSet::initDynamic() initStatic(); m_xResultSet2 = m_xResultSet1; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gio/gio_resultset.hxx b/ucb/source/ucp/gio/gio_resultset.hxx index 6041383326..ca32febd40 100644 --- a/ucb/source/ucp/gio/gio_resultset.hxx +++ b/ucb/source/ucp/gio/gio_resultset.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. @@ -54,3 +55,5 @@ namespace gio } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gio/gio_seekable.cxx b/ucb/source/ucp/gio/gio_seekable.cxx index 562d04211e..e3c9a0ae33 100644 --- a/ucb/source/ucp/gio/gio_seekable.cxx +++ b/ucb/source/ucp/gio/gio_seekable.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 @@ uno::Any Seekable::queryInterface( const uno::Type &type ) throw( uno::RuntimeEx } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gio/gio_seekable.hxx b/ucb/source/ucp/gio/gio_seekable.hxx index ea9953ca0e..e41b37ee95 100644 --- a/ucb/source/ucp/gio/gio_seekable.hxx +++ b/ucb/source/ucp/gio/gio_seekable.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 @@ public: } // namespace gio #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gio/ucpgio.xml b/ucb/source/ucp/gio/ucpgio.xml index 421d5e50fd..c77118476b 100644 --- a/ucb/source/ucp/gio/ucpgio.xml +++ b/ucb/source/ucp/gio/ucpgio.xml @@ -8,7 +8,7 @@ - Caolán McNamara &;amp; Jan Navrati + Caolán McNamara & Jan Navrátil com.sun.star.comp.ucb.GIOContentProvider diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx b/ucb/source/ucp/gvfs/gvfs_content.cxx index 121c69346f..c166da3cb3 100644 --- a/ucb/source/ucp/gvfs/gvfs_content.cxx +++ b/ucb/source/ucp/gvfs/gvfs_content.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. @@ -31,7 +32,8 @@ #include #include -#include "osl/time.h" +#include +#include #include #include "osl/doublecheckedlocking.h" @@ -247,7 +249,7 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes() rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString::createFromAscii("com.sun.star.comp.GnomeVFSContent" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.GnomeVFSContent")); } uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() @@ -267,9 +269,9 @@ rtl::OUString SAL_CALL Content::getContentType() throw( uno::RuntimeException ) { if ( isFolder( uno::Reference< ucb::XCommandEnvironment >() ) ) - return rtl::OUString::createFromAscii( GVFS_FOLDER_TYPE ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GVFS_FOLDER_TYPE )); else - return rtl::OUString::createFromAscii( GVFS_FILE_TYPE ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GVFS_FILE_TYPE )); } // @@ -279,7 +281,7 @@ rtl::OUString SAL_CALL Content::getContentType() uno::Any Content::getBadArgExcept() { return uno::makeAny( lang::IllegalArgumentException - ( rtl::OUString::createFromAscii( "Wrong argument type!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Wrong argument type!")), static_cast< cppu::OWeakObject * >( this ), -1 ) ); } @@ -515,7 +517,7 @@ Content::createNewContent( const ucb::ContentInfo& Info ) rtl::OUString aURL = getOUURI(); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); name = create_document ? "[New_Content]" : "[New_Collection]"; // This looks problematic to me cf. webdav @@ -704,7 +706,7 @@ static lang::IllegalAccessException getReadOnlyException( Content *ctnt ) { return lang::IllegalAccessException - ( rtl::OUString::createFromAscii( "Property is read-only!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property is read-only!")), static_cast< cppu::OWeakObject * >( ctnt ) ); } @@ -713,7 +715,7 @@ Content::makeNewURL( const char */*newName*/ ) { rtl::OUString aNewURL = getParentURL(); if ( aNewURL.lastIndexOf( '/' ) != ( aNewURL.getLength() - 1 ) ) - aNewURL += rtl::OUString::createFromAscii( "/" ); + aNewURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); char *name = gnome_vfs_escape_string( m_info.name ); aNewURL += GnomeToOUString( name ); @@ -808,7 +810,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if ( rValue.Value >>= aNewTitle ) { if ( aNewTitle.getLength() <= 0 ) aRet[ n ] <<= lang::IllegalArgumentException - ( rtl::OUString::createFromAscii( "Empty title not allowed!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Empty title not allowed!")), static_cast< cppu::OWeakObject * >( this ), -1 ); else { char *newName = OUStringToGnome( aNewTitle ); @@ -818,7 +820,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( g_warning ("Set new name to '%s'", newName); #endif - aEvent.PropertyName = rtl::OUString::createFromAscii( "Title" ); + aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); aEvent.OldValue = uno::makeAny( GnomeToOUString( newInfo.name ) ); aEvent.NewValue = uno::makeAny( aNewTitle ); aChanges.getArray()[ nChanged ] = aEvent; @@ -831,7 +833,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( } } else aRet[ n ] <<= beans::IllegalTypeException - ( rtl::OUString::createFromAscii( "Property value has wrong type!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property value has wrong type!")), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DateCreated" ) ) || @@ -868,7 +870,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( aGuard.clear(); if (!exchangeIdentity( xNewId ) ) aRet[ nTitlePos ] <<= uno::Exception - ( rtl::OUString::createFromAscii( "Exchange failed!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Exchange failed!")), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -897,7 +899,7 @@ void Content::queryChildren( ContentRefList& rChildren ) sal_Int32 nURLPos = aURL.lastIndexOf( '/' ); if ( nURLPos != ( aURL.getLength() - 1 ) ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); sal_Int32 nLen = aURL.getLength(); @@ -1032,7 +1034,7 @@ void Content::transfer(const ucb::TransferInfo & /*rArgs*/, ucbhelper::cancelCommandExecution ( uno::makeAny ( ucb::InteractiveBadTransferURLException - ( rtl::OUString::createFromAscii( "Unsupported URL scheme!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unsupported URL scheme!")), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); } @@ -1186,7 +1188,7 @@ uno::Any Content::mapVFSException( const GnomeVFSResult result, sal_Bool bWrite aArgs[ 0 ] <<= m_xIdentifier->getContentIdentifier(); aException <<= ucb::InteractiveAugmentedIOException - ( rtl::OUString::createFromAscii( "Not found!" ), + ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Not found!")), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, ucb::IOErrorCode_NOT_EXISTING, @@ -1354,7 +1356,7 @@ uno::Sequence< beans::Property > Content::getProperties( beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ) }; - const int nProps = sizeof (aGenericProperties) / sizeof (aGenericProperties[0]); + const int nProps = SAL_N_ELEMENTS(aGenericProperties); return uno::Sequence< beans::Property > ( aGenericProperties, nProps ); @@ -1645,9 +1647,17 @@ extern "C" { ucbhelper::InteractionSupplyAuthentication > & xSupp = xRequest->getAuthenticationSupplier(); - aUserName = xSupp->getUserName(); - aDomain = xSupp->getRealm(); - aPassword = xSupp->getPassword(); + ::rtl::OUString aNewDomain, aNewUserName, aNewPassword; + + aNewUserName = xSupp->getUserName(); + if ( aNewUserName.getLength() ) + aUserName = aNewUserName; + aNewDomain = xSupp->getRealm(); + if ( aNewDomain.getLength() ) + aDomain = aNewDomain; + aNewPassword = xSupp->getPassword(); + if ( aNewPassword.getLength() ) + aPassword = aNewPassword; { osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() ); @@ -1815,3 +1825,5 @@ gvfs::Authentication::~Authentication() refresh_auth( vq ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gvfs/gvfs_content.hxx b/ucb/source/ucp/gvfs/gvfs_content.hxx index 3b73162572..cb59674a6a 100644 --- a/ucb/source/ucp/gvfs/gvfs_content.hxx +++ b/ucb/source/ucp/gvfs/gvfs_content.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. @@ -269,3 +270,5 @@ extern "C" { } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gvfs/gvfs_directory.cxx b/ucb/source/ucp/gvfs/gvfs_directory.cxx index 9654b3bc8d..fe2763e515 100644 --- a/ucb/source/ucp/gvfs/gvfs_directory.cxx +++ b/ucb/source/ucp/gvfs/gvfs_directory.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,10 +135,10 @@ struct gvfs::DataSupplier_Impl ResultList::const_iterator end = m_aResults.end(); while ( it != end ) - { - delete (*it); - it++; - } + { + delete (*it); + ++it; + } } }; @@ -174,7 +175,7 @@ rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex ) escaped_name = gnome_vfs_escape_string( m_pImpl->m_aResults[ nIndex ]->aInfo.name ); if ( ( aId.lastIndexOf( '/' ) + 1 ) != aId.getLength() ) - aId += rtl::OUString::createFromAscii( "/" ); + aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aId += rtl::OUString::createFromAscii( escaped_name ); @@ -421,3 +422,4 @@ sal_Bool DataSupplier::getData() +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gvfs/gvfs_directory.hxx b/ucb/source/ucp/gvfs/gvfs_directory.hxx index c771d497d9..f5ba511f26 100644 --- a/ucb/source/ucp/gvfs/gvfs_directory.hxx +++ b/ucb/source/ucp/gvfs/gvfs_directory.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. @@ -93,3 +94,5 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gvfs/gvfs_provider.cxx b/ucb/source/ucp/gvfs/gvfs_provider.cxx index 07e232317a..d6fdcf194b 100644 --- a/ucb/source/ucp/gvfs/gvfs_provider.cxx +++ b/ucb/source/ucp/gvfs/gvfs_provider.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. @@ -85,10 +86,10 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, //========================================================================= XSERVICEINFO_IMPL_1( ContentProvider, - rtl::OUString::createFromAscii( - "com.sun.star.comp.GnomeVFSContentProvider" ), - rtl::OUString::createFromAscii( - "com.sun.star.ucb.GnomeVFSContentProvider" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.GnomeVFSContentProvider" )), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ucb.GnomeVFSContentProvider" )) ); //========================================================================= // // Service factory implementation. @@ -181,3 +182,4 @@ component_getFactory( const sal_Char *pImplName, } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gvfs/gvfs_provider.hxx b/ucb/source/ucp/gvfs/gvfs_provider.hxx index 39cd7b0cdb..884dd648c5 100644 --- a/ucb/source/ucp/gvfs/gvfs_provider.hxx +++ b/ucb/source/ucp/gvfs/gvfs_provider.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. @@ -63,3 +64,4 @@ public: #endif /* _PROVIDER_HXX_ */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gvfs/gvfs_stream.cxx b/ucb/source/ucp/gvfs/gvfs_stream.cxx index 8c5c7c676f..2a804bff0a 100644 --- a/ucb/source/ucp/gvfs/gvfs_stream.cxx +++ b/ucb/source/ucp/gvfs/gvfs_stream.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. @@ -341,3 +342,5 @@ void Stream::throwOnError( GnomeVFSResult result ) throw IOException( aMsg, static_cast< cppu::OWeakObject * >( this ) ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/gvfs/gvfs_stream.hxx b/ucb/source/ucp/gvfs/gvfs_stream.hxx index d7fb17cd6b..6a20606f10 100644 --- a/ucb/source/ucp/gvfs/gvfs_stream.hxx +++ b/ucb/source/ucp/gvfs/gvfs_stream.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 @@ public: } // namespace gvfs #endif // _GVFSSTREAM_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/hierarchy/dynamicresultset.cxx b/ucb/source/ucp/hierarchy/dynamicresultset.cxx index 399b000ca0..6b03e98e78 100644 --- a/ucb/source/ucp/hierarchy/dynamicresultset.cxx +++ b/ucb/source/ucp/hierarchy/dynamicresultset.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. @@ -89,3 +90,4 @@ void DynamicResultSet::initDynamic() m_xResultSet2 = m_xResultSet1; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/hierarchy/dynamicresultset.hxx b/ucb/source/ucp/hierarchy/dynamicresultset.hxx index 505d4ea5ae..1775801b21 100644 --- a/ucb/source/ucp/hierarchy/dynamicresultset.hxx +++ b/ucb/source/ucp/hierarchy/dynamicresultset.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 /* !_DYNAMICRESULTSET_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index e868dfc023..11000a4965 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.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,12 +122,6 @@ HierarchyContent* HierarchyContent::create( RTL_CONSTASCII_STRINGPARAM( HIERARCHY_LINK_CONTENT_TYPE ) ) ) return 0; -#if 0 - // Fail, if content does exist. - if ( hasData( rxSMgr, pProvider, Identifier ) ) - return 0; -#endif - return new HierarchyContent( rxSMgr, pProvider, Identifier, Info ); } @@ -309,8 +304,8 @@ uno::Sequence< uno::Type > SAL_CALL HierarchyContent::getTypes() rtl::OUString SAL_CALL HierarchyContent::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString::createFromAscii( - "com.sun.star.comp.ucb.HierarchyContent" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.HierarchyContent" )); } //========================================================================= @@ -322,14 +317,14 @@ HierarchyContent::getSupportedServiceNames() uno::Sequence< rtl::OUString > aSNS( 1 ); if ( m_eKind == LINK ) - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii( - HIERARCHY_LINK_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + HIERARCHY_LINK_CONTENT_SERVICE_NAME )); else if ( m_eKind == FOLDER ) - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii( - HIERARCHY_FOLDER_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + HIERARCHY_FOLDER_CONTENT_SERVICE_NAME )); else - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii( - HIERARCHY_ROOT_FOLDER_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + HIERARCHY_ROOT_FOLDER_CONTENT_SERVICE_NAME )); return aSNS; } @@ -392,8 +387,8 @@ uno::Any SAL_CALL HierarchyContent::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -414,8 +409,8 @@ uno::Any SAL_CALL HierarchyContent::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -426,8 +421,8 @@ uno::Any SAL_CALL HierarchyContent::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "No properties!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No properties!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -466,8 +461,8 @@ uno::Any SAL_CALL HierarchyContent::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -492,8 +487,8 @@ uno::Any SAL_CALL HierarchyContent::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -534,8 +529,8 @@ uno::Any SAL_CALL HierarchyContent::execute( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), Environment, - rtl::OUString::createFromAscii( - "Cannot remove persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot remove persistent data!" )), this ); // Unreachable } @@ -558,8 +553,8 @@ uno::Any SAL_CALL HierarchyContent::execute( OSL_ENSURE( sal_False, "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -660,12 +655,12 @@ HierarchyContent::createNewContent( const ucb::ContentInfo& Info ) "HierarchyContent::createNewContent - empty identifier!" ); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); if ( bCreateFolder ) - aURL += rtl::OUString::createFromAscii( "New_Folder" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Folder")); else - aURL += rtl::OUString::createFromAscii( "New_Link" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Link")); uno::Reference< ucb::XContentIdentifier > xId = new ::ucbhelper::ContentIdentifier( m_xSMgr, aURL ); @@ -827,7 +822,7 @@ HierarchyContent::makeNewIdentifier( const rtl::OUString& rTitle ) // Assemble new content identifier... HierarchyUri aUri( m_xIdentifier->getContentIdentifier() ); rtl::OUString aNewURL = aUri.getParentUri(); - aNewURL += rtl::OUString::createFromAscii( "/" ); + aNewURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aNewURL += ::ucb_impl::urihelper::encodeSegment( rTitle ); return uno::Reference< ucb::XContentIdentifier >( @@ -853,7 +848,7 @@ void HierarchyContent::queryChildren( HierarchyContentRefList& rChildren ) if ( nURLPos != ( aURL.getLength() - 1 ) ) { // No trailing slash found. Append. - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } sal_Int32 nLen = aURL.getLength(); @@ -1067,28 +1062,28 @@ uno::Reference< sdbc::XRow > HierarchyContent::getPropertyValues( { // Append all Core Properties. xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "ContentType" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData.getContentType() ); xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "Title" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), // @@@ Might actually be read-only! beans::PropertyAttribute::BOUND ), rData.getTitle() ); xRow->appendBoolean( - beans::Property( rtl::OUString::createFromAscii( "IsDocument" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData.getIsDocument() ); xRow->appendBoolean( - beans::Property( rtl::OUString::createFromAscii( "IsFolder" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND @@ -1097,7 +1092,7 @@ uno::Reference< sdbc::XRow > HierarchyContent::getPropertyValues( if ( rData.getIsDocument() ) xRow->appendString( - beans::Property( rtl::OUString::createFromAscii( "TargetURL" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), @@ -1177,8 +1172,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1186,8 +1181,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1195,8 +1190,17 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), + static_cast< cppu::OWeakObject * >( this ) ); + } + else if ( rValue.Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM( "CreatableContentsInfo" ) ) ) + { + // Read-only property! + aRet[ n ] <<= lang::IllegalAccessException( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1214,8 +1218,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( if ( isReadOnly() ) { aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else @@ -1250,8 +1254,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( else { aRet[ n ] <<= lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Empty title not allowed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Empty title not allowed!" )), static_cast< cppu::OWeakObject * >( this ), -1 ); } @@ -1259,8 +1263,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1271,8 +1275,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( if ( isReadOnly() ) { aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else @@ -1304,8 +1308,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( else { aRet[ n ] <<= lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Empty target URL not allowed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Empty target URL not allowed!" )), static_cast< cppu::OWeakObject * >( this ), -1 ); } @@ -1313,16 +1317,16 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } else { aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString::createFromAscii( - "TargetURL only supported by links!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "TargetURL only supported by links!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1376,8 +1380,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( else { aRet[ n ] <<= uno::Exception( - rtl::OUString::createFromAscii( - "No property set for storing the value!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No property set for storing the value!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1411,14 +1415,14 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( // Set error . aRet[ nTitlePos ] <<= uno::Exception( - rtl::OUString::createFromAscii( "Exchange failed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Exchange failed!")), static_cast< cppu::OWeakObject * >( this ) ); } } if ( aOldTitle.getLength() ) { - aEvent.PropertyName = rtl::OUString::createFromAscii( "Title" ); + aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); aEvent.OldValue = uno::makeAny( aOldTitle ); aEvent.NewValue = uno::makeAny( m_aProps.getTitle() ); @@ -1446,8 +1450,8 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot store persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot store persistent data!" )), this ); // Unreachable } @@ -1475,8 +1479,8 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString::createFromAscii( - "Not supported by root folder!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Not supported by root folder!" )), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -1486,7 +1490,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, if ( m_aProps.getTitle().getLength() == 0 ) { uno::Sequence< rtl::OUString > aProps( 1 ); - aProps[ 0 ] = rtl::OUString::createFromAscii( "Title" ); + aProps[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); ucbhelper::cancelCommandExecution( uno::makeAny( ucb::MissingPropertiesException( rtl::OUString(), @@ -1534,7 +1538,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, do { rtl::OUString aNewId = xId->getContentIdentifier(); - aNewId += rtl::OUString::createFromAscii( "_" ); + aNewId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_")); aNewId += rtl::OUString::valueOf( ++nTry ); xId = new ::ucbhelper::ContentIdentifier( m_xSMgr, aNewId ); } @@ -1545,8 +1549,8 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedNameClashException( - rtl::OUString::createFromAscii( - "Unable to resolve name clash!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to resolve name clash!" )), static_cast< cppu::OWeakObject * >( this ), nNameClashResolve ) ), xEnv ); @@ -1555,7 +1559,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, else { rtl::OUString aNewTitle( m_aProps.getTitle() ); - aNewTitle += rtl::OUString::createFromAscii( "_" ); + aNewTitle += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_")); aNewTitle += rtl::OUString::valueOf( nTry ); m_aProps.setTitle( aNewTitle ); } @@ -1598,7 +1602,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( "Cannot store persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot store persistent data!")), this ); // Unreachable } @@ -1629,8 +1633,8 @@ void HierarchyContent::destroy( sal_Bool bDeletePhysical, { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString::createFromAscii( - "Not persistent!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Not persistent!" )), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -1641,8 +1645,8 @@ void HierarchyContent::destroy( sal_Bool bDeletePhysical, { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString::createFromAscii( - "Not supported by root folder!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Not supported by root folder!" )), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -1684,8 +1688,8 @@ void HierarchyContent::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString::createFromAscii( - "Not persistent!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Not persistent!" )), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -1711,7 +1715,7 @@ void HierarchyContent::transfer( if ( nPos != ( aId.getLength() - 1 ) ) { // No trailing slash found. Append. - aId += rtl::OUString::createFromAscii( "/" ); + aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } if ( rInfo.SourceURL.getLength() <= aId.getLength() ) @@ -1730,8 +1734,8 @@ void HierarchyContent::transfer( ucb::IOErrorCode_RECURSIVE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Target is equal to or is a child of source!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Target is equal to or is a child of source!" )), this ); // Unreachable } @@ -1771,8 +1775,8 @@ void HierarchyContent::transfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot instanciate source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot instanciate source object!" )), this ); // Unreachable } @@ -1782,8 +1786,8 @@ void HierarchyContent::transfer( ////////////////////////////////////////////////////////////////////// rtl::OUString aType = xSource->isFolder() - ? rtl::OUString::createFromAscii( HIERARCHY_FOLDER_CONTENT_TYPE ) - : rtl::OUString::createFromAscii( HIERARCHY_LINK_CONTENT_TYPE ); + ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_FOLDER_CONTENT_TYPE )) + : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_LINK_CONTENT_TYPE )); ucb::ContentInfo aContentInfo; aContentInfo.Type = aType; aContentInfo.Attributes = 0; @@ -1806,8 +1810,8 @@ void HierarchyContent::transfer( ucb::IOErrorCode_CANT_CREATE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "XContentCreator::createNewContent failed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "XContentCreator::createNewContent failed!" )), this ); // Unreachable } @@ -1901,7 +1905,7 @@ void HierarchyContent::transfer( rtl::OUString aChildId = xId->getContentIdentifier(); if ( ( aChildId.lastIndexOf( '/' ) + 1 ) != aChildId.getLength() ) - aChildId += rtl::OUString::createFromAscii( "/" ); + aChildId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aChildId += rResult.getName(); @@ -1941,8 +1945,8 @@ void HierarchyContent::transfer( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot remove persistent data of source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot remove persistent data of source object!" )), this ); // Unreachable } diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.hxx b/ucb/source/ucp/hierarchy/hierarchycontent.hxx index 4dcb339ad6..e9ad79cd28 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.hxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.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,14 +71,14 @@ public: HierarchyContentProperties( const HierarchyEntryData::Type & rType ) : m_aData( rType ), m_aContentType( rType == HierarchyEntryData::FOLDER - ? rtl::OUString::createFromAscii( HIERARCHY_FOLDER_CONTENT_TYPE ) - : rtl::OUString::createFromAscii( HIERARCHY_LINK_CONTENT_TYPE ) ) {} + ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_FOLDER_CONTENT_TYPE )) + : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_LINK_CONTENT_TYPE )) ) {} HierarchyContentProperties( const HierarchyEntryData & rData ) : m_aData( rData ), m_aContentType( rData.getType() == HierarchyEntryData::FOLDER - ? rtl::OUString::createFromAscii( HIERARCHY_FOLDER_CONTENT_TYPE ) - : rtl::OUString::createFromAscii( HIERARCHY_LINK_CONTENT_TYPE ) ) {} + ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_FOLDER_CONTENT_TYPE )) + : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_LINK_CONTENT_TYPE )) ) {} const rtl::OUString & getName() const { return m_aData.getName(); } void setName( const rtl::OUString & rName ) { m_aData.setName( rName ); }; @@ -309,3 +310,5 @@ public: } // namespace hierarchy_ucp #endif /* !_HIERARCHYCONTENT_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx b/ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx index 32677da383..fb3b750617 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontentcaps.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontentcaps.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. @@ -65,6 +66,7 @@ #include #include #include +#include #include "hierarchycontent.hxx" using namespace com::sun::star; @@ -763,3 +765,5 @@ uno::Sequence< ucb::CommandInfo > HierarchyContent::getCommands( } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx b/ucb/source/ucp/hierarchy/hierarchydata.cxx index bed1d9105d..20acffd829 100644 --- a/ucb/source/ucp/hierarchy/hierarchydata.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydata.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. @@ -46,9 +47,7 @@ #include #include #include -#ifndef _COM_SUN_STAR_UTIL_XOFFICEINSTALLTIONDIRECTORIES_HPP_ #include -#endif #include "hierarchyprovider.hxx" #include "hierarchyuri.hxx" @@ -182,7 +181,7 @@ sal_Bool HierarchyEntry::getData( HierarchyEntryData& rData ) if ( xRootReadAccess.is() ) { rtl::OUString aTitlePath = m_aPath; - aTitlePath += rtl::OUString::createFromAscii( "/Title" ); + aTitlePath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Title")); // Note: Avoid NoSuchElementExceptions, because exceptions are // relatively 'expensive'. Checking for availability of @@ -207,7 +206,7 @@ sal_Bool HierarchyEntry::getData( HierarchyEntryData& rData ) // Get TargetURL value. rtl::OUString aTargetURLPath = m_aPath; - aTargetURLPath += rtl::OUString::createFromAscii( "/TargetURL" ); + aTargetURLPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/TargetURL")); if ( !( xRootReadAccess->getByHierarchicalName( aTargetURLPath ) >>= aValue ) ) { @@ -227,7 +226,7 @@ sal_Bool HierarchyEntry::getData( HierarchyEntryData& rData ) rData.setTargetURL( aValue ); rtl::OUString aTypePath = m_aPath; - aTypePath += rtl::OUString::createFromAscii( "/Type" ); + aTypePath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Type")); if ( xRootReadAccess->hasByHierarchicalName( aTypePath ) ) { // Might not be present since it was introduced long after @@ -350,7 +349,7 @@ sal_Bool HierarchyEntry::setData( else { xParentNameAccess->getByName( - rtl::OUString::createFromAscii( "Children" ) ) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Children")) ) >>= xNameAccess; } @@ -398,8 +397,8 @@ sal_Bool HierarchyEntry::setData( // Append new entry to parents child list, // which is a set of entries. xParentNameAccess->getByName( - rtl::OUString::createFromAscii( - "Children" ) ) >>= xFac; + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Children" )) ) >>= xFac; } OSL_ENSURE( xFac.is(), @@ -430,7 +429,7 @@ sal_Bool HierarchyEntry::setData( { // Set Title value. xNameReplace->replaceByName( - rtl::OUString::createFromAscii( "Title" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), uno::makeAny( rData.getTitle() ) ); // Set TargetURL value. @@ -446,14 +445,14 @@ sal_Bool HierarchyEntry::setData( = m_xOfficeInstDirs->makeRelocatableURL( aValue ); xNameReplace->replaceByName( - rtl::OUString::createFromAscii( "TargetURL" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")), uno::makeAny( aValue ) ); // Set Type value. sal_Int32 nType = rData.getType() == HierarchyEntryData::LINK ? 0 : 1; xNameReplace->replaceByName( - rtl::OUString::createFromAscii( "Type" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type")), uno::makeAny( nType ) ); if ( xContainer.is() ) @@ -526,15 +525,6 @@ sal_Bool HierarchyEntry::move( if ( aNewPath == m_aPath ) return sal_True; -#if 0 - // In the "near future"... ( not yet implemented in config db ) - - - get update access for m_aPath - - update access -> XNamed - - xNamed::setName( newName ) - - updateaccess commit -#else - sal_Bool bOldRoot = sal_True; uno::Reference< util::XChangesBatch > xOldParentBatch; @@ -677,7 +667,7 @@ sal_Bool HierarchyEntry::move( else { xOldParentNameAccess->getByName( - rtl::OUString::createFromAscii( "Children" ) ) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Children")) ) >>= xOldNameContainer; } @@ -759,7 +749,7 @@ sal_Bool HierarchyEntry::move( else { xNewParentNameAccess->getByName( - rtl::OUString::createFromAscii( "Children" ) ) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Children")) ) >>= xNewNameContainer; } } @@ -770,7 +760,7 @@ sal_Bool HierarchyEntry::move( return sal_False; xNewNameReplace->replaceByName( - rtl::OUString::createFromAscii( "Title" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), uno::makeAny( rData.getTitle() ) ); // TargetURL property may contain a reference to the Office @@ -782,11 +772,11 @@ sal_Bool HierarchyEntry::move( if ( m_xOfficeInstDirs.is() && ( aValue.getLength() > 0 ) ) aValue = m_xOfficeInstDirs->makeRelocatableURL( aValue ); xNewNameReplace->replaceByName( - rtl::OUString::createFromAscii( "TargetURL" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")), uno::makeAny( aValue ) ); sal_Int32 nType = rData.getType() == HierarchyEntryData::LINK ? 0 : 1; xNewNameReplace->replaceByName( - rtl::OUString::createFromAscii( "Type" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type")), uno::makeAny( nType ) ); xNewNameContainer->insertByName( aNewKey, aEntry ); @@ -826,30 +816,7 @@ sal_Bool HierarchyEntry::move( return sal_False; } -#if 0 - ////////////////////////////////////////////////////////////////////// - // (4) Commit changes... - ////////////////////////////////////////////////////////////////////// - - try - { - xNewParentBatch->commitChanges(); - - if ( bDifferentParents ) - xOldParentBatch->commitChanges(); - } - catch ( lang::WrappedTargetException const & ) - { - // commitChanges - - OSL_ENSURE( sal_False, - "HierarchyEntry::move - caught WrappedTargetException!" ); - return sal_False; - } -#endif - return sal_True; -#endif } //========================================================================= @@ -925,7 +892,7 @@ sal_Bool HierarchyEntry::remove() // Append new entry to parents child list, // which is a set of entries. xParentNameAccess->getByName( - rtl::OUString::createFromAscii( "Children" ) ) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Children")) ) >>= xContainer; } @@ -993,7 +960,7 @@ sal_Bool HierarchyEntry::first( iterator& it ) if ( m_aPath.getLength() > 0 ) { rtl::OUString aPath = m_aPath; - aPath += rtl::OUString::createFromAscii( "/Children" ); + aPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Children")); xRootHierNameAccess->getByHierarchicalName( aPath ) >>= xNameAccess; @@ -1205,9 +1172,9 @@ const HierarchyEntryData& HierarchyEntry::iterator::operator*() const rtl::OUString aTargetURL = aTitle; rtl::OUString aType = aTitle; - aTitle += rtl::OUString::createFromAscii( "/Title" ); - aTargetURL += rtl::OUString::createFromAscii( "/TargetURL" ); - aType += rtl::OUString::createFromAscii( "/Type" ); + aTitle += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Title")); + aTargetURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/TargetURL")); + aType += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Type")); rtl::OUString aValue; m_pImpl->dir->getByHierarchicalName( aTitle ) >>= aValue; @@ -1264,3 +1231,5 @@ const HierarchyEntryData& HierarchyEntry::iterator::operator*() const } } // namespace hierarchy_ucp + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/hierarchy/hierarchydata.hxx b/ucb/source/ucp/hierarchy/hierarchydata.hxx index 419a66b0c6..a20db23348 100644 --- a/ucb/source/ucp/hierarchy/hierarchydata.hxx +++ b/ucb/source/ucp/hierarchy/hierarchydata.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. @@ -147,3 +148,5 @@ public: } // namespace hierarchy_ucp #endif /* !_HIERARCHYDATA_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx index ee1e31821d..d4b9967682 100644 --- a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydatasource.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. @@ -267,14 +268,14 @@ XTYPEPROVIDER_IMPL_4( HierarchyDataSource, //========================================================================= XSERVICEINFO_IMPL_0( HierarchyDataSource, - rtl::OUString::createFromAscii( - "com.sun.star.comp.ucb.HierarchyDataSource" ) ) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.HierarchyDataSource" )) ) { uno::Sequence< rtl::OUString > aSNS( 2 ); - aSNS[ 0 ] = rtl::OUString::createFromAscii( - "com.sun.star.ucb.DefaultHierarchyDataSource" ); - aSNS[ 1 ] = rtl::OUString::createFromAscii( - "com.sun.star.ucb.HierarchyDataSource" ); + aSNS[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ucb.DefaultHierarchyDataSource" )); + aSNS[ 1 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ucb.HierarchyDataSource" )); return aSNS; } @@ -1114,3 +1115,4 @@ HierarchyDataAccess::getPendingChanges() return xOrig->getPendingChanges(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.hxx b/ucb/source/ucp/hierarchy/hierarchydatasource.hxx index 2e4a7bc7d3..f221c110d8 100644 --- a/ucb/source/ucp/hierarchy/hierarchydatasource.hxx +++ b/ucb/source/ucp/hierarchy/hierarchydatasource.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. @@ -123,3 +124,5 @@ private: } // namespace hierarchy_ucp #endif /* !_HIERARCHYDATASOURCE_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx b/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx index ebd5739afb..456b59ad87 100644 --- a/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydatasupplier.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. @@ -110,7 +111,7 @@ DataSupplier_Impl::~DataSupplier_Impl() while ( it != end ) { delete (*it); - it++; + ++it; } } @@ -162,7 +163,7 @@ rtl::OUString HierarchyResultSetDataSupplier::queryContentIdentifierString( = m_pImpl->m_xContent->getIdentifier()->getContentIdentifier(); if ( ( aId.lastIndexOf( '/' ) + 1 ) != aId.getLength() ) - aId += rtl::OUString::createFromAscii( "/" ); + aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aId += m_pImpl->m_aResults[ nIndex ]->aData.getName(); @@ -369,9 +370,9 @@ HierarchyResultSetDataSupplier::queryPropertyValues( sal_uInt32 nIndex ) if ( getResult( nIndex ) ) { static rtl::OUString aFolderType( - rtl::OUString::createFromAscii( HIERARCHY_FOLDER_CONTENT_TYPE ) ); + RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_FOLDER_CONTENT_TYPE ) ); static rtl::OUString aLinkType( - rtl::OUString::createFromAscii( HIERARCHY_LINK_CONTENT_TYPE ) ); + RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_LINK_CONTENT_TYPE ) ); HierarchyContentProperties aData( m_pImpl->m_aResults[ nIndex ]->aData ); @@ -444,3 +445,4 @@ sal_Bool HierarchyResultSetDataSupplier::checkResult( return sal_True; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/hierarchy/hierarchydatasupplier.hxx b/ucb/source/ucp/hierarchy/hierarchydatasupplier.hxx index 1d1755b197..504ba68fc5 100644 --- a/ucb/source/ucp/hierarchy/hierarchydatasupplier.hxx +++ b/ucb/source/ucp/hierarchy/hierarchydatasupplier.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. @@ -80,3 +81,5 @@ public: } // namespace hierarchy_ucp #endif /* !_HIERARCHYDATASUPPLIER_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx index e35aa5a22e..e040babf18 100644 --- a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx +++ b/ucb/source/ucp/hierarchy/hierarchyprovider.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. @@ -101,10 +102,10 @@ XTYPEPROVIDER_IMPL_4( HierarchyContentProvider, //========================================================================= XSERVICEINFO_IMPL_1( HierarchyContentProvider, - rtl::OUString::createFromAscii( - "com.sun.star.comp.ucb.HierarchyContentProvider" ), - rtl::OUString::createFromAscii( - HIERARCHY_CONTENT_PROVIDER_SERVICE_NAME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.HierarchyContentProvider" )), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + HIERARCHY_CONTENT_PROVIDER_SERVICE_NAME )) ); //========================================================================= // @@ -164,21 +165,9 @@ void SAL_CALL HierarchyContentProvider::initialize( const uno::Sequence< uno::Any >& aArguments ) throw( uno::Exception, uno::RuntimeException ) { -#if 0 - if ( aArguments.getLength() > 0 ) - { - // Extract config provider from service init args. - aArguments[ 0 ] >>= m_xConfigProvider; - - OSL_ENSURE( m_xConfigProvider.is(), - "HierarchyContentProvider::initialize - " - "No config provider!" ); - } -#else if ( aArguments.getLength() > 0 ) OSL_ENSURE( false, "HierarchyContentProvider::initialize : not supported!" ); -#endif } //========================================================================= @@ -336,3 +325,4 @@ HierarchyContentProvider::getOfficeInstallationDirectories() return m_xOfficeInstDirs; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.hxx b/ucb/source/ucp/hierarchy/hierarchyprovider.hxx index 1db4ce758e..0d812739c9 100644 --- a/ucb/source/ucp/hierarchy/hierarchyprovider.hxx +++ b/ucb/source/ucp/hierarchy/hierarchyprovider.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. @@ -153,3 +154,5 @@ public: } // namespace hierarchy_ucp #endif /* !_HIERARCHYPROVIDER_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/hierarchy/hierarchyservices.cxx b/ucb/source/ucp/hierarchy/hierarchyservices.cxx index d884b29366..132fc55217 100644 --- a/ucb/source/ucp/hierarchy/hierarchyservices.cxx +++ b/ucb/source/ucp/hierarchy/hierarchyservices.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,3 +85,4 @@ extern "C" void * SAL_CALL component_getFactory( return pRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/hierarchy/hierarchyuri.cxx b/ucb/source/ucp/hierarchy/hierarchyuri.cxx index 51b18c6482..9891d8c96e 100644 --- a/ucb/source/ucp/hierarchy/hierarchyuri.cxx +++ b/ucb/source/ucp/hierarchy/hierarchyuri.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. @@ -66,7 +67,7 @@ void HierarchyUri::init() const if ( ( m_aUri.getLength() < HIERARCHY_URL_SCHEME_LENGTH + 1 ) ) { // error, but remember that we did a init(). - m_aPath = rtl::OUString::createFromAscii( "/" ); + m_aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); return; } @@ -138,17 +139,17 @@ void HierarchyUri::init() const if ( nStart == m_aUri.getLength() ) { // error, but remember that we did a init(). - m_aPath = rtl::OUString::createFromAscii( "/" ); + m_aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); return; } // Empty path segments? if ( m_aUri.indexOf( - rtl::OUString::createFromAscii( "//" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("//")), nStart ) != -1 ) { // error, but remember that we did a init(). - m_aPath = rtl::OUString::createFromAscii( "/" ); + m_aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); return; } @@ -158,7 +159,7 @@ void HierarchyUri::init() const if ( nEnd == nStart ) { // error, but remember that we did a init(). - m_aPath = rtl::OUString::createFromAscii( "/" ); + m_aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); return; } @@ -166,7 +167,7 @@ void HierarchyUri::init() const { // Trailing slash missing. nEnd = m_aUri.getLength(); - m_aUri += rtl::OUString::createFromAscii( "/" ); + m_aUri += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } m_aService = m_aUri.copy( nStart, nEnd - nStart ); @@ -202,8 +203,9 @@ void HierarchyUri::init() const else { // error, but remember that we did a init(). - m_aPath = rtl::OUString::createFromAscii( "/" ); + m_aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/hierarchy/hierarchyuri.hxx b/ucb/source/ucp/hierarchy/hierarchyuri.hxx index 6738214cb6..a1c9265697 100644 --- a/ucb/source/ucp/hierarchy/hierarchyuri.hxx +++ b/ucb/source/ucp/hierarchy/hierarchyuri.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. @@ -89,3 +90,5 @@ inline sal_Bool HierarchyUri::isRootFolder() const } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/inc/urihelper.hxx b/ucb/source/ucp/inc/urihelper.hxx index fbf4cdb76f..bc0e17e2a6 100644 --- a/ucb/source/ucp/inc/urihelper.hxx +++ b/ucb/source/ucp/inc/urihelper.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. @@ -121,3 +122,5 @@ namespace ucb_impl { namespace urihelper { } } // namespace #endif /* !INCLUDED_URIHELPER_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/odma/makefile.mk b/ucb/source/ucp/odma/makefile.mk index c82a85e26e..7303a37318 100644 --- a/ucb/source/ucp/odma/makefile.mk +++ b/ucb/source/ucp/odma/makefile.mk @@ -58,7 +58,7 @@ SLOFILES=\ $(SLO)$/odma_contentcaps.obj LIB1TARGET=$(SLB)$/_$(TARGET).lib -LIB1OBJFILES=$(SLOFILES) +LIB1OBJFILES=$(SLO1FILES) # --- Shared-Library --------------------------------------------------- @@ -91,6 +91,13 @@ APP2STDLIBS=$(SALLIB) \ DEF2DES=UCB ODMA URL converter +# --- odma_lib library ----------------------------------------------- + +SLO3FILES=$(SLO)$/odma_lib.obj + +LIB3TARGET=$(SLB)$/odma_lib.lib +LIB3OBJFILES=$(SLO3FILES) + # --- Targets ---------------------------------------------------------- .INCLUDE: target.mk diff --git a/ucb/source/ucp/odma/odma.h b/ucb/source/ucp/odma/odma.h index e3ab8acc4a..a46c38f7d9 100644 --- a/ucb/source/ucp/odma/odma.h +++ b/ucb/source/ucp/odma/odma.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* odma.h - Definitions, prototypes, etc. for Open Document Managment API (ODMA) version 2.0. @@ -313,3 +314,5 @@ ODMSTATUS WINAPI ODMSetDocRelation(ODMHANDLE odmHandle, LPSTR lpszDocId, #endif #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx index 663436b2cb..54d60d36f7 100644 --- a/ucb/source/ucp/odma/odma_content.cxx +++ b/ucb/source/ucp/odma/odma_content.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. @@ -123,10 +124,6 @@ uno::Any SAL_CALL Content::queryInterface( const uno::Type & rType ) uno::Any aRet; // @@@ Add support for additional interfaces. -#if 0 - aRet = cppu::queryInterface( rType, - static_cast< yyy::Xxxxxxxxx * >( this ) ); -#endif return aRet.hasValue() ? aRet : ContentImplHelper::queryInterface( rType ); } @@ -182,7 +179,7 @@ rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { // @@@ Adjust implementation name. Keep the prefix "com.sun.star.comp."! - return rtl::OUString::createFromAscii( "com.sun.star.comp.odma.Content" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.odma.Content")); } //========================================================================= @@ -193,7 +190,7 @@ uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() // @@@ Adjust macro name. uno::Sequence< rtl::OUString > aSNS( 1 ); aSNS.getArray()[ 0 ] - = rtl::OUString::createFromAscii( ODMA_CONTENT_SERVICE_NAME ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODMA_CONTENT_SERVICE_NAME )); return aSNS; } @@ -208,7 +205,7 @@ rtl::OUString SAL_CALL Content::getContentType() throw( uno::RuntimeException ) { // @@@ Adjust macro name ( def in odma_provider.hxx ). - return rtl::OUString::createFromAscii( ODMA_CONTENT_TYPE ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODMA_CONTENT_TYPE )); } //========================================================================= @@ -397,7 +394,7 @@ uno::Any SAL_CALL Content::execute( } catch(uno::Exception&) { - OSL_ENSURE(0,"Exception occured while creating the file content!"); + OSL_ENSURE(0,"Exception occurred while creating the file content!"); } xDataSink->setInputStream( xIn ); } @@ -471,6 +468,12 @@ uno::Any SAL_CALL Content::execute( } else if( ! aCommand.Name.compareToAscii( "transfer" ) ) { + // So far I have determined that this command is called when + // doing "Save As" to copy an already written backup copy of + // the document in the file system into the DMS. + + // Maybe also in other situations. + ucb::TransferInfo aTransferInfo; if( ! ( aCommand.Argument >>= aTransferInfo ) ) { @@ -486,81 +489,20 @@ uno::Any SAL_CALL Content::execute( ::rtl::Reference aProp = m_aProps; if(aProp->m_bIsFolder) { - aProp = getContentProvider()->getContentPropertyWithTitle(aTransferInfo.NewTitle); + aProp = getContentProvider()->getContentPropertyWithDocumentId(aTransferInfo.NewTitle); if(!aProp.is()) aProp = getContentProvider()->getContentPropertyWithSavedAsName(aTransferInfo.NewTitle); sal_Bool bError = !aProp.is(); - if(bError) - { - sal_Char* pExtension = NULL; - ::rtl::OString sExt; - sal_Int32 nPos = aTransferInfo.NewTitle.lastIndexOf('.'); - if(nPos != -1) - { - sExt = ::rtl::OUStringToOString(aTransferInfo.NewTitle.copy(nPos+1),RTL_TEXTENCODING_ASCII_US); - if(sExt.equalsIgnoreAsciiCase("txt")) - pExtension = ODM_FORMAT_TEXT; - else if(sExt.equalsIgnoreAsciiCase("rtf")) - pExtension = ODM_FORMAT_RTF; - else if(sExt.equalsIgnoreAsciiCase("ps")) - pExtension = ODM_FORMAT_PS; - else - pExtension = const_cast(sExt.getStr()); - } - else - pExtension = ODM_FORMAT_TEXT; - - sal_Char* lpszNewDocId = new sal_Char[ODM_DOCID_MAX]; - void *pData = NULL; - DWORD dwFlags = ODM_SILENT; - ODMSTATUS odm = NODMSaveAsEx(ContentProvider::getHandle(), - NULL, // means it is saved the first time - lpszNewDocId, - pExtension, - NULL, // no callback function here - pData, - &dwFlags); - - // check if we have to call the DMS dialog - if(odm == ODM_E_USERINT) - { - dwFlags = 0; - odm = NODMSaveAsEx(ContentProvider::getHandle(), - NULL, // means it is saved the first time - lpszNewDocId, - pExtension, - NULL, // no callback function here - pData, - &dwFlags); - } - bError = odm != ODM_SUCCESS; - if(!bError) - { - aProp = new ContentProperties(); - aProp->m_sDocumentId = ::rtl::OString(lpszNewDocId); - aProp->m_sContentType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODMA_CONTENT_TYPE)); - aProp->m_sSavedAsName = aTransferInfo.NewTitle; - getContentProvider()->append(aProp); - - // now set the title - WORD nDocInfo = ODM_NAME; - ::rtl::OUString sFileName = aTransferInfo.NewTitle; - sal_Int32 nIndex = aTransferInfo.NewTitle.lastIndexOf( sal_Unicode('.') ); - if(nIndex != -1) - sFileName = aTransferInfo.NewTitle.copy(0,nIndex); - - ::rtl::OString sDocInfoValue = ::rtl::OUStringToOString(sFileName,RTL_TEXTENCODING_ASCII_US); - odm = NODMSetDocInfo( ContentProvider::getHandle(), - lpszNewDocId, - nDocInfo, - const_cast(sDocInfoValue.getStr()) - ); - } - else if ( odm == ODM_E_CANCEL) - NODMActivate(ContentProvider::getHandle(), - ODM_DELETE, - lpszNewDocId); + // There used to be code below that called ODMSaveAsEx, + // but that was very broken. We have already called + // ODMSaveAsEx in the ODMA file picker when selecting the + // name for a new document, or the document already exists + // in the DMS and we don't need any ODMSaveAsEx. The ODMA + // file picker tells odma::ContentProvider about the new + // document's DOCID, so the + // getContentPropertyWithDocumentId() call above should + // succeed. delete [] lpszNewDocId; } @@ -575,12 +517,23 @@ uno::Any SAL_CALL Content::execute( rtl::OUString sFileURL = ContentProvider::openDoc(aProp); sal_Int32 nLastIndex = sFileURL.lastIndexOf( sal_Unicode('/') ); + // Create a new Content object for the "shadow" file + // corresponding to the opened document from the DMS. ::ucbhelper::Content aContent(sFileURL.copy(0,nLastIndex),NULL); // aTransferInfo.NameClash = ucb::NameClash::OVERWRITE; aTransferInfo.NewTitle = sFileURL.copy( 1 + nLastIndex ); + // Copy our saved backup copy to the "shadow" file. aContent.executeCommand(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("transfer")),uno::makeAny(aTransferInfo)); + // Tell the DMS that the "shadow" file is done and can be + // imported. getContentProvider()->saveDocument(aProp->m_sDocumentId); } + else if ( aCommand.Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM( "getCasePreservingURL" ) ) ) + { + rtl::OUString CasePreservingURL = openDoc(); + aRet <<= CasePreservingURL; + } else { ////////////////////////////////////////////////////////////////// @@ -751,27 +704,27 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { // Append all Core Properties. xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "ContentType" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData->m_sContentType ); xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "Title" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), rData->m_sTitle ); xRow->appendBoolean( - beans::Property( rtl::OUString::createFromAscii( "IsDocument" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData->m_bIsDocument ); xRow->appendBoolean( - beans::Property( rtl::OUString::createFromAscii( "IsFolder" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND @@ -780,40 +733,40 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // @@@ Append other properties supported directly. xRow->appendTimestamp( - beans::Property( rtl::OUString::createFromAscii( "DateCreated" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateCreated")), -1, getCppuType(static_cast< const util::DateTime * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData->m_aDateCreated ); xRow->appendTimestamp( - beans::Property( rtl::OUString::createFromAscii( "DateModified" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateModified")), -1, getCppuType(static_cast< const util::DateTime * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData->m_aDateModified ); xRow->appendBoolean( - beans::Property( rtl::OUString::createFromAscii( "IsReadOnly" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsReadOnly")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData->m_bIsReadOnly ); xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "Author" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Author")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), rData->m_sAuthor ); xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "Subject" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Subject")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), rData->m_sSubject ); xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "Keywords" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Keywords")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), @@ -970,8 +923,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= uno::Exception( - rtl::OUString::createFromAscii( - "No property set for storing the value!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No property set for storing the value!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -989,59 +942,6 @@ uno::Sequence< uno::Any > Content::setPropertyValues( return aRet; } - -#if 0 -//========================================================================= -void Content::queryChildren( ContentRefList& rChildren ) -{ - // @@@ Adapt method to your URL scheme... - - // Obtain a list with a snapshot of all currently instanciated contents - // from provider and extract the contents which are direct children - // of this content. - - ::ucbhelper::ContentRefList aAllContents; - m_xProvider->queryExistingContents( aAllContents ); - - OUString aURL = m_xIdentifier->getContentIdentifier(); - sal_Int32 nPos = aURL.lastIndexOf( '/' ); - - if ( nPos != ( aURL.getLength() - 1 ) ) - { - // No trailing slash found. Append. - aURL += OUString::createFromAscii( "/" ); - } - - sal_Int32 nLen = aURL.getLength(); - - ::ucbhelper::ContentRefList::const_iterator it = aAllContents.begin(); - ::ucbhelper::ContentRefList::const_iterator end = aAllContents.end(); - - while ( it != end ) - { - ::ucbhelper::ContentImplHelperRef xChild = (*it); - OUString aChildURL = xChild->getIdentifier()->getContentIdentifier(); - - // Is aURL a prefix of aChildURL? - if ( ( aChildURL.getLength() > nLen ) && - ( aChildURL.compareTo( aURL, nLen ) == 0 ) ) - { - sal_Int32 nPos = nLen; - nPos = aChildURL.indexOf( '/', nPos ); - - if ( ( nPos == -1 ) || - ( nPos == ( aChildURL.getLength() - 1 ) ) ) - { - // No further slashes / only a final slash. It's a child! - rChildren.push_back( - ContentRef( - static_cast< Content * >( xChild.get() ) ) ); - } - } - ++it; - } -} -#endif //========================================================================= void Content::insert( const uno::Reference< io::XInputStream > & xInputStream, @@ -1057,7 +957,7 @@ void Content::insert( OSL_ENSURE( sal_False, "Content::insert - property value missing!" ); uno::Sequence< rtl::OUString > aProps( 1 ); - aProps[ 0 ] = rtl::OUString::createFromAscii( "zzzz" ); + aProps[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("zzzz")); ucbhelper::cancelCommandExecution( uno::makeAny( ucb::MissingPropertiesException( rtl::OUString(), @@ -1107,34 +1007,6 @@ void Content::insert( aGuard.clear(); inserted(); } -#if 0 -//========================================================================= -void Content::destroy( sal_Bool bDeletePhysical ) - throw( uno::Exception ) -{ - // @@@ take care about bDeletePhysical -> trashcan support - - uno::Reference< ucb::XContent > xThis = this; - - deleted(); - - osl::Guard< osl::Mutex > aGuard( m_aMutex ); - - // Process instanciated children... - - ContentRefList aChildren; - queryChildren( aChildren ); - - ContentRefList::const_iterator it = aChildren.begin(); - ContentRefList::const_iterator end = aChildren.end(); - - while ( it != end ) - { - (*it)->destroy( bDeletePhysical ); - ++it; - } -} -#endif // ----------------------------------------------------------------------------- ::rtl::OUString Content::openDoc() @@ -1206,10 +1078,11 @@ void Content::changePropertyValue(const beans::PropertyValue& _rValue, if(bError) { _rRet[ _rnCurrentPos ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } // ----------------------------------------------------------------------------- +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/odma/odma_content.hxx b/ucb/source/ucp/odma/odma_content.hxx index ab50e1aec7..a0b567ec30 100644 --- a/ucb/source/ucp/odma/odma_content.hxx +++ b/ucb/source/ucp/odma/odma_content.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. @@ -59,7 +60,7 @@ namespace odma // UNO service name for the content. #define ODMA_CONTENT_SERVICE_NAME \ - "com.sun.star.ucb.OdmaContent" + "com.sun.star.ucb.ODMAContent" //========================================================================= class ContentProvider; @@ -194,3 +195,5 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/odma/odma_contentcaps.cxx b/ucb/source/ucp/odma/odma_contentcaps.cxx index aa030af6fd..b745670c61 100644 --- a/ucb/source/ucp/odma/odma_contentcaps.cxx +++ b/ucb/source/ucp/odma/odma_contentcaps.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. @@ -245,3 +246,4 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( ucb::CommandInfo >( aCommandInfoTable, COMMAND_COUNT ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/odma/odma_contentprops.hxx b/ucb/source/ucp/odma/odma_contentprops.hxx index 8ac9fae68f..a4b65726a7 100644 --- a/ucb/source/ucp/odma/odma_contentprops.hxx +++ b/ucb/source/ucp/odma/odma_contentprops.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. @@ -64,6 +65,7 @@ namespace odma {} inline ::rtl::OUString getTitle() const { return m_sTitle; } + inline ::rtl::OUString getDocumentId() const { return ::rtl::OStringToOUString( m_sDocumentId, RTL_TEXTENCODING_ASCII_US ); } inline ::rtl::OUString getSavedAsName() const { return m_sSavedAsName; } }; typedef ::std::binary_function< ::rtl::Reference, ::rtl::OUString,bool> TContentPropertiesFunctorBase; @@ -83,3 +85,4 @@ namespace odma } #endif // ODMA_CONTENTPROPS_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/odma/odma_datasupplier.cxx b/ucb/source/ucp/odma/odma_datasupplier.cxx index a9024d4e64..b7154c9988 100644 --- a/ucb/source/ucp/odma/odma_datasupplier.cxx +++ b/ucb/source/ucp/odma/odma_datasupplier.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. @@ -41,7 +42,6 @@ #include "odma_content.hxx" #include "odma_contentprops.hxx" #include "odma_provider.hxx" -#include "odma_lib.hxx" using namespace com::sun::star::beans; using namespace com::sun::star::lang; @@ -115,7 +115,7 @@ DataSupplier_Impl::~DataSupplier_Impl() while ( it != end ) { delete (*it); - it++; + ++it; } } @@ -284,12 +284,15 @@ sal_Bool DataSupplier::getResult( sal_uInt32 nIndex ) ODMSTATUS odm = NODMGetDMS(ODMA_ODMA_REGNAME, lpszDMSList); lpszDMSList[strlen(lpszDMSList)+1] = '\0'; - ::rtl::OString sQuery("SELECT ODM_DOCID, ODM_NAME"); + ::rtl::OString sQuery("SELECT ODM_DOCID_LATEST, ODM_NAME"); DWORD dwFlags = ODM_SPECIFIC; odm = NODMQueryExecute(ContentProvider::getHandle(), sQuery,dwFlags, lpszDMSList, pQueryId ); - if(odm != ODM_SUCCESS) + if(odm != ODM_SUCCESS) { + delete[] pQueryId; + delete[] lpszDMSList; return sal_False; + } sal_uInt16 nCount = 10; sal_uInt16 nMaxCount = 10; @@ -453,3 +456,5 @@ void DataSupplier::validate() throw( ResultSetException ) { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/odma/odma_datasupplier.hxx b/ucb/source/ucp/odma/odma_datasupplier.hxx index 3653d0bdc4..5d64fede70 100644 --- a/ucb/source/ucp/odma/odma_datasupplier.hxx +++ b/ucb/source/ucp/odma/odma_datasupplier.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. @@ -72,3 +73,5 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/odma/odma_inputstream.cxx b/ucb/source/ucp/odma/odma_inputstream.cxx index d3011f56d7..81cc385d1b 100644 --- a/ucb/source/ucp/odma/odma_inputstream.cxx +++ b/ucb/source/ucp/odma/odma_inputstream.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. @@ -284,3 +285,5 @@ sal_Int64 SAL_CALL OOdmaStream::getLength() return m_xInputSeek.is() ? m_xInputSeek->getLength() : sal_Int64(0); } // ----------------------------------------------------------------------------- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/odma/odma_inputstream.hxx b/ucb/source/ucp/odma/odma_inputstream.hxx index c5fde77743..39ffd440c1 100644 --- a/ucb/source/ucp/odma/odma_inputstream.hxx +++ b/ucb/source/ucp/odma/odma_inputstream.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 odma }; } #endif // ODMA_INPUTSTREAM_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/odma/odma_lib.cxx b/ucb/source/ucp/odma/odma_lib.cxx index 69142a7b0e..09f4001c7c 100644 --- a/ucb/source/ucp/odma/odma_lib.cxx +++ b/ucb/source/ucp/odma/odma_lib.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,11 +28,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_ucb.hxx" -//#ifndef _OSL_PROCESS_H_ -//#include -//#endif #include #include +#include +#include #include "odma_lib.hxx" @@ -70,13 +70,15 @@ namespace odma sal_Bool LoadFunctions(oslModule _pODMA); - sal_Bool LoadLibrary() + sal_Bool DMSsAvailable() { static sal_Bool bLoaded = sal_False; - static oslModule pODMA = NULL; + static sal_Bool bBeenHere = sal_False; + oslModule pODMA = NULL; - if (bLoaded) - return sal_True; + if (bBeenHere) + return bLoaded; + ::rtl::OUString sPath; #ifdef WNT sPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ODMA32.DLL")); @@ -85,11 +87,21 @@ namespace odma sPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("libodma.so")); #endif + bBeenHere = sal_True; + pODMA = osl_loadModule( sPath.pData,SAL_LOADMODULE_NOW ); if( !pODMA) return sal_False; - return bLoaded = LoadFunctions(pODMA); + if (!LoadFunctions(pODMA)) + return sal_False; + + bLoaded = (NODMGetDMSCount() > 0); + + if (getenv ("NO_ODMA")) + bLoaded = sal_False; + + return bLoaded; } // ------------------------------------------------------------------------- @@ -127,3 +139,5 @@ namespace odma return sal_True; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/odma/odma_lib.hxx b/ucb/source/ucp/odma/odma_lib.hxx index 0c9180ee7d..72ee5162ab 100644 --- a/ucb/source/ucp/odma/odma_lib.hxx +++ b/ucb/source/ucp/odma/odma_lib.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,19 +28,7 @@ #ifndef ODMA_LIB_HXX #define ODMA_LIB_HXX -typedef void *LPVOID; -typedef char *LPSTR, - *PSTR; -typedef const char *LPCSTR; -typedef unsigned long DWORD; -typedef unsigned short WORD; -typedef unsigned short *LPWORD; -typedef DWORD *LPDWORD; - -#define WINAPI __stdcall -#define FAR - -#include "odma.h" +#include namespace odma { @@ -205,37 +194,37 @@ namespace odma // now we define some macros - #define NODMRegisterApp(a,b,c,d,e) (*(pODMRegisterApp))(a,b,c,d,e) - #define NODMUnRegisterApp(a) (*(pODMUnRegisterApp))(a) - #define NODMSelectDoc(a,b,c) (*(pODMSelectDoc))(a,b,c) - #define NODMOpenDoc(a,b,c,d) (*(pODMOpenDoc))(a,b,c,d) - #define NODMSaveDoc(a,b,c) (*(pODMSaveDoc))(a,b,c) - #define NODMCloseDoc(a,b,c,d,e,f) (*(pODMCloseDoc))(a,b,c,d,e,f) - #define NODMNewDoc(a,b,c,d,e) (*(pODMNewDoc))(a,b,c,d,e) - #define NODMSaveAs(a,b,c,d,e,f) (*(pODMSaveAs))(a,b,c,d,e,f) - #define NODMActivate(a,b,c) (*(pODMActivate))(a,b,c) - #define NODMGetDocInfo(a,b,c,d,e) (*(pODMGetDocInfo))(a,b,c,d,e) - #define NODMSetDocInfo(a,b,c,d) (*(pODMSetDocInfo))(a,b,c,d) - #define NODMGetDMSInfo(a,b,c,d) (*(pODMGetDMSInfo))(a,b,c,d) - #define NODMGetDMSCount() (*(pODMGetDMSCount))() - #define NODMGetDMSList(a,b) (*(pODMGetDMSList))(a,b) - #define NODMGetDMS(a,b) (*(pODMGetDMS))(a,b) - #define NODMSetDMS(a,b) (*(pODMSetDMS))(a,b) - #define NODMQueryExecute(a,b,c,d,e) (*(pODMQueryExecute))(a,b,c,d,e) - #define NODMQueryGetResults(a,b,c,d,e,f) (*(pODMQueryGetResults))(a,b,c,d,e,f) - #define NODMQueryClose(a,b) (*(pODMQueryClose))(a,b) - #define NODMCloseDocEx(a,b,c,d,e,f,g) (*(pODMCloseDocEx))(a,b,c,d,e,f,g) - #define NODMSaveAsEx(a,b,c,d,e,f,g) (*(pODMSaveAsEx))(a,b,c,d,e,f,g) - #define NODMSaveDocEx(a,b,c,d) (*(pODMSaveDocEx))(a,b,c,d) - #define NODMSelectDocEx(a,b,c,d,e,f) (*(pODMSelectDocEx))(a,b,c,d,e,f) - #define NODMQueryCapability(a,b,c,d,e) (*(pODMQueryCapability))(a,b,c,d,e) - #define NODMSetDocEvent(a,b,c,d,e,f,g) (*(pODMSetDocEvent))(a,b,c,d,e,f,g) - #define NODMGetAlternateContent(a,b,c,d,e) (*(pODMGetAlternateContent))(a,b,c,d,e) - #define NODMSetAlternateContent(a,b,c,d,e) (*(pODMSetAlternateContent))(a,b,c,d,e) - #define NODMGetDocRelation(a,b,c,d,e,f) (*(pODMGetDocRelation))(a,b,c,d,e,f) - #define NODMSetDocRelation(a,b,c,d,e,f) (*(pODMSetDocRelation))(a,b,c,d,e,f) - - sal_Bool LoadLibrary(); + #define NODMRegisterApp(a,b,c,d,e) (*(::odma::pODMRegisterApp))(a,b,c,d,e) + #define NODMUnRegisterApp(a) (*(::odma::pODMUnRegisterApp))(a) + #define NODMSelectDoc(a,b,c) (*(::odma::pODMSelectDoc))(a,b,c) + #define NODMOpenDoc(a,b,c,d) (*(::odma::pODMOpenDoc))(a,b,c,d) + #define NODMSaveDoc(a,b,c) (*(::odma::pODMSaveDoc))(a,b,c) + #define NODMCloseDoc(a,b,c,d,e,f) (*(::odma::pODMCloseDoc))(a,b,c,d,e,f) + #define NODMNewDoc(a,b,c,d,e) (*(::odma::pODMNewDoc))(a,b,c,d,e) + #define NODMSaveAs(a,b,c,d,e,f) (*(::odma::pODMSaveAs))(a,b,c,d,e,f) + #define NODMActivate(a,b,c) (*(::odma::pODMActivate))(a,b,c) + #define NODMGetDocInfo(a,b,c,d,e) (*(::odma::pODMGetDocInfo))(a,b,c,d,e) + #define NODMSetDocInfo(a,b,c,d) (*(::odma::pODMSetDocInfo))(a,b,c,d) + #define NODMGetDMSInfo(a,b,c,d) (*(::odma::pODMGetDMSInfo))(a,b,c,d) + #define NODMGetDMSCount() (*(::odma::pODMGetDMSCount))() + #define NODMGetDMSList(a,b) (*(::odma::pODMGetDMSList))(a,b) + #define NODMGetDMS(a,b) (*(::odma::pODMGetDMS))(a,b) + #define NODMSetDMS(a,b) (*(::odma::pODMSetDMS))(a,b) + #define NODMQueryExecute(a,b,c,d,e) (*(::odma::pODMQueryExecute))(a,b,c,d,e) + #define NODMQueryGetResults(a,b,c,d,e,f) (*(::odma::pODMQueryGetResults))(a,b,c,d,e,f) + #define NODMQueryClose(a,b) (*(::odma::pODMQueryClose))(a,b) + #define NODMCloseDocEx(a,b,c,d,e,f,g) (*(::odma::pODMCloseDocEx))(a,b,c,d,e,f,g) + #define NODMSaveAsEx(a,b,c,d,e,f,g) (*(::odma::pODMSaveAsEx))(a,b,c,d,e,f,g) + #define NODMSaveDocEx(a,b,c,d) (*(::odma::pODMSaveDocEx))(a,b,c,d) + #define NODMSelectDocEx(a,b,c,d,e,f) (*(::odma::pODMSelectDocEx))(a,b,c,d,e,f) + #define NODMQueryCapability(a,b,c,d,e) (*(::odma::pODMQueryCapability))(a,b,c,d,e) + #define NODMSetDocEvent(a,b,c,d,e,f,g) (*(::odma::pODMSetDocEvent))(a,b,c,d,e,f,g) + #define NODMGetAlternateContent(a,b,c,d,e) (*(::odma::pODMGetAlternateContent))(a,b,c,d,e) + #define NODMSetAlternateContent(a,b,c,d,e) (*(::odma::pODMSetAlternateContent))(a,b,c,d,e) + #define NODMGetDocRelation(a,b,c,d,e,f) (*(::odma::pODMGetDocRelation))(a,b,c,d,e,f) + #define NODMSetDocRelation(a,b,c,d,e,f) (*(::odma::pODMSetDocRelation))(a,b,c,d,e,f) + + sal_Bool DMSsAvailable(); extern TODMRegisterApp pODMRegisterApp; extern TODMUnRegisterApp pODMUnRegisterApp; @@ -270,3 +259,5 @@ namespace odma } #endif // ODMA_LIB_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/odma/odma_main.cxx b/ucb/source/ucp/odma/odma_main.cxx index ccd032f686..974c95035b 100644 --- a/ucb/source/ucp/odma/odma_main.cxx +++ b/ucb/source/ucp/odma/odma_main.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. @@ -89,3 +90,4 @@ void _cdecl main( int argc, char * argv[] ) } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/odma/odma_provider.cxx b/ucb/source/ucp/odma/odma_provider.cxx index c6a30acc86..7d2216a55e 100644 --- a/ucb/source/ucp/odma/odma_provider.cxx +++ b/ucb/source/ucp/odma/odma_provider.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. @@ -79,11 +80,26 @@ ContentProvider::~ContentProvider() } } // ----------------------------------------------------------------------------- +inline bool is_current_process_window(HWND hwnd) +{ + DWORD pid; + GetWindowThreadProcessId(hwnd, &pid); + return (pid == GetCurrentProcessId()); +} + +HWND choose_parent_window() +{ + HWND hwnd_parent = GetForegroundWindow(); + if (!is_current_process_window(hwnd_parent)) + hwnd_parent = GetDesktopWindow(); + return hwnd_parent; +} + ODMHANDLE ContentProvider::getHandle() { if(!m_aOdmHandle) { - ODMSTATUS odm = NODMRegisterApp(&m_aOdmHandle,ODM_API_VERSION,ODMA_ODMA_REGNAME,NULL,NULL); + ODMSTATUS odm = NODMRegisterApp(&m_aOdmHandle,ODM_API_VERSION,ODMA_ODMA_REGNAME,(DWORD) choose_parent_window( ),NULL); switch(odm) { case ODM_SUCCESS: @@ -135,8 +151,8 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, // @@@ Adjust implementation name. Keep the prefix "com.sun.star.comp."! // @@@ Adjust service name. XSERVICEINFO_IMPL_1( ContentProvider, - rtl::OUString::createFromAscii( - "com.sun.star.comp.odma.ContentProvider" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.odma.ContentProvider" )), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODMA_CONTENT_PROVIDER_SERVICE_NAME) ) ); //========================================================================= @@ -175,21 +191,10 @@ uno::Reference< ucb::XContent > SAL_CALL ContentProvider::queryContent( sCanonicURL.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(ODMA_URL_SCHEME ODMA_URL_SHORT)))) throw ucb::IllegalIdentifierException(); - // @@@ Further id checks may go here... -#if 0 - if ( id-check-failes ) - throw ucb::IllegalIdentifierException(); -#endif // @@@ Id normalization may go here... -#if 0 - // Normalize URL and create new Id. - rtl::OUString aCanonicURL = ( Identifier->getContentIdentifier() ); - uno::Reference< ucb::XContentIdentifier > xCanonicId - = new ::ucb::ContentIdentifier( m_xSMgr, aCanonicURL ); -#else + uno::Reference< ucb::XContentIdentifier > xCanonicId = Identifier; -#endif osl::MutexGuard aGuard( m_aMutex ); @@ -434,7 +439,7 @@ void ContentProvider::append(const ::rtl::Reference& _rProp) lpszDMSList[strlen(lpszDMSList)+1] = '\0'; ::rtl::OString sTitleText(::rtl::OUStringToOString(_sDocumentName,RTL_TEXTENCODING_ASCII_US)); - ::rtl::OString sQuery("SELECT ODM_DOCID, ODM_NAME WHERE ODM_TITLETEXT = '"); + ::rtl::OString sQuery("SELECT ODM_DOCID_LATEST, ODM_NAME WHERE ODM_TITLETEXT = '"); sQuery += sTitleText; sQuery += "'"; @@ -522,6 +527,12 @@ void ContentProvider::append(const ::rtl::Reference& _rProp) return getContentProperty(_sTitle,aFunc); } // ----------------------------------------------------------------------------- +::rtl::Reference ContentProvider::getContentPropertyWithDocumentId(const ::rtl::OUString& _sDocumentId) const +{ + ContentPropertiesMemberFunctor aFunc(::std::mem_fun(&ContentProperties::getDocumentId)); + return getContentProperty(_sDocumentId,aFunc); +} +// ----------------------------------------------------------------------------- ::rtl::OUString ContentProvider::openDoc(const ::rtl::Reference& _rProp) throw (uno::Exception) { OSL_ENSURE(_rProp.is(),"No valid content properties!"); @@ -597,3 +608,5 @@ sal_Bool ContentProvider::deleteDocument(const ::rtl::Reference +#include +#include #include "odma_lib.hxx" #include "rtl/ref.hxx" @@ -43,7 +46,7 @@ namespace odma { // UNO service name for the provider. This name will be used by the UCB to // create instances of the provider. #define ODMA_CONTENT_PROVIDER_SERVICE_NAME \ - "com.sun.star.ucb.OdmaContentProvider" + "com.sun.star.ucb.ODMAContentProvider" // #define ODMA_CONTENT_PROVIDER_SERVICE_NAME_LENGTH 34 // URL scheme. This is the scheme the provider will be able to create @@ -133,14 +136,21 @@ public: */ ::rtl::Reference queryContentProperty(const ::rtl::OUString& _sDocumentName); - /** getContentProperty returns the ContentProperties for the first content with that title + /** getContentPropertyWithTitle returns the ContentProperties for the first content with that title @param _sTitle the title of the document @return the content properties */ ::rtl::Reference getContentPropertyWithTitle(const ::rtl::OUString& _sTitle) const; - /** getContentProperty returns the ContentProperties for the first content with that SavedAsName + /** getContentPropertyWithDocumentId returns the ContentProperties for the first content with that title + @param _sTitle the title of the document + + @return the content properties + */ + ::rtl::Reference getContentPropertyWithDocumentId(const ::rtl::OUString& _sDocumentId) const; + + /** getContentPropertyWithSavedAsName returns the ContentProperties for the first content with that SavedAsName @param _sSaveAsName the SavedAsName of the document @return the content properties @@ -172,3 +182,5 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/odma/odma_resultset.cxx b/ucb/source/ucp/odma/odma_resultset.cxx index 0e87441c77..d176d881c6 100644 --- a/ucb/source/ucp/odma/odma_resultset.cxx +++ b/ucb/source/ucp/odma/odma_resultset.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. @@ -94,3 +95,4 @@ void DynamicResultSet::initDynamic() m_xResultSet2 = m_xResultSet1; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/odma/odma_resultset.hxx b/ucb/source/ucp/odma/odma_resultset.hxx index 690f73d19f..d0b32a5541 100644 --- a/ucb/source/ucp/odma/odma_resultset.hxx +++ b/ucb/source/ucp/odma/odma_resultset.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,5 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/odma/odma_services.cxx b/ucb/source/ucp/odma/odma_services.cxx index 42fc7e4cdd..d6c5106533 100644 --- a/ucb/source/ucp/odma/odma_services.cxx +++ b/ucb/source/ucp/odma/odma_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. @@ -32,9 +33,7 @@ #include #include "odma_contentprops.hxx" #include "odma_provider.hxx" -#include "odma_lib.hxx" -using namespace rtl; using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::registry; @@ -80,10 +79,8 @@ extern "C" void * SAL_CALL component_getFactory( if ( ::odma::ContentProvider::getImplementationName_Static(). compareToAscii( pImplName ) == 0 ) { - if(::odma::LoadLibrary()) + if(::odma::DMSsAvailable()) xFactory = ::odma::ContentProvider::createServiceFactory( xSMgr ); - else - OSL_ASSERT(!"Could not load library!"); } ////////////////////////////////////////////////////////////////////// @@ -97,3 +94,4 @@ extern "C" void * SAL_CALL component_getFactory( return pRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/odma/ucpodma.xml b/ucb/source/ucp/odma/ucpodma.xml index c3804b6662..390245e41a 100644 --- a/ucb/source/ucp/odma/ucpodma.xml +++ b/ucb/source/ucp/odma/ucpodma.xml @@ -11,7 +11,7 @@ Ocke Janssen - com.sun.star.comp.ucb.OdmaContentProvider + com.sun.star.comp.ucb.ODMAContentProvider This component implements a Content Provider for the Universal diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index 56d60eb551..0b6fc65d09 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.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. @@ -233,13 +234,7 @@ Content* Content::create( uno::Reference< container::XHierarchicalNameAccess > xPackage; -#if 0 - // Fail, if content does exist. - if ( hasData( pProvider, aURI, xPackage ) ) - return 0; -#else xPackage = pProvider->createPackage( aURI.getPackage(), aURI.getParam() ); -#endif uno::Reference< ucb::XContentIdentifier > xId = new ::ucbhelper::ContentIdentifier( rxSMgr, aURI.getUri() ); @@ -251,7 +246,7 @@ Content* Content::create( ::rtl::OUString Content::getContentType( const ::rtl::OUString& aScheme, sal_Bool bFolder ) { - return ( rtl::OUString::createFromAscii( "application/" ) + return ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("application/")) + aScheme + ( bFolder ? rtl::OUString::createFromAscii( "-folder" ) @@ -429,8 +424,8 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes() rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString::createFromAscii( - "com.sun.star.comp.ucb.PackageContent" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.PackageContent" )); } //========================================================================= @@ -441,12 +436,12 @@ uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() uno::Sequence< rtl::OUString > aSNS( 1 ); if ( isFolder() ) aSNS.getArray()[ 0 ] - = rtl::OUString::createFromAscii( - PACKAGE_FOLDER_CONTENT_SERVICE_NAME ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + PACKAGE_FOLDER_CONTENT_SERVICE_NAME )); else aSNS.getArray()[ 0 ] - = rtl::OUString::createFromAscii( - PACKAGE_STREAM_CONTENT_SERVICE_NAME ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + PACKAGE_STREAM_CONTENT_SERVICE_NAME )); return aSNS; } @@ -493,8 +488,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -515,8 +510,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -527,8 +522,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "No properties!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No properties!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -569,8 +564,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -592,8 +587,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -633,8 +628,8 @@ uno::Any SAL_CALL Content::execute( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), Environment, - rtl::OUString::createFromAscii( - "Cannot remove persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot remove persistent data!" )), this ); // Unreachable } @@ -655,8 +650,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -713,8 +708,8 @@ uno::Any SAL_CALL Content::execute( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), Environment, - rtl::OUString::createFromAscii( - "Cannot write file to disk!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot write file to disk!" )), this ); // Unreachable } @@ -779,13 +774,13 @@ Content::createNewContent( const ucb::ContentInfo& Info ) return uno::Reference< ucb::XContent >(); rtl::OUString aURL = m_aUri.getUri(); - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); if ( Info.Type.equalsIgnoreAsciiCase( getContentType( m_aUri.getScheme(), sal_True ) ) ) aURL += rtl::OUString::createFromAscii( "New_Folder" ); else - aURL += rtl::OUString::createFromAscii( "New_Stream" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Stream")); uno::Reference< ucb::XContentIdentifier > xId( new ::ucbhelper::ContentIdentifier( m_xSMgr, aURL ) ); @@ -984,7 +979,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // Append all Core Properties. xRow->appendString ( beans::Property( - rtl::OUString::createFromAscii( "ContentType" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND @@ -992,14 +987,14 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( rData.aContentType ); xRow->appendString( beans::Property( - rtl::OUString::createFromAscii( "Title" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), rData.aTitle ); xRow->appendBoolean( beans::Property( - rtl::OUString::createFromAscii( "IsDocument" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND @@ -1007,7 +1002,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( rData.bIsDocument ); xRow->appendBoolean( beans::Property( - rtl::OUString::createFromAscii( "IsFolder" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND @@ -1025,7 +1020,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( rData.getCreatableContentsInfo( PackageUri( rContentId ) ) ) ); xRow->appendString( beans::Property( - rtl::OUString::createFromAscii( "MediaType" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), @@ -1036,7 +1031,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { xRow->appendLong( beans::Property( - rtl::OUString::createFromAscii( "Size" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")), -1, getCppuType( static_cast< const sal_Int64 * >( 0 ) ), beans::PropertyAttribute::BOUND @@ -1045,7 +1040,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( xRow->appendBoolean( beans::Property( - rtl::OUString::createFromAscii( "Compressed" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Compressed")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND ), @@ -1053,7 +1048,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( xRow->appendBoolean( beans::Property( - rtl::OUString::createFromAscii( "Encrypted" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Encrypted")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND ), @@ -1066,7 +1061,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { xRow->appendBoolean( beans::Property( - rtl::OUString::createFromAscii( "HasEncryptedEntries" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasEncryptedEntries")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND @@ -1138,8 +1133,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1147,8 +1142,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1156,8 +1151,17 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), + static_cast< cppu::OWeakObject * >( this ) ); + } + else if ( rValue.Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM( "CreatableContentsInfo" ) ) ) + { + // Read-only property! + aRet[ n ] <<= lang::IllegalAccessException( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1176,8 +1180,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else @@ -1206,8 +1210,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { aRet[ n ] <<= lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Empty title not allowed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Empty title not allowed!" )), static_cast< cppu::OWeakObject * >( this ), -1 ); } @@ -1216,8 +1220,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1243,8 +1247,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1253,8 +1257,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1281,16 +1285,16 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } else { aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString::createFromAscii( - "Compressed only supported by streams!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Compressed only supported by streams!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1318,16 +1322,16 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } else { aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString::createFromAscii( - "Encrypted only supported by streams!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Encrypted only supported by streams!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1336,8 +1340,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1369,16 +1373,16 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } else { aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString::createFromAscii( - "EncryptionKey not supported by non-root folder!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "EncryptionKey not supported by non-root folder!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1431,8 +1435,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= uno::Exception( - rtl::OUString::createFromAscii( - "No property set for storing the value!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No property set for storing the value!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1444,7 +1448,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // Assemble new content identifier... rtl::OUString aNewURL = m_aUri.getParentUri(); - aNewURL += rtl::OUString::createFromAscii( "/" ); + aNewURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aNewURL += ::ucb_impl::urihelper::encodeSegment( aNewTitle ); uno::Reference< ucb::XContentIdentifier > xNewId = new ::ucbhelper::ContentIdentifier( m_xSMgr, aNewURL ); @@ -1467,14 +1471,14 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // Set error . aRet[ nTitlePos ] <<= uno::Exception( - rtl::OUString::createFromAscii( "Exchange failed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Exchange failed!")), static_cast< cppu::OWeakObject * >( this ) ); } } if ( aNewTitle.getLength() ) { - aEvent.PropertyName = rtl::OUString::createFromAscii( "Title" ); + aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); aEvent.OldValue = uno::makeAny( m_aProps.aTitle ); aEvent.NewValue = uno::makeAny( aNewTitle ); @@ -1505,8 +1509,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot store persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot store persistent data!" )), this ); // Unreachable } @@ -1582,7 +1586,7 @@ uno::Any Content::open( m_eState == PERSISTENT ? xEnv : uno::Reference< ucb::XCommandEnvironment >(), - rtl::OUString::createFromAscii( "Got no data stream!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Got no data stream!")), this ); // Unreachable } @@ -1643,8 +1647,8 @@ uno::Any Content::open( ? xEnv : uno::Reference< ucb::XCommandEnvironment >(), - rtl::OUString::createFromAscii( - "Got no data stream!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Got no data stream!" )), this ); // Unreachable } @@ -1711,7 +1715,7 @@ void Content::insert( rtl::OUString aNewURL = m_aUri.getParentUri(); if (1 + aNewURL.lastIndexOf('/') != aNewURL.getLength()) - aNewURL += rtl::OUString::createFromAscii( "/" ); + aNewURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aNewURL += ::ucb_impl::urihelper::encodeSegment( m_aProps.aTitle ); PackageUri aNewUri( aNewURL ); @@ -1746,7 +1750,7 @@ void Content::insert( do { rtl::OUString aNew = aNewUri.getUri(); - aNew += rtl::OUString::createFromAscii( "_" ); + aNew += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_")); aNew += rtl::OUString::valueOf( ++nTry ); aNewUri.setUri( aNew ); } @@ -1757,8 +1761,8 @@ void Content::insert( ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedNameClashException( - rtl::OUString::createFromAscii( - "Unable to resolve name clash!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to resolve name clash!" )), static_cast< cppu::OWeakObject * >( this ), nNameClashResolve ) ), xEnv ); @@ -1766,7 +1770,7 @@ void Content::insert( } else { - m_aProps.aTitle += rtl::OUString::createFromAscii( "_" ); + m_aProps.aTitle += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_")); m_aProps.aTitle += rtl::OUString::valueOf( nTry ); } } @@ -1812,7 +1816,7 @@ void Content::insert( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( "Cannot store persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot store persistent data!")), this ); // Unreachable } @@ -1850,8 +1854,8 @@ void Content::destroy( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString::createFromAscii( - "Not persistent!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Not persistent!" )), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -1893,8 +1897,8 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString::createFromAscii( - "Not persistent!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Not persistent!" )), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -1915,7 +1919,7 @@ void Content::transfer( // Is source not a parent of me / not me? rtl::OUString aId = m_aUri.getParentUri(); - aId += rtl::OUString::createFromAscii( "/" ); + aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); if ( rInfo.SourceURL.getLength() <= aId.getLength() ) { @@ -1933,8 +1937,8 @@ void Content::transfer( ucb::IOErrorCode_RECURSIVE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Target is equal to or is a child of source!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Target is equal to or is a child of source!" )), this ); // Unreachable } @@ -1974,8 +1978,8 @@ void Content::transfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot instanciate source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot instanciate source object!" )), this ); // Unreachable } @@ -2008,8 +2012,8 @@ void Content::transfer( ucb::IOErrorCode_CANT_CREATE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "XContentCreator::createNewContent failed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "XContentCreator::createNewContent failed!" )), this ); // Unreachable } @@ -2124,7 +2128,7 @@ void Content::transfer( rtl::OUString aChildId = xId->getContentIdentifier(); if ( ( aChildId.lastIndexOf( '/' ) + 1 ) != aChildId.getLength() ) - aChildId += rtl::OUString::createFromAscii( "/" ); + aChildId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aChildId += ::ucb_impl::urihelper::encodeSegment( aName ); @@ -2172,8 +2176,8 @@ void Content::transfer( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot remove persistent data of source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot remove persistent data of source object!" )), this ); // Unreachable } @@ -2272,7 +2276,7 @@ void Content::queryChildren( ContentRefList& rChildren ) OSL_ENSURE( aURL.lastIndexOf( '/' ) != ( aURL.getLength() - 1 ), "Content::queryChildren - Invalid URL!" ); - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); sal_Int32 nLen = aURL.getLength(); @@ -2386,8 +2390,8 @@ sal_Bool Content::loadData( { uno::Any aHasEncryptedEntries = xPackagePropSet->getPropertyValue( - rtl::OUString::createFromAscii( - "HasEncryptedEntries" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "HasEncryptedEntries" )) ); if ( !( aHasEncryptedEntries >>= rProps.bHasEncryptedEntries ) ) { OSL_ENSURE( sal_False, @@ -2439,7 +2443,7 @@ sal_Bool Content::loadData( { uno::Any aMediaType = xPropSet->getPropertyValue( - rtl::OUString::createFromAscii( "MediaType" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ); if ( !( aMediaType >>= rProps.aMediaType ) ) { OSL_ENSURE( sal_False, @@ -2486,7 +2490,7 @@ sal_Bool Content::loadData( { uno::Any aSize = xPropSet->getPropertyValue( - rtl::OUString::createFromAscii( "Size" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) ); if ( !( aSize >>= rProps.nSize ) ) { OSL_ENSURE( sal_False, @@ -2512,7 +2516,7 @@ sal_Bool Content::loadData( { uno::Any aCompressed = xPropSet->getPropertyValue( - rtl::OUString::createFromAscii( "Compressed" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Compressed")) ); if ( !( aCompressed >>= rProps.bCompressed ) ) { OSL_ENSURE( sal_False, @@ -2538,7 +2542,7 @@ sal_Bool Content::loadData( { uno::Any aEncrypted = xPropSet->getPropertyValue( - rtl::OUString::createFromAscii( "Encrypted" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Encrypted")) ); if ( !( aEncrypted >>= rProps.bEncrypted ) ) { OSL_ENSURE( sal_False, @@ -2640,7 +2644,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) try { xPackagePropSet->setPropertyValue( - rtl::OUString::createFromAscii( "EncryptionKey" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EncryptionKey")), uno::makeAny( m_aProps.aEncryptionKey ) ); m_nModifiedProps &= ~ENCRYPTIONKEY_MODIFIED; } @@ -2773,7 +2777,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) if ( m_nModifiedProps & MEDIATYPE_MODIFIED ) { xPropSet->setPropertyValue( - rtl::OUString::createFromAscii( "MediaType" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), uno::makeAny( m_aProps.aMediaType ) ); m_nModifiedProps &= ~MEDIATYPE_MODIFIED; } @@ -2782,7 +2786,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) { if ( !isFolder() ) xPropSet->setPropertyValue( - rtl::OUString::createFromAscii( "Compressed" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Compressed")), uno::makeAny( m_aProps.bCompressed ) ); m_nModifiedProps &= ~COMPRESSED_MODIFIED; @@ -2792,7 +2796,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) { if ( !isFolder() ) xPropSet->setPropertyValue( - rtl::OUString::createFromAscii( "Encrypted" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Encrypted")), uno::makeAny( m_aProps.bEncrypted ) ); m_nModifiedProps &= ~ENCRYPTED_MODIFIED; @@ -2802,7 +2806,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) { if ( !isFolder() ) xPropSet->setPropertyValue( - rtl::OUString::createFromAscii( "EncryptionKey" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EncryptionKey")), uno::makeAny( m_aProps.aEncryptionKey ) ); m_nModifiedProps &= ~ENCRYPTIONKEY_MODIFIED; diff --git a/ucb/source/ucp/package/pkgcontent.hxx b/ucb/source/ucp/package/pkgcontent.hxx index 1021f2563e..e93726daa6 100644 --- a/ucb/source/ucp/package/pkgcontent.hxx +++ b/ucb/source/ucp/package/pkgcontent.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. @@ -333,3 +334,5 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/package/pkgcontentcaps.cxx b/ucb/source/ucp/package/pkgcontentcaps.cxx index 636b1b3164..ecebdbb446 100644 --- a/ucb/source/ucp/package/pkgcontentcaps.cxx +++ b/ucb/source/ucp/package/pkgcontentcaps.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. @@ -66,6 +67,7 @@ #include #include #include +#include #include "pkgcontent.hxx" using namespace com::sun::star; diff --git a/ucb/source/ucp/package/pkgdatasupplier.cxx b/ucb/source/ucp/package/pkgdatasupplier.cxx index 72a6ffe91b..631eeabfbd 100644 --- a/ucb/source/ucp/package/pkgdatasupplier.cxx +++ b/ucb/source/ucp/package/pkgdatasupplier.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. @@ -113,7 +114,7 @@ DataSupplier_Impl::~DataSupplier_Impl() while ( it != end ) { delete (*it); - it++; + ++it; } } @@ -477,7 +478,7 @@ void DataSupplier::validate() sal_Int32 nPackageUrlEnd = aURL.lastIndexOf( '/' ); if ( nPackageUrlEnd != aURL.getLength() - 1 ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aURL += ::ucb_impl::urihelper::encodeSegment( aName ); aURL += aContURL.copy( nParam ); @@ -488,7 +489,7 @@ void DataSupplier::validate() sal_Int32 nPackageUrlEnd = aURL.lastIndexOf( '/' ); if ( nPackageUrlEnd != aURL.getLength() - 1 ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aURL += ::ucb_impl::urihelper::encodeSegment( aName ); } @@ -496,3 +497,4 @@ void DataSupplier::validate() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/package/pkgdatasupplier.hxx b/ucb/source/ucp/package/pkgdatasupplier.hxx index 6775ff581e..a888275854 100644 --- a/ucb/source/ucp/package/pkgdatasupplier.hxx +++ b/ucb/source/ucp/package/pkgdatasupplier.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 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/package/pkgprovider.cxx b/ucb/source/ucp/package/pkgprovider.cxx index dfaaf43034..af0f8a8faf 100644 --- a/ucb/source/ucp/package/pkgprovider.cxx +++ b/ucb/source/ucp/package/pkgprovider.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. @@ -182,10 +183,10 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, //========================================================================= XSERVICEINFO_IMPL_1( ContentProvider, - rtl::OUString::createFromAscii( - "com.sun.star.comp.ucb.PackageContentProvider" ), - rtl::OUString::createFromAscii( - PACKAGE_CONTENT_PROVIDER_SERVICE_NAME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.PackageContentProvider" )), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + PACKAGE_CONTENT_PROVIDER_SERVICE_NAME )) ); //========================================================================= // @@ -277,8 +278,8 @@ ContentProvider::createPackage( const rtl::OUString & rName, const rtl::OUString uno::Reference< uno::XInterface > xIfc = m_xSMgr->createInstanceWithArguments( - rtl::OUString::createFromAscii( - "com.sun.star.packages.comp.ZipPackage" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.packages.comp.ZipPackage" )), aArguments ); if ( xIfc.is() ) @@ -328,3 +329,4 @@ sal_Bool ContentProvider::removePackage( const rtl::OUString & rName ) return sal_False; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/package/pkgprovider.hxx b/ucb/source/ucp/package/pkgprovider.hxx index 4862f64ace..e02d1b25d2 100644 --- a/ucb/source/ucp/package/pkgprovider.hxx +++ b/ucb/source/ucp/package/pkgprovider.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 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/package/pkgresultset.cxx b/ucb/source/ucp/package/pkgresultset.cxx index a843c6971f..0f19ac5d6d 100644 --- a/ucb/source/ucp/package/pkgresultset.cxx +++ b/ucb/source/ucp/package/pkgresultset.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. @@ -92,3 +93,4 @@ void DynamicResultSet::initDynamic() m_xResultSet2 = m_xResultSet1; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/package/pkgresultset.hxx b/ucb/source/ucp/package/pkgresultset.hxx index 9b6adca131..40115f9c43 100644 --- a/ucb/source/ucp/package/pkgresultset.hxx +++ b/ucb/source/ucp/package/pkgresultset.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. @@ -57,3 +58,5 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/package/pkgservices.cxx b/ucb/source/ucp/package/pkgservices.cxx index b287536f33..36a43dee8f 100644 --- a/ucb/source/ucp/package/pkgservices.cxx +++ b/ucb/source/ucp/package/pkgservices.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. @@ -72,3 +73,4 @@ extern "C" void * SAL_CALL component_getFactory( return pRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/package/pkguri.cxx b/ucb/source/ucp/package/pkguri.cxx index 4fa7418432..49a6bc6296 100644 --- a/ucb/source/ucp/package/pkguri.cxx +++ b/ucb/source/ucp/package/pkguri.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. @@ -247,3 +248,5 @@ void PackageUri::init() const } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/package/pkguri.hxx b/ucb/source/ucp/package/pkguri.hxx index ee2bbd9ca3..0adb48074f 100644 --- a/ucb/source/ucp/package/pkguri.hxx +++ b/ucb/source/ucp/package/pkguri.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. @@ -99,3 +100,5 @@ inline sal_Bool PackageUri::isRootFolder() const } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx index 8a17b44fb3..7ec5e47f71 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.cxx +++ b/ucb/source/ucp/tdoc/tdoc_content.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. @@ -146,13 +147,6 @@ Content* Content::create( return 0; } -#if 0 - // Fail, if content does exist. - if ( Content::hasData( pProvider, - Uri( Identifier->getContentIdentifier() ) ) ) - return 0; -#endif - return new Content( rxSMgr, pProvider, Identifier, Info ); } @@ -325,8 +319,8 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes() rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString::createFromAscii( - "com.sun.star.comp.ucb.TransientDocumentsContent" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.TransientDocumentsContent" )); } //========================================================================= @@ -339,17 +333,17 @@ uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() uno::Sequence< rtl::OUString > aSNS( 1 ); if ( m_aProps.getType() == STREAM ) - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii( - TDOC_STREAM_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + TDOC_STREAM_CONTENT_SERVICE_NAME )); else if ( m_aProps.getType() == FOLDER ) - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii( - TDOC_FOLDER_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + TDOC_FOLDER_CONTENT_SERVICE_NAME )); else if ( m_aProps.getType() == DOCUMENT ) - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii( - TDOC_DOCUMENT_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + TDOC_DOCUMENT_CONTENT_SERVICE_NAME )); else - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii( - TDOC_ROOT_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + TDOC_ROOT_CONTENT_SERVICE_NAME )); return aSNS; } @@ -416,8 +410,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -438,8 +432,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -450,8 +444,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "No properties!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No properties!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -490,8 +484,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -547,8 +541,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -606,8 +600,8 @@ uno::Any SAL_CALL Content::execute( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), Environment, - rtl::OUString::createFromAscii( - "Cannot remove persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot remove persistent data!" )), this ); // Unreachable } @@ -647,8 +641,8 @@ uno::Any SAL_CALL Content::execute( OSL_ENSURE( sal_False, "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -780,12 +774,12 @@ Content::createNewContent( const ucb::ContentInfo& Info ) "Content::createNewContent - empty identifier!" ); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); if ( bCreateFolder ) - aURL += rtl::OUString::createFromAscii( "New_Folder" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Folder")); else - aURL += rtl::OUString::createFromAscii( "New_Stream" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Stream")); uno::Reference< ucb::XContentIdentifier > xId = new ::ucbhelper::ContentIdentifier( m_xSMgr, aURL ); @@ -848,7 +842,7 @@ void Content::queryChildren( ContentRefList& rChildren ) if ( nURLPos != ( aURL.getLength() - 1 ) ) { // No trailing slash found. Append. - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } sal_Int32 nLen = aURL.getLength(); @@ -1110,7 +1104,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { // Append all Core Properties. xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "ContentType" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND @@ -1120,7 +1114,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( ContentType eType = rData.getType(); xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "Title" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), // Title is read-only for root and documents. @@ -1130,14 +1124,14 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( : 0 ), rData.getTitle() ); xRow->appendBoolean( - beans::Property( rtl::OUString::createFromAscii( "IsDocument" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData.getIsDocument() ); xRow->appendBoolean( - beans::Property( rtl::OUString::createFromAscii( "IsFolder" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND @@ -1156,7 +1150,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // Storage is only supported by folders. if ( eType == FOLDER ) xRow->appendObject( - beans::Property( rtl::OUString::createFromAscii( "Storage" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Storage")), -1, getCppuType( static_cast< @@ -1168,7 +1162,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // DocumentModel is only supported by documents. if ( eType == DOCUMENT ) xRow->appendObject( - beans::Property( rtl::OUString::createFromAscii( "DocumentModel" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentModel")), -1, getCppuType( static_cast< @@ -1240,8 +1234,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1249,8 +1243,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1258,8 +1252,17 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), + static_cast< cppu::OWeakObject * >( this ) ); + } + else if ( rValue.Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM( "CreatableContentsInfo" ) ) ) + { + // Read-only property! + aRet[ n ] <<= lang::IllegalAccessException( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1279,8 +1282,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if ( ( eType == ROOT ) || ( eType == DOCUMENT ) ) { aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else @@ -1310,8 +1313,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Empty Title not allowed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Empty Title not allowed!" )), static_cast< cppu::OWeakObject * >( this ), -1 ); } @@ -1319,8 +1322,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Title Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Title Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1332,16 +1335,16 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if ( eType == FOLDER ) { aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else { // Storage is only supported by folders. aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString::createFromAscii( - "Storage property only supported by folders" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Storage property only supported by folders" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1352,17 +1355,17 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if ( eType == DOCUMENT ) { aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else { // Storage is only supported by folders. aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DocumentModel property only supported by " - "documents" ), + "documents" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1415,8 +1418,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= uno::Exception( - rtl::OUString::createFromAscii( - "No property set for storing the value!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No property set for storing the value!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1448,14 +1451,14 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // Set error . aRet[ nTitlePos ] <<= uno::Exception( - rtl::OUString::createFromAscii( "Exchange failed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Exchange failed!")), static_cast< cppu::OWeakObject * >( this ) ); } } if ( aOldTitle.getLength() ) { - aEvent.PropertyName = rtl::OUString::createFromAscii( "Title" ); + aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); aEvent.OldValue = uno::makeAny( aOldTitle ); aEvent.NewValue = uno::makeAny( m_aProps.getTitle() ); @@ -1483,8 +1486,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot store persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot store persistent data!" )), this ); // Unreachable } @@ -1564,8 +1567,8 @@ uno::Any Content::open( m_eState == PERSISTENT ? xEnv : uno::Reference< ucb::XCommandEnvironment >(), - rtl::OUString::createFromAscii( - "Got no data stream!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Got no data stream!" )), this ); // Unreachable } @@ -1600,7 +1603,7 @@ uno::Any Content::open( m_eState == PERSISTENT ? xEnv : uno::Reference< ucb::XCommandEnvironment >(), - rtl::OUString::createFromAscii( "Got no data stream!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Got no data stream!")), this ); // Unreachable } @@ -1662,8 +1665,8 @@ uno::Any Content::open( ? xEnv : uno::Reference< ucb::XCommandEnvironment >(), - rtl::OUString::createFromAscii( - "Got no data stream!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Got no data stream!" )), this ); // Unreachable } @@ -1791,8 +1794,8 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData, ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedNameClashException( - rtl::OUString::createFromAscii( - "Unable to resolve name clash!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to resolve name clash!" )), static_cast< cppu::OWeakObject * >( this ), nNameClashResolve ) ), xEnv ); @@ -1848,7 +1851,7 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData, ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( "Cannot store persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot store persistent data!")), this ); // Unreachable } @@ -1886,8 +1889,8 @@ void Content::destroy( sal_Bool bDeletePhysical, { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString::createFromAscii( - "Not persistent!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Not persistent!" )), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -2028,8 +2031,8 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString::createFromAscii( - "Not persistent!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Not persistent!" )), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -2069,8 +2072,8 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Invalid source URI! Syntax!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Invalid source URI! Syntax!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), xEnv ); @@ -2081,9 +2084,9 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid source URI! " - "Must describe a folder or stream!" ), + "Must describe a folder or stream!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), xEnv ); @@ -2096,7 +2099,7 @@ void Content::transfer( if ( nPos != ( aId.getLength() - 1 ) ) { // No trailing slash found. Append. - aId += rtl::OUString::createFromAscii( "/" ); + aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } if ( rInfo.SourceURL.getLength() <= aId.getLength() ) @@ -2115,8 +2118,8 @@ void Content::transfer( ucb::IOErrorCode_RECURSIVE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Target is equal to or is a child of source!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Target is equal to or is a child of source!" )), this ); // Unreachable } @@ -2138,10 +2141,10 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid source URI! " "Streams cannot be created as " - "children of document root!" ), + "children of document root!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -2168,9 +2171,9 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid source URI! " - "Unabale to determine source type!" ), + "Unabale to determine source type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), xEnv ); @@ -2213,7 +2216,7 @@ void Content::transfer( rtl::OUString aTargetUri = m_xIdentifier->getContentIdentifier(); if ( ( aTargetUri.lastIndexOf( '/' ) + 1 ) != aTargetUri.getLength() ) - aTargetUri += rtl::OUString::createFromAscii( "/" ); + aTargetUri += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); if ( rInfo.NewTitle.getLength() > 0 ) aTargetUri += ::ucb_impl::urihelper::encodeSegment( rInfo.NewTitle ); @@ -2276,8 +2279,8 @@ void Content::transfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot instanciate target object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot instanciate target object!" )), this ); // Unreachable } @@ -2321,8 +2324,8 @@ void Content::transfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot instanciate target object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot instanciate target object!" )), this ); // Unreachable } @@ -2345,8 +2348,8 @@ void Content::transfer( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot remove persistent data of source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot remove persistent data of source object!" )), this ); // Unreachable } @@ -2366,8 +2369,8 @@ void Content::transfer( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot remove additional properties of source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot remove additional properties of source object!" )), this ); // Unreachable } diff --git a/ucb/source/ucp/tdoc/tdoc_content.hxx b/ucb/source/ucp/tdoc/tdoc_content.hxx index 7fde2aeea9..5877c0d783 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.hxx +++ b/ucb/source/ucp/tdoc/tdoc_content.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. @@ -66,17 +67,18 @@ class ContentProperties { public: ContentProperties() + : m_eType( STREAM ) {} ContentProperties( const ContentType & rType, const rtl::OUString & rTitle ) : m_eType( rType ), m_aContentType( rType == STREAM - ? rtl::OUString::createFromAscii( TDOC_STREAM_CONTENT_TYPE ) + ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_STREAM_CONTENT_TYPE )) : rType == FOLDER - ? rtl::OUString::createFromAscii( TDOC_FOLDER_CONTENT_TYPE ) + ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_FOLDER_CONTENT_TYPE )) : rType == DOCUMENT - ? rtl::OUString::createFromAscii( TDOC_DOCUMENT_CONTENT_TYPE ) - : rtl::OUString::createFromAscii( TDOC_ROOT_CONTENT_TYPE ) ), + ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_DOCUMENT_CONTENT_TYPE )) + : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_ROOT_CONTENT_TYPE )) ), m_aTitle( rTitle ) {} @@ -340,3 +342,5 @@ public: } // namespace tdoc_ucp #endif /* !INCLUDED_TDOC_CONTENT_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx b/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx index acb85c2d28..e8ecdbb549 100644 --- a/ucb/source/ucp/tdoc/tdoc_contentcaps.cxx +++ b/ucb/source/ucp/tdoc/tdoc_contentcaps.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. @@ -63,16 +64,16 @@ *************************************************************************/ -#include "com/sun/star/beans/Property.hpp" -#include "com/sun/star/beans/PropertyAttribute.hpp" -#include "com/sun/star/beans/PropertyValue.hpp" -#include "com/sun/star/embed/XStorage.hpp" -#include "com/sun/star/frame/XModel.hpp" -#include "com/sun/star/ucb/CommandInfo.hpp" -#include "com/sun/star/ucb/OpenCommandArgument2.hpp" -#include "com/sun/star/ucb/TransferInfo.hpp" - -#include "tdoc_content.hxx" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace com { namespace sun { namespace star { namespace embed { class XStorage; @@ -703,3 +704,5 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( return MAKECMDSEQUENCE( aRootCommandInfoTable ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx index 62bdf66b28..bed9e49bcb 100644 --- a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx +++ b/ucb/source/ucp/tdoc/tdoc_datasupplier.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. @@ -109,7 +110,7 @@ DataSupplier_Impl::~DataSupplier_Impl() while ( it != end ) { delete (*it); - it++; + ++it; } delete m_pNamesOfChildren; @@ -461,8 +462,10 @@ ResultSetDataSupplier::assembleChildURL( const ::rtl::OUString& aName ) sal_Int32 nUrlEnd = aURL.lastIndexOf( '/' ); if ( nUrlEnd != aURL.getLength() - 1 ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aURL += aName; return aURL; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_datasupplier.hxx b/ucb/source/ucp/tdoc/tdoc_datasupplier.hxx index d555f4f739..403f372ac1 100644 --- a/ucb/source/ucp/tdoc/tdoc_datasupplier.hxx +++ b/ucb/source/ucp/tdoc/tdoc_datasupplier.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. @@ -79,3 +80,5 @@ public: } // namespace tdoc_ucp #endif /* !INCLUDED_TDOC_DATASUPPLIER_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx index 8361e4bbbc..be75f490ff 100644 --- a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx +++ b/ucb/source/ucp/tdoc/tdoc_docmgr.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. @@ -689,3 +690,5 @@ bool OfficeDocumentsManager::isOfficeDocument( return true; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.hxx b/ucb/source/ucp/tdoc/tdoc_docmgr.hxx index c9d68e5f7f..cc1f3d3bac 100644 --- a/ucb/source/ucp/tdoc/tdoc_docmgr.hxx +++ b/ucb/source/ucp/tdoc/tdoc_docmgr.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 @@ namespace tdoc_ucp { } // namespace tdoc_ucp #endif /* !INCLUDED_TDOC_DOCMGR_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx b/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx index 02df472ff2..fb99ca1811 100644 --- a/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx +++ b/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.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. @@ -186,3 +187,4 @@ DocumentContentFactory::createServiceFactory( DocumentContentFactory::getSupportedServiceNames_Static() ) ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.hxx b/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.hxx index bde79fc1cb..314820e9c8 100644 --- a/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.hxx +++ b/ucb/source/ucp/tdoc/tdoc_documentcontentfactory.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. @@ -84,3 +85,5 @@ private: } // namespace tdoc_ucp #endif /* !INCLUDED_TDOC_DOCUMENTCONTENTFACTORY_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_passwordrequest.cxx b/ucb/source/ucp/tdoc/tdoc_passwordrequest.cxx index 53c4ce84bb..f3b340de04 100644 --- a/ucb/source/ucp/tdoc/tdoc_passwordrequest.cxx +++ b/ucb/source/ucp/tdoc/tdoc_passwordrequest.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. @@ -240,3 +241,4 @@ DocumentPasswordRequest::DocumentPasswordRequest( setContinuations( aContinuations ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_passwordrequest.hxx b/ucb/source/ucp/tdoc/tdoc_passwordrequest.hxx index 50381c8873..1c4c49e56c 100644 --- a/ucb/source/ucp/tdoc/tdoc_passwordrequest.hxx +++ b/ucb/source/ucp/tdoc/tdoc_passwordrequest.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,4 @@ namespace tdoc_ucp { #endif /* !INCLUDED_TDOC_PASSWORDREQUEST_HXX */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_provider.cxx b/ucb/source/ucp/tdoc/tdoc_provider.cxx index 7bb8af30b2..cd06aabd82 100644 --- a/ucb/source/ucp/tdoc/tdoc_provider.cxx +++ b/ucb/source/ucp/tdoc/tdoc_provider.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. @@ -627,3 +628,4 @@ ContentProvider::queryDocumentModel( const rtl::OUString & rUri ) const return xModel; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_provider.hxx b/ucb/source/ucp/tdoc/tdoc_provider.hxx index ca2ab4e5e7..46c67081bf 100644 --- a/ucb/source/ucp/tdoc/tdoc_provider.hxx +++ b/ucb/source/ucp/tdoc/tdoc_provider.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. @@ -146,3 +147,5 @@ private: } // namespace tdoc_ucp #endif /* !INCLUDED_TDOC_PROVIDER_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_resultset.cxx b/ucb/source/ucp/tdoc/tdoc_resultset.cxx index 7beab3f46f..a584fec66c 100644 --- a/ucb/source/ucp/tdoc/tdoc_resultset.cxx +++ b/ucb/source/ucp/tdoc/tdoc_resultset.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. @@ -93,3 +94,4 @@ void DynamicResultSet::initDynamic() m_xResultSet2 = m_xResultSet1; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_resultset.hxx b/ucb/source/ucp/tdoc/tdoc_resultset.hxx index 1a13b82443..7370709bd6 100644 --- a/ucb/source/ucp/tdoc/tdoc_resultset.hxx +++ b/ucb/source/ucp/tdoc/tdoc_resultset.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. @@ -54,3 +55,5 @@ public: } #endif /* !INCLUDED_TDOC_RESULTSET_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_services.cxx b/ucb/source/ucp/tdoc/tdoc_services.cxx index cc60b72394..46f11b0353 100644 --- a/ucb/source/ucp/tdoc/tdoc_services.cxx +++ b/ucb/source/ucp/tdoc/tdoc_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. @@ -87,3 +88,4 @@ extern "C" void * SAL_CALL component_getFactory( return pRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx index 49065d4ae1..f9b65886f0 100644 --- a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx +++ b/ucb/source/ucp/tdoc/tdoc_stgelems.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. @@ -1106,3 +1107,4 @@ void Stream::commitChanges() } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.hxx b/ucb/source/ucp/tdoc/tdoc_stgelems.hxx index 424af316ae..05be27b5dc 100644 --- a/ucb/source/ucp/tdoc/tdoc_stgelems.hxx +++ b/ucb/source/ucp/tdoc/tdoc_stgelems.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. @@ -540,3 +541,5 @@ private: } // namespace tdoc_ucp #endif /* !INCLUDED_TDOC_STGELEMS_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx b/ucb/source/ucp/tdoc/tdoc_storage.cxx index 7927108aad..c94b2f2209 100644 --- a/ucb/source/ucp/tdoc/tdoc_storage.cxx +++ b/ucb/source/ucp/tdoc/tdoc_storage.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. @@ -710,3 +711,5 @@ StorageElementFactory::queryStream( return xStream; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_storage.hxx b/ucb/source/ucp/tdoc/tdoc_storage.hxx index f570a8a3ab..3249e04606 100644 --- a/ucb/source/ucp/tdoc/tdoc_storage.hxx +++ b/ucb/source/ucp/tdoc/tdoc_storage.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. @@ -170,3 +171,5 @@ namespace tdoc_ucp { } // namespace tdoc_ucp #endif /* !INCLUDED_TDOC_STORAGE_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_uri.cxx b/ucb/source/ucp/tdoc/tdoc_uri.cxx index 5c52a39248..9c9871584a 100644 --- a/ucb/source/ucp/tdoc/tdoc_uri.cxx +++ b/ucb/source/ucp/tdoc/tdoc_uri.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. @@ -127,9 +128,11 @@ void Uri::init() const if ( nSlash != - 1 ) m_aInternalPath = m_aPath.copy( nSlash ); else - m_aInternalPath = rtl::OUString::createFromAscii( "/" ); + m_aInternalPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } m_eState = VALID; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/tdoc_uri.hxx b/ucb/source/ucp/tdoc/tdoc_uri.hxx index 91427bddde..6352fe313b 100644 --- a/ucb/source/ucp/tdoc/tdoc_uri.hxx +++ b/ucb/source/ucp/tdoc/tdoc_uri.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 @@ inline sal_Bool Uri::isFolder() const } // namespace tdoc_ucp #endif /* !INCLUDED_TDOC_URI_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/tdoc/ucptdoc1.component.orig b/ucb/source/ucp/tdoc/ucptdoc1.component.orig new file mode 100644 index 0000000000..8ba1471bd9 --- /dev/null +++ b/ucb/source/ucp/tdoc/ucptdoc1.component.orig @@ -0,0 +1,37 @@ + + + + + + + + + + + diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx index 4bb54dea94..24bcaf9e71 100644 --- a/ucb/source/ucp/webdav/ContentProperties.cxx +++ b/ucb/source/ucp/webdav/ContentProperties.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. @@ -104,13 +105,13 @@ ContentProperties::ContentProperties( const DAVResource& rResource ) NeonUri aURI( rResource.uri ); m_aEscapedTitle = aURI.GetPathBaseName(); - (*m_xProps)[ rtl::OUString::createFromAscii( "Title" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ] = PropertyValue( uno::makeAny( aURI.GetPathBaseNameUnescaped() ), true ); } catch ( DAVException const & ) { - (*m_xProps)[ rtl::OUString::createFromAscii( "Title" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ] = PropertyValue( uno::makeAny( rtl::OUString( @@ -140,11 +141,11 @@ ContentProperties::ContentProperties( : m_xProps( new PropertyValueMap ), m_bTrailingSlash( sal_False ) { - (*m_xProps)[ rtl::OUString::createFromAscii( "Title" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ] = PropertyValue( uno::makeAny( rTitle ), true ); - (*m_xProps)[ rtl::OUString::createFromAscii( "IsFolder" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")) ] = PropertyValue( uno::makeAny( bFolder ), true ); - (*m_xProps)[ rtl::OUString::createFromAscii( "IsDocument" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")) ] = PropertyValue( uno::makeAny( sal_Bool( !bFolder ) ), true ); } @@ -153,7 +154,7 @@ ContentProperties::ContentProperties( const rtl::OUString & rTitle ) : m_xProps( new PropertyValueMap ), m_bTrailingSlash( sal_False ) { - (*m_xProps)[ rtl::OUString::createFromAscii( "Title" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ] = PropertyValue( uno::makeAny( rTitle ), true ); } @@ -345,19 +346,19 @@ void ContentProperties::UCBNamesToHTTPNames( RTL_CONSTASCII_STRINGPARAM( "DateModified" ) ) ) { propertyNames.push_back( - rtl::OUString::createFromAscii( "Last-Modified" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Last-Modified")) ); } else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) ) { propertyNames.push_back( - rtl::OUString::createFromAscii( "Content-Type" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Content-Type")) ); } else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Size" ) ) ) { propertyNames.push_back( - rtl::OUString::createFromAscii( "Content-Length" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Content-Length")) ); } else { @@ -464,7 +465,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName, util::DateTime aDate; DateTimeHelper::convert( aValue, aDate ); - (*m_xProps)[ rtl::OUString::createFromAscii( "DateCreated" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateCreated")) ] = PropertyValue( uno::makeAny( aDate ), true ); } // else if ( rName.equals( DAVProperties::DISPLAYNAME ) ) @@ -479,7 +480,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName, rtl::OUString aValue; rValue >>= aValue; - (*m_xProps)[ rtl::OUString::createFromAscii( "Size" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) ] = PropertyValue( uno::makeAny( aValue.toInt64() ), true ); } else if ( rName.equalsAsciiL( @@ -492,13 +493,13 @@ void ContentProperties::addProperty( const rtl::OUString & rName, rtl::OUString aValue; rValue >>= aValue; - (*m_xProps)[ rtl::OUString::createFromAscii( "Size" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) ] = PropertyValue( uno::makeAny( aValue.toInt64() ), true ); } else if ( rName.equals( DAVProperties::GETCONTENTTYPE ) ) { // Map DAV:getcontenttype to UCP:MediaType (1:1) - (*m_xProps)[ rtl::OUString::createFromAscii( "MediaType" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ] = PropertyValue( rValue, true ); } else if ( rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Content-Type" ) ) ) @@ -507,7 +508,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName, // Only DAV resources have this property. // Map DAV:getcontenttype to UCP:MediaType (1:1) - (*m_xProps)[ rtl::OUString::createFromAscii( "MediaType" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ] = PropertyValue( rValue, true ); } // else if ( rName.equals( DAVProperties::GETETAG ) ) @@ -521,7 +522,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName, util::DateTime aDate; DateTimeHelper::convert( aValue, aDate ); - (*m_xProps)[ rtl::OUString::createFromAscii( "DateModified" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateModified")) ] = PropertyValue( uno::makeAny( aDate ), true ); } else if ( rName.equalsAsciiL( @@ -536,7 +537,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName, util::DateTime aDate; DateTimeHelper::convert( aValue, aDate ); - (*m_xProps)[ rtl::OUString::createFromAscii( "DateModified" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateModified")) ] = PropertyValue( uno::makeAny( aDate ), true ); } // else if ( rName.equals( DAVProperties::LOCKDISCOVERY ) ) @@ -552,14 +553,14 @@ void ContentProperties::addProperty( const rtl::OUString & rName, aValue.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "collection" ) ); - (*m_xProps)[ rtl::OUString::createFromAscii( "IsFolder" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")) ] = PropertyValue( uno::makeAny( bFolder ), true ); - (*m_xProps)[ rtl::OUString::createFromAscii( "IsDocument" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")) ] = PropertyValue( uno::makeAny( sal_Bool( !bFolder ) ), true ); - (*m_xProps)[ rtl::OUString::createFromAscii( "ContentType" ) ] + (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")) ] = PropertyValue( uno::makeAny( bFolder - ? rtl::OUString::createFromAscii( WEBDAV_COLLECTION_TYPE ) - : rtl::OUString::createFromAscii( WEBDAV_CONTENT_TYPE ) ), true ); + ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_COLLECTION_TYPE )) + : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_CONTENT_TYPE )) ), true ); } // else if ( rName.equals( DAVProperties::SOURCE ) ) // { @@ -571,3 +572,5 @@ void ContentProperties::addProperty( const rtl::OUString & rName, // Save property. (*m_xProps)[ rName ] = PropertyValue( rValue, bIsCaseSensitive ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/ContentProperties.hxx b/ucb/source/ucp/webdav/ContentProperties.hxx index 5a21dba08a..3b326e78cc 100644 --- a/ucb/source/ucp/webdav/ContentProperties.hxx +++ b/ucb/source/ucp/webdav/ContentProperties.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: } #endif /* !_WEBDAV_UCP_CONTENTPROPERTIES_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/DAVAuthListener.hxx b/ucb/source/ucp/webdav/DAVAuthListener.hxx index 71bed1c0a1..7e4a34b565 100644 --- a/ucb/source/ucp/webdav/DAVAuthListener.hxx +++ b/ucb/source/ucp/webdav/DAVAuthListener.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. @@ -50,3 +51,5 @@ class DAVAuthListener : public salhelper::SimpleReferenceObject } // namespace webdav_ucp #endif // _DAVAUTHLISTENER_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx b/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx index c0c9968613..db5f446556 100644 --- a/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx +++ b/ucb/source/ucp/webdav/DAVAuthListenerImpl.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 @@ namespace webdav_ucp } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/DAVException.hxx b/ucb/source/ucp/webdav/DAVException.hxx index 54ad20f440..014f864f1f 100644 --- a/ucb/source/ucp/webdav/DAVException.hxx +++ b/ucb/source/ucp/webdav/DAVException.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. @@ -164,3 +165,5 @@ class DAVException } // namespace webdav_ucp #endif // _DAVEXCEPTION_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/DAVProperties.cxx b/ucb/source/ucp/webdav/DAVProperties.cxx index 1b950984b4..aa3d380632 100644 --- a/ucb/source/ucp/webdav/DAVProperties.cxx +++ b/ucb/source/ucp/webdav/DAVProperties.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,32 +34,19 @@ using namespace webdav_ucp; -const ::rtl::OUString DAVProperties::CREATIONDATE = - ::rtl::OUString::createFromAscii( "DAV:creationdate" ); -const ::rtl::OUString DAVProperties::DISPLAYNAME = - ::rtl::OUString::createFromAscii( "DAV:displayname" ); -const ::rtl::OUString DAVProperties::GETCONTENTLANGUAGE = - ::rtl::OUString::createFromAscii( "DAV:getcontentlanguage" ); -const ::rtl::OUString DAVProperties::GETCONTENTLENGTH = - ::rtl::OUString::createFromAscii( "DAV:getcontentlength" ); -const ::rtl::OUString DAVProperties::GETCONTENTTYPE = - ::rtl::OUString::createFromAscii( "DAV:getcontenttype" ); -const ::rtl::OUString DAVProperties::GETETAG = - ::rtl::OUString::createFromAscii( "DAV:getetag" ); -const ::rtl::OUString DAVProperties::GETLASTMODIFIED = - ::rtl::OUString::createFromAscii( "DAV:getlastmodified" ); -const ::rtl::OUString DAVProperties::LOCKDISCOVERY = - ::rtl::OUString::createFromAscii( "DAV:lockdiscovery" ); -const ::rtl::OUString DAVProperties::RESOURCETYPE = - ::rtl::OUString::createFromAscii( "DAV:resourcetype" ); -const ::rtl::OUString DAVProperties::SOURCE = - ::rtl::OUString::createFromAscii( "DAV:source" ); -const ::rtl::OUString DAVProperties::SUPPORTEDLOCK = - ::rtl::OUString::createFromAscii( "DAV:supportedlock" ); - -const ::rtl::OUString DAVProperties::EXECUTABLE = - ::rtl::OUString::createFromAscii( - "http://apache.org/dav/props/executable" ); +const ::rtl::OUString DAVProperties::CREATIONDATE(RTL_CONSTASCII_USTRINGPARAM("DAV:creationdate")); +const ::rtl::OUString DAVProperties::DISPLAYNAME(RTL_CONSTASCII_USTRINGPARAM("DAV:displayname")); +const ::rtl::OUString DAVProperties::GETCONTENTLANGUAGE(RTL_CONSTASCII_USTRINGPARAM("DAV:getcontentlanguage")); +const ::rtl::OUString DAVProperties::GETCONTENTLENGTH(RTL_CONSTASCII_USTRINGPARAM("DAV:getcontentlength")); +const ::rtl::OUString DAVProperties::GETCONTENTTYPE(RTL_CONSTASCII_USTRINGPARAM("DAV:getcontenttype")); +const ::rtl::OUString DAVProperties::GETETAG(RTL_CONSTASCII_USTRINGPARAM("DAV:getetag")); +const ::rtl::OUString DAVProperties::GETLASTMODIFIED(RTL_CONSTASCII_USTRINGPARAM("DAV:getlastmodified")); +const ::rtl::OUString DAVProperties::LOCKDISCOVERY(RTL_CONSTASCII_USTRINGPARAM("DAV:lockdiscovery")); +const ::rtl::OUString DAVProperties::RESOURCETYPE(RTL_CONSTASCII_USTRINGPARAM("DAV:resourcetype")); +const ::rtl::OUString DAVProperties::SOURCE(RTL_CONSTASCII_USTRINGPARAM("DAV:source")); +const ::rtl::OUString DAVProperties::SUPPORTEDLOCK(RTL_CONSTASCII_USTRINGPARAM("DAV:supportedlock")); + +const ::rtl::OUString DAVProperties::EXECUTABLE(RTL_CONSTASCII_USTRINGPARAM("http://apache.org/dav/props/executable")); // ------------------------------------------------------------------- // static @@ -180,11 +168,11 @@ void DAVProperties::createUCBPropName( const char * nspace, else { // Create property name that encodes, namespace and name ( XML ). - rFullName = rtl::OUString::createFromAscii( "" ); + rFullName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "\">" )); } } @@ -197,3 +185,5 @@ bool DAVProperties::isUCBDeadProperty( const NeonPropName & rName ) rName.nspace, "http://ucb.openoffice.org/dav/props/" ) == 0 ) ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/DAVProperties.hxx b/ucb/source/ucp/webdav/DAVProperties.hxx index 8567946177..153148c16d 100644 --- a/ucb/source/ucp/webdav/DAVProperties.hxx +++ b/ucb/source/ucp/webdav/DAVProperties.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. @@ -60,3 +61,5 @@ struct DAVProperties } // namespace webdav_ucp #endif // _DAVPROPERTIES_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/DAVRequestEnvironment.hxx b/ucb/source/ucp/webdav/DAVRequestEnvironment.hxx index c1a3ffb295..e19c6de2d2 100644 --- a/ucb/source/ucp/webdav/DAVRequestEnvironment.hxx +++ b/ucb/source/ucp/webdav/DAVRequestEnvironment.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. @@ -60,3 +61,5 @@ DAVRequestEnvironment( const rtl::OUString & rRequestURI, } // namespace webdav_ucp #endif // _DAVREQUESTENVIRONMENT_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/DAVResource.hxx b/ucb/source/ucp/webdav/DAVResource.hxx index a133f0ba56..45d9c9698d 100644 --- a/ucb/source/ucp/webdav/DAVResource.hxx +++ b/ucb/source/ucp/webdav/DAVResource.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,5 @@ struct DAVResourceInfo } // namespace webdav_ucp #endif // _DAVRESOURCE_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx index e4617b7b9e..fcf10d996a 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.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. @@ -1006,6 +1007,7 @@ sal_Int64 DAVResourceAccess::LOCK( } #endif +#if 0 // currently not used, but please don't remove code //========================================================================= void DAVResourceAccess::UNLOCK( const uno::Reference< ucb::XCommandEnvironment > & xEnv ) @@ -1216,3 +1218,5 @@ sal_Bool DAVResourceAccess::handleException( DAVException & e, int errorCount ) return sal_False; // Abort } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.hxx b/ucb/source/ucp/webdav/DAVResourceAccess.hxx index 38ffa714a3..89191971fc 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.hxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.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. @@ -249,3 +250,5 @@ private: } // namespace webdav_ucp #endif // _DAVRESOURCEACCESS_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/DAVSession.hxx b/ucb/source/ucp/webdav/DAVSession.hxx index 1206679fc5..3cf2dcfb92 100644 --- a/ucb/source/ucp/webdav/DAVSession.hxx +++ b/ucb/source/ucp/webdav/DAVSession.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. diff --git a/ucb/source/ucp/webdav/DAVSessionFactory.cxx b/ucb/source/ucp/webdav/DAVSessionFactory.cxx index 112fc93ca9..6438c7eca8 100644 --- a/ucb/source/ucp/webdav/DAVSessionFactory.cxx +++ b/ucb/source/ucp/webdav/DAVSessionFactory.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. @@ -104,3 +105,4 @@ void DAVSessionFactory::releaseElement( DAVSession * pElement ) SAL_THROW(()) m_aMap.erase( pElement->m_aContainerIt ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/DAVSessionFactory.hxx b/ucb/source/ucp/webdav/DAVSessionFactory.hxx index 11b2ef29d5..4dfd94e4ab 100644 --- a/ucb/source/ucp/webdav/DAVSessionFactory.hxx +++ b/ucb/source/ucp/webdav/DAVSessionFactory.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. @@ -80,3 +81,5 @@ private: } // namespace webdav_ucp #endif // _DAVSESSIONFACTORY_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/DAVTypes.hxx b/ucb/source/ucp/webdav/DAVTypes.hxx index 4d000057b0..647d7b81f1 100644 --- a/ucb/source/ucp/webdav/DAVTypes.hxx +++ b/ucb/source/ucp/webdav/DAVTypes.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. @@ -83,3 +84,5 @@ struct ProppatchValue } // namespace webdav_ucp #endif // _DAVTYPES_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/DateTimeHelper.cxx b/ucb/source/ucp/webdav/DateTimeHelper.cxx index ab3da8d22a..5b7f976b24 100644 --- a/ucb/source/ucp/webdav/DateTimeHelper.cxx +++ b/ucb/source/ucp/webdav/DateTimeHelper.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. @@ -268,3 +269,4 @@ bool DateTimeHelper::convert (const OUString& s, DateTime& dateTime) return false; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/DateTimeHelper.hxx b/ucb/source/ucp/webdav/DateTimeHelper.hxx index 101bd8191b..6c598c9931 100644 --- a/ucb/source/ucp/webdav/DateTimeHelper.hxx +++ b/ucb/source/ucp/webdav/DateTimeHelper.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,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/LinkSequence.cxx b/ucb/source/ucp/webdav/LinkSequence.cxx index 31ec14ba0a..f29a8b3a90 100644 --- a/ucb/source/ucp/webdav/LinkSequence.cxx +++ b/ucb/source/ucp/webdav/LinkSequence.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. @@ -31,9 +32,7 @@ #include #include -#ifndef _LINKSEQUENCE_HXX_ #include "LinkSequence.hxx" -#endif using namespace webdav_ucp; using namespace com::sun::star; @@ -201,9 +200,9 @@ bool LinkSequence::toXML( const uno::Sequence< ucb::Link > & rInData, sal_Int32 nCount = rInData.getLength(); if ( nCount ) { - rtl::OUString aPre( rtl::OUString::createFromAscii( "" ) ); - rtl::OUString aMid( rtl::OUString::createFromAscii( "" ) ); - rtl::OUString aEnd( rtl::OUString::createFromAscii( "" ) ); + rtl::OUString aPre( RTL_CONSTASCII_USTRINGPARAM("") ); + rtl::OUString aMid( RTL_CONSTASCII_USTRINGPARAM("") ); + rtl::OUString aEnd( RTL_CONSTASCII_USTRINGPARAM("") ); for ( sal_Int32 n = 0; n < nCount; ++n ) { @@ -217,3 +216,5 @@ bool LinkSequence::toXML( const uno::Sequence< ucb::Link > & rInData, } return false; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/LinkSequence.hxx b/ucb/source/ucp/webdav/LinkSequence.hxx index 8a2a13d015..d9f82491ee 100644 --- a/ucb/source/ucp/webdav/LinkSequence.hxx +++ b/ucb/source/ucp/webdav/LinkSequence.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,3 +50,5 @@ public: } #endif /* _LINKSEQUENCE_HXX_ */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/LockEntrySequence.cxx b/ucb/source/ucp/webdav/LockEntrySequence.cxx index 1e577a4798..8819111ef8 100644 --- a/ucb/source/ucp/webdav/LockEntrySequence.cxx +++ b/ucb/source/ucp/webdav/LockEntrySequence.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. @@ -238,3 +239,5 @@ bool LockEntrySequence::createFromXML( const rtl::OString & rInData, rOutData.realloc( nCount ); return success; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/LockEntrySequence.hxx b/ucb/source/ucp/webdav/LockEntrySequence.hxx index 6f00020b63..e28ee31dcd 100644 --- a/ucb/source/ucp/webdav/LockEntrySequence.hxx +++ b/ucb/source/ucp/webdav/LockEntrySequence.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. @@ -46,3 +47,5 @@ public: } #endif /* _LOCKENTRYSEQUENCE_HXX_ */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/LockSequence.cxx b/ucb/source/ucp/webdav/LockSequence.cxx index f95badaf19..896117152a 100644 --- a/ucb/source/ucp/webdav/LockSequence.cxx +++ b/ucb/source/ucp/webdav/LockSequence.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. @@ -365,3 +366,5 @@ bool LockSequence::createFromXML( const rtl::OString & rInData, return success; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/LockSequence.hxx b/ucb/source/ucp/webdav/LockSequence.hxx index 0e218d1a80..c5cff554e1 100644 --- a/ucb/source/ucp/webdav/LockSequence.hxx +++ b/ucb/source/ucp/webdav/LockSequence.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. @@ -46,3 +47,5 @@ public: } #endif /* _LOCKSEQUENCE_HXX_ */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/NeonHeadRequest.cxx b/ucb/source/ucp/webdav/NeonHeadRequest.cxx index 1e5294882a..f62fc0e81e 100644 --- a/ucb/source/ucp/webdav/NeonHeadRequest.cxx +++ b/ucb/source/ucp/webdav/NeonHeadRequest.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. @@ -127,3 +128,4 @@ NeonHeadRequest::~NeonHeadRequest() { } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/NeonHeadRequest.hxx b/ucb/source/ucp/webdav/NeonHeadRequest.hxx index 9bbafc9d82..4f58a3e2cc 100644 --- a/ucb/source/ucp/webdav/NeonHeadRequest.hxx +++ b/ucb/source/ucp/webdav/NeonHeadRequest.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. @@ -51,3 +52,4 @@ public: #endif // _NEONHEADREQUEST_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/NeonInputStream.cxx b/ucb/source/ucp/webdav/NeonInputStream.cxx index 746ce5666b..2b438e496b 100644 --- a/ucb/source/ucp/webdav/NeonInputStream.cxx +++ b/ucb/source/ucp/webdav/NeonInputStream.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. @@ -193,3 +194,5 @@ sal_Int64 SAL_CALL NeonInputStream::getLength() { return mLen; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/NeonInputStream.hxx b/ucb/source/ucp/webdav/NeonInputStream.hxx index 7130f5a0bd..20d0c9c080 100644 --- a/ucb/source/ucp/webdav/NeonInputStream.hxx +++ b/ucb/source/ucp/webdav/NeonInputStream.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. @@ -122,3 +123,5 @@ class NeonInputStream : public ::com::sun::star::io::XInputStream, } // namespace webdav_ucp #endif // _NEONINPUTSTREAM_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/NeonPropFindRequest.cxx b/ucb/source/ucp/webdav/NeonPropFindRequest.cxx index f794516d20..cf04c5f25e 100644 --- a/ucb/source/ucp/webdav/NeonPropFindRequest.cxx +++ b/ucb/source/ucp/webdav/NeonPropFindRequest.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. @@ -142,7 +143,7 @@ extern "C" int NPFR_propfind_iter( void* userdata, RTL_CONSTASCII_STRINGPARAM( "push_back( theResource ); } +extern osl::Mutex aGlobalNeonMutex; + // ------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------- @@ -268,12 +271,15 @@ NeonPropFindRequest::NeonPropFindRequest( HttpSession* inSession, thePropNames[ theIndex ].nspace = NULL; thePropNames[ theIndex ].name = NULL; - nError = ne_simple_propfind( inSession, - inPath, - inDepth, - thePropNames, - NPFR_propfind_results, - &ioResources ); + { + osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex ); + nError = ne_simple_propfind( inSession, + inPath, + inDepth, + thePropNames, + NPFR_propfind_results, + &ioResources ); + } for ( theIndex = 0; theIndex < thePropCount; theIndex ++ ) free( (void *)thePropNames[ theIndex ].name ); @@ -283,6 +289,7 @@ NeonPropFindRequest::NeonPropFindRequest( HttpSession* inSession, else { // ALLPROP + osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex ); nError = ne_simple_propfind( inSession, inPath, inDepth, @@ -308,11 +315,14 @@ NeonPropFindRequest::NeonPropFindRequest( std::vector< DAVResourceInfo > & ioResInfo, int & nError ) { - nError = ne_propnames( inSession, - inPath, - inDepth, - NPFR_propnames_results, - &ioResInfo ); + { + osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex ); + nError = ne_propnames( inSession, + inPath, + inDepth, + NPFR_propnames_results, + &ioResInfo ); + } // #87585# - Sometimes neon lies (because some servers lie). if ( ( nError == NE_OK ) && ioResInfo.empty() ) @@ -325,3 +335,5 @@ NeonPropFindRequest::NeonPropFindRequest( NeonPropFindRequest::~NeonPropFindRequest( ) { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/NeonPropFindRequest.hxx b/ucb/source/ucp/webdav/NeonPropFindRequest.hxx index 7487b29b74..cd4b5ded17 100644 --- a/ucb/source/ucp/webdav/NeonPropFindRequest.hxx +++ b/ucb/source/ucp/webdav/NeonPropFindRequest.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. @@ -60,3 +61,5 @@ public: } // namespace webdav_ucp #endif // _NEONPROPFINDREQUEST_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx index dca92a040a..125e94328d 100644 --- a/ucb/source/ucp/webdav/NeonSession.cxx +++ b/ucb/source/ucp/webdav/NeonSession.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. @@ -250,15 +251,6 @@ extern "C" int NeonSession_NeonAuth( void * inUserData, * cancel the request. (if non-zero, username and password are * ignored.) */ -#if 0 - // Give'em only a limited mumber of retries.. - if ( attempt > 9 ) - { - // abort - return -1; - } -#endif - NeonSession * theSession = static_cast< NeonSession * >( inUserData ); DAVAuthListener * pListener = theSession->getRequestEnvironment().m_xAuthListener.get(); @@ -359,7 +351,7 @@ namespace { ::rtl::OUString GetHostnamePart( const ::rtl::OUString& _rRawString ) { ::rtl::OUString sPart; - ::rtl::OUString sPartId = ::rtl::OUString::createFromAscii( "CN=" ); + ::rtl::OUString sPartId(RTL_CONSTASCII_USTRINGPARAM("CN=")); sal_Int32 nContStart = _rRawString.indexOf( sPartId ); if ( nContStart != -1 ) { @@ -635,7 +627,10 @@ NeonSession::~NeonSession( ) { if ( m_pHttpSession ) { - ne_session_destroy( m_pHttpSession ); + { + osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex ); + ne_session_destroy( m_pHttpSession ); + } m_pHttpSession = 0; } delete static_cast< RequestDataMap * >( m_pRequestData ); @@ -714,7 +709,10 @@ void NeonSession::Init() m_nProxyPort = rProxyCfg.nPort; // new session needed, destroy old first - ne_session_destroy( m_pHttpSession ); + { + osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex ); + ne_session_destroy( m_pHttpSession ); + } m_pHttpSession = 0; bCreateNewSession = true; } @@ -1911,13 +1909,14 @@ int NeonSession::GET( ne_session * sess, //struct get_context ctx; ne_request * req = ne_request_create( sess, "GET", uri ); int ret; - void *cursor = NULL; - const char *name, *value; ne_decompress * dc = ne_decompress_reader( req, ne_accept_2xx, reader, userdata ); - ret = ne_request_dispatch( req ); + { + osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex ); + ret = ne_request_dispatch( req ); + } if ( getheaders ) { @@ -1956,7 +1955,10 @@ int NeonSession::PUT( ne_session * sess, ne_set_request_body_buffer( req, buffer, size ); - ret = ne_request_dispatch( req ); + { + osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex ); + ret = ne_request_dispatch( req ); + } if ( ret == NE_OK && ne_get_status( req )->klass != 2 ) ret = NE_ERROR; @@ -2001,7 +2003,10 @@ int NeonSession::POST( ne_session * sess, ne_set_request_body_buffer( req, buffer, strlen( buffer ) ); - ret = ne_request_dispatch( req ); + { + osl::Guard< osl::Mutex > theGlobalGuard( aGlobalNeonMutex ); + ret = ne_request_dispatch( req ); + } //if ( ctx.error ) // ret = NE_ERROR; diff --git a/ucb/source/ucp/webdav/NeonSession.hxx b/ucb/source/ucp/webdav/NeonSession.hxx index 103724311d..efba1282ea 100644 --- a/ucb/source/ucp/webdav/NeonSession.hxx +++ b/ucb/source/ucp/webdav/NeonSession.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. @@ -293,3 +294,5 @@ private: } // namespace webdav_ucp #endif // _NEONSESSION_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/NeonTypes.hxx b/ucb/source/ucp/webdav/NeonTypes.hxx index cb150f06b2..5b77368697 100644 --- a/ucb/source/ucp/webdav/NeonTypes.hxx +++ b/ucb/source/ucp/webdav/NeonTypes.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 @@ typedef ne_prop_result_set NeonPropFindResultSet; typedef struct ne_lock NeonLock; #endif // _NEONTYPES_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/NeonUri.cxx b/ucb/source/ucp/webdav/NeonUri.cxx index 27f24c6311..be267eb2a2 100644 --- a/ucb/source/ucp/webdav/NeonUri.cxx +++ b/ucb/source/ucp/webdav/NeonUri.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. @@ -272,7 +273,7 @@ void NeonUri::calculateURI () return aTemp; } else - return rtl::OUString::createFromAscii ("/"); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("/")); } bool NeonUri::operator== ( const NeonUri & rOther ) const @@ -288,7 +289,7 @@ bool NeonUri::operator== ( const NeonUri & rOther ) const void NeonUri::AppendPath (const rtl::OUString& rPath) { if (mPath.lastIndexOf ('/') != mPath.getLength () - 1) - mPath += rtl::OUString::createFromAscii ("/"); + mPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("/")); mPath += rPath; calculateURI (); @@ -338,3 +339,4 @@ rtl::OUString NeonUri::makeConnectionEndPointString( return aBuf.makeStringAndClear(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/NeonUri.hxx b/ucb/source/ucp/webdav/NeonUri.hxx index 2623887ae0..47dd22a6ea 100644 --- a/ucb/source/ucp/webdav/NeonUri.hxx +++ b/ucb/source/ucp/webdav/NeonUri.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. @@ -100,3 +101,5 @@ class NeonUri } // namespace webdav_ucp #endif // _NEONURI_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/PropertyMap.hxx b/ucb/source/ucp/webdav/PropertyMap.hxx index fefe316979..4067bab5a0 100644 --- a/ucb/source/ucp/webdav/PropertyMap.hxx +++ b/ucb/source/ucp/webdav/PropertyMap.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. @@ -63,3 +64,5 @@ PropertyMap; } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx index 42f30c665b..ef76f5784c 100644 --- a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx +++ b/ucb/source/ucp/webdav/UCBDeadPropertyValue.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,32 +50,20 @@ struct UCBDeadPropertyValueParseContext }; // static -const rtl::OUString UCBDeadPropertyValue::aTypeString - = rtl::OUString::createFromAscii( "string" ); -const rtl::OUString UCBDeadPropertyValue::aTypeLong - = rtl::OUString::createFromAscii( "long" ); -const rtl::OUString UCBDeadPropertyValue::aTypeShort - = rtl::OUString::createFromAscii( "short" ); -const rtl::OUString UCBDeadPropertyValue::aTypeBoolean - = rtl::OUString::createFromAscii( "boolean" ); -const rtl::OUString UCBDeadPropertyValue::aTypeChar - = rtl::OUString::createFromAscii( "char" ); -const rtl::OUString UCBDeadPropertyValue::aTypeByte - = rtl::OUString::createFromAscii( "byte" ); -const rtl::OUString UCBDeadPropertyValue::aTypeHyper - = rtl::OUString::createFromAscii( "hyper" ); -const rtl::OUString UCBDeadPropertyValue::aTypeFloat - = rtl::OUString::createFromAscii( "float" ); -const rtl::OUString UCBDeadPropertyValue::aTypeDouble - = rtl::OUString::createFromAscii( "double" ); +const rtl::OUString UCBDeadPropertyValue::aTypeString(RTL_CONSTASCII_USTRINGPARAM("string")); +const rtl::OUString UCBDeadPropertyValue::aTypeLong(RTL_CONSTASCII_USTRINGPARAM("long")); +const rtl::OUString UCBDeadPropertyValue::aTypeShort(RTL_CONSTASCII_USTRINGPARAM("short")); +const rtl::OUString UCBDeadPropertyValue::aTypeBoolean(RTL_CONSTASCII_USTRINGPARAM("boolean")); +const rtl::OUString UCBDeadPropertyValue::aTypeChar(RTL_CONSTASCII_USTRINGPARAM("char")); +const rtl::OUString UCBDeadPropertyValue::aTypeByte(RTL_CONSTASCII_USTRINGPARAM("byte")); +const rtl::OUString UCBDeadPropertyValue::aTypeHyper(RTL_CONSTASCII_USTRINGPARAM("hyper")); +const rtl::OUString UCBDeadPropertyValue::aTypeFloat(RTL_CONSTASCII_USTRINGPARAM("float")); +const rtl::OUString UCBDeadPropertyValue::aTypeDouble(RTL_CONSTASCII_USTRINGPARAM("double")); // static -const rtl::OUString UCBDeadPropertyValue::aXMLPre - = rtl::OUString::createFromAscii( "" ); -const rtl::OUString UCBDeadPropertyValue::aXMLMid - = rtl::OUString::createFromAscii( "" ); -const rtl::OUString UCBDeadPropertyValue::aXMLEnd - = rtl::OUString::createFromAscii( "" ); +const rtl::OUString UCBDeadPropertyValue::aXMLPre(RTL_CONSTASCII_USTRINGPARAM("")); +const rtl::OUString UCBDeadPropertyValue::aXMLMid(RTL_CONSTASCII_USTRINGPARAM("")); +const rtl::OUString UCBDeadPropertyValue::aXMLEnd(RTL_CONSTASCII_USTRINGPARAM("")); #define STATE_TOP (1) @@ -398,7 +387,7 @@ bool UCBDeadPropertyValue::createFromXML( const rtl::OString & rInData, else if ( aCtx.pType->equalsIgnoreAsciiCase( aTypeBoolean ) ) { if ( aStringValue.equalsIgnoreAsciiCase( - rtl::OUString::createFromAscii( "true" ) ) ) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("true")) ) ) rOutData <<= sal_Bool( sal_True ); else rOutData <<= sal_Bool( sal_False ); @@ -541,3 +530,5 @@ bool UCBDeadPropertyValue::toXML( const uno::Any & rInData, return true; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/UCBDeadPropertyValue.hxx b/ucb/source/ucp/webdav/UCBDeadPropertyValue.hxx index b6a2bba2d4..5720df28b4 100644 --- a/ucb/source/ucp/webdav/UCBDeadPropertyValue.hxx +++ b/ucb/source/ucp/webdav/UCBDeadPropertyValue.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. @@ -63,3 +64,5 @@ public: } #endif /* _UCBDEADPROPERTYVALUE_HXX_ */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index c58ba20719..e860f5139b 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.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,8 +344,8 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes() rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString::createFromAscii( - "com.sun.star.comp.ucb.WebDAVContent" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.WebDAVContent" )); } //========================================================================= @@ -354,7 +355,7 @@ uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() { uno::Sequence< rtl::OUString > aSNS( 1 ); aSNS.getArray()[ 0 ] - = rtl::OUString::createFromAscii( WEBDAV_CONTENT_SERVICE_NAME ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_CONTENT_SERVICE_NAME )); return aSNS; } @@ -383,9 +384,9 @@ rtl::OUString SAL_CALL Content::getContentType() } if ( bFolder ) - return rtl::OUString::createFromAscii( WEBDAV_COLLECTION_TYPE ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_COLLECTION_TYPE )); - return rtl::OUString::createFromAscii( WEBDAV_CONTENT_TYPE ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_CONTENT_TYPE )); } //========================================================================= @@ -422,8 +423,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -444,8 +445,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -456,8 +457,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "No properties!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No properties!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -499,8 +500,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -521,8 +522,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -586,8 +587,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -608,8 +609,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -972,7 +973,7 @@ Content::queryCreatableContentsInfo() // document. aSeq.getArray()[ 0 ].Type - = rtl::OUString::createFromAscii( WEBDAV_CONTENT_TYPE ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_CONTENT_TYPE )); aSeq.getArray()[ 0 ].Attributes = ucb::ContentInfoAttribute::INSERT_WITH_INPUTSTREAM | ucb::ContentInfoAttribute::KIND_DOCUMENT; @@ -987,7 +988,7 @@ Content::queryCreatableContentsInfo() // folder. aSeq.getArray()[ 1 ].Type - = rtl::OUString::createFromAscii( WEBDAV_COLLECTION_TYPE ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_COLLECTION_TYPE )); aSeq.getArray()[ 1 ].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER; @@ -1021,18 +1022,18 @@ Content::createNewContent( const ucb::ContentInfo& Info ) "WebdavContent::createNewContent - empty identifier!" ); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); sal_Bool isCollection; if ( Info.Type.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( WEBDAV_COLLECTION_TYPE ) ) ) { - aURL += rtl::OUString::createFromAscii( "New_Collection" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Collection")); isCollection = sal_True; } else { - aURL += rtl::OUString::createFromAscii( "New_Content" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Content")); isCollection = sal_False; } @@ -1548,8 +1549,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); continue; } @@ -1562,8 +1563,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rName.equalsAsciiL( @@ -1571,8 +1572,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rName.equalsAsciiL( @@ -1580,8 +1581,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) ) ) @@ -1614,8 +1615,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( catch ( DAVException const & ) { aRet[ n ] <<= lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Invalid content identifier!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Invalid content identifier!" )), static_cast< cppu::OWeakObject * >( this ), -1 ); } @@ -1623,8 +1624,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Empty title not allowed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Empty title not allowed!" )), static_cast< cppu::OWeakObject * >( this ), -1 ); } @@ -1632,8 +1633,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1653,8 +1654,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // PROPPATCH::set would add the property automatically, which // is not allowed for "setPropertyValues" command! aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString::createFromAscii( - "Property is unknown!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is unknown!" )), static_cast< cppu::OWeakObject * >( this ) ); continue; } @@ -1663,8 +1664,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rName.equalsAsciiL( @@ -1672,8 +1673,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rName.equalsAsciiL( @@ -1681,8 +1682,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rName.equalsAsciiL( @@ -1691,8 +1692,17 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // Read-only property! // (but could be writable, if 'getcontenttype' would be) aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), + static_cast< cppu::OWeakObject * >( this ) ); + } + if ( rName.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM( "CreatableContentsInfo" ) ) ) + { + // Read-only property! + aRet[ n ] <<= lang::IllegalAccessException( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } if ( rName.equalsAsciiL( @@ -1766,8 +1776,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= uno::Exception( - rtl::OUString::createFromAscii( - "No property set for storing the value!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No property set for storing the value!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1831,7 +1841,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( rtl::OUString aNewURL = getParentURL(); if ( aNewURL.lastIndexOf( '/' ) != ( aNewURL.getLength() - 1 ) ) - aNewURL += rtl::OUString::createFromAscii( "/" ); + aNewURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aNewURL += NeonUri::escapeSegment( aNewTitle ); @@ -1874,7 +1884,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // Set error . aRet[ nTitlePos ] <<= uno::Exception( - rtl::OUString::createFromAscii( "Exchange failed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Exchange failed!")), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1892,7 +1902,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { osl::Guard< osl::Mutex > aGuard( m_aMutex ); - aEvent.PropertyName = rtl::OUString::createFromAscii( "Title" ); + aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); aEvent.OldValue = uno::makeAny( aOldTitle ); aEvent.NewValue = uno::makeAny( aNewTitle ); @@ -2195,7 +2205,7 @@ void Content::queryChildren( ContentRefList& rChildren ) if ( nURLPos != ( aURL.getLength() - 1 ) ) { // No trailing slash found. Append. - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } sal_Int32 nLen = aURL.getLength(); @@ -2257,7 +2267,7 @@ void Content::insert( OSL_ENSURE( sal_False, "Content::insert - Title missing!" ); uno::Sequence< rtl::OUString > aProps( 1 ); - aProps[ 0 ] = rtl::OUString::createFromAscii( "Title" ); + aProps[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); ucbhelper::cancelCommandExecution( uno::makeAny( ucb::MissingPropertiesException( rtl::OUString(), @@ -2288,8 +2298,8 @@ void Content::insert( if ( !bTransient || ( bTransient && !bCollection ) ) { ucb::UnsupportedNameClashException aEx( - rtl::OUString::createFromAscii( - "Unable to write without overwrite!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to write without overwrite!" )), static_cast< cppu::OWeakObject * >( this ), ucb::NameClash::ERROR ); @@ -2336,8 +2346,8 @@ void Content::insert( "Content::insert - " "Unknown interaction selection!" ); throw ucb::CommandFailedException( - rtl::OUString::createFromAscii( - "Unknown interaction selection!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unknown interaction selection!" )), uno::Reference< uno::XInterface >(), aExAsAny ); // break; @@ -2510,19 +2520,19 @@ void Content::transfer( RTL_CONSTASCII_STRINGPARAM( WEBDAV_URL_SCHEME ) ) ) { sourceURI.SetScheme( - rtl::OUString::createFromAscii( HTTP_URL_SCHEME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HTTP_URL_SCHEME )) ); } else if ( aScheme.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) ) { sourceURI.SetScheme( - rtl::OUString::createFromAscii( HTTP_URL_SCHEME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HTTP_URL_SCHEME )) ); } else if ( aScheme.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( DAVS_URL_SCHEME ) ) ) { sourceURI.SetScheme( - rtl::OUString::createFromAscii( HTTPS_URL_SCHEME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HTTPS_URL_SCHEME )) ); } else { @@ -2534,8 +2544,8 @@ void Content::transfer( ucbhelper::cancelCommandExecution( uno::makeAny( ucb::InteractiveBadTransferURLException( - rtl::OUString::createFromAscii( - "Unsupported URL scheme!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unsupported URL scheme!" )), static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); // Unreachable @@ -2545,7 +2555,7 @@ void Content::transfer( if ( targetURI.GetScheme().toAsciiLowerCase().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( WEBDAV_URL_SCHEME ) ) ) targetURI.SetScheme( - rtl::OUString::createFromAscii( HTTP_URL_SCHEME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HTTP_URL_SCHEME )) ); else if ( targetURI.GetScheme().toAsciiLowerCase().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) ) targetURI.SetScheme( @@ -2562,8 +2572,8 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::InteractiveBadTransferURLException( - rtl::OUString::createFromAscii( - "Different hosts!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Different hosts!" )), static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); // Unreachable @@ -2585,7 +2595,7 @@ void Content::transfer( rtl::OUString aTargetURL = xIdentifier->getContentIdentifier(); if ( ( aTargetURL.lastIndexOf( '/' ) + 1 ) != aTargetURL.getLength() ) - aTargetURL += rtl::OUString::createFromAscii( "/" ); + aTargetURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aTargetURL += aTitle; @@ -2925,7 +2935,7 @@ sal_Bool Content::isFolder( } uno::Sequence< beans::Property > aProperties( 1 ); - aProperties[ 0 ].Name = rtl::OUString::createFromAscii( "IsFolder" ); + aProperties[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")); aProperties[ 0 ].Handle = -1; uno::Reference< sdbc::XRow > xRow( getPropertyValues( aProperties, xEnv ) ); if ( xRow.is() ) @@ -2974,7 +2984,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) aException <<= ucb::InteractiveAugmentedIOException( - rtl::OUString::createFromAscii( "Not found!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Not found!")), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, ucb::IOErrorCode_NOT_EXISTING, @@ -3260,3 +3270,5 @@ const Content::ResourceType & Content::getResourceType( { return getResourceType( xEnv, m_xResAccess ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/webdavcontent.hxx b/ucb/source/ucp/webdav/webdavcontent.hxx index 85b9b710f3..b18369866f 100644 --- a/ucb/source/ucp/webdav/webdavcontent.hxx +++ b/ucb/source/ucp/webdav/webdavcontent.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. @@ -297,3 +298,5 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/webdavcontentcaps.cxx b/ucb/source/ucp/webdav/webdavcontentcaps.cxx index 0af93828ac..8089bf93a4 100644 --- a/ucb/source/ucp/webdav/webdavcontentcaps.cxx +++ b/ucb/source/ucp/webdav/webdavcontentcaps.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. diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.cxx b/ucb/source/ucp/webdav/webdavdatasupplier.cxx index 0dc4c46fc5..cfafcdbd84 100644 --- a/ucb/source/ucp/webdav/webdavdatasupplier.cxx +++ b/ucb/source/ucp/webdav/webdavdatasupplier.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,9 +41,7 @@ #include "webdavdatasupplier.hxx" #include "webdavcontent.hxx" #include "ContentProperties.hxx" -#ifndef _WEBDAV_SESSION_HXX #include "DAVSession.hxx" -#endif #include "NeonUri.hxx" using namespace com::sun::star; @@ -111,7 +110,7 @@ DataSupplier_Impl::~DataSupplier_Impl() while ( it != end ) { delete (*it); - it++; + ++it; } } @@ -164,12 +163,12 @@ rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex ) = *( m_pImpl->m_aResults[ nIndex ]->pData ); if ( ( aId.lastIndexOf( '/' ) + 1 ) != aId.getLength() ) - aId += rtl::OUString::createFromAscii( "/" ); + aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aId += props.getEscapedTitle(); if ( props.isTrailingSlash() ) - aId += rtl::OUString::createFromAscii( "/" ); + aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); m_pImpl->m_aResults[ nIndex ]->aId = aId; return aId; @@ -376,7 +375,7 @@ sal_Bool DataSupplier::getData() if ( (*it).equals( DAVProperties::RESOURCETYPE ) ) break; - it++; + ++it; } if ( it == end ) @@ -510,3 +509,4 @@ sal_Bool DataSupplier::getData() return !m_pImpl->m_bThrowException; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.hxx b/ucb/source/ucp/webdav/webdavdatasupplier.hxx index 878257e85b..8b2d9e1a20 100644 --- a/ucb/source/ucp/webdav/webdavdatasupplier.hxx +++ b/ucb/source/ucp/webdav/webdavdatasupplier.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. @@ -80,3 +81,5 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx index 4cbe267fcb..000de00c4b 100644 --- a/ucb/source/ucp/webdav/webdavprovider.cxx +++ b/ucb/source/ucp/webdav/webdavprovider.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. @@ -94,10 +95,10 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, //========================================================================= XSERVICEINFO_IMPL_1( ContentProvider, - rtl::OUString::createFromAscii( - "com.sun.star.comp.WebDAVContentProvider" ), - rtl::OUString::createFromAscii( - WEBDAV_CONTENT_PROVIDER_SERVICE_NAME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.WebDAVContentProvider" )), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + WEBDAV_CONTENT_PROVIDER_SERVICE_NAME )) ); //========================================================================= // @@ -159,8 +160,8 @@ ContentProvider::queryContent( { aURL = aURL.replaceAt( 0, WEBDAV_URL_SCHEME_LENGTH, - rtl::OUString::createFromAscii( - HTTP_URL_SCHEME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + HTTP_URL_SCHEME )) ); bNewId = true; } else if ( aScheme.equalsAsciiL( @@ -168,8 +169,8 @@ ContentProvider::queryContent( { aURL = aURL.replaceAt( 0, DAV_URL_SCHEME_LENGTH, - rtl::OUString::createFromAscii( - HTTP_URL_SCHEME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + HTTP_URL_SCHEME )) ); bNewId = true; } else if ( aScheme.equalsAsciiL( @@ -177,8 +178,8 @@ ContentProvider::queryContent( { aURL = aURL.replaceAt( 0, DAVS_URL_SCHEME_LENGTH, - rtl::OUString::createFromAscii( - HTTPS_URL_SCHEME ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + HTTPS_URL_SCHEME )) ); bNewId = true; } @@ -193,7 +194,7 @@ ContentProvider::queryContent( nPos = aURL.indexOf( '/', nPos + 1 ); if ( nPos == -1 ) { - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); bNewId = true; } } @@ -230,3 +231,4 @@ ContentProvider::queryContent( return xContent; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/webdavprovider.hxx b/ucb/source/ucp/webdav/webdavprovider.hxx index c435c2ea64..aeff294269 100644 --- a/ucb/source/ucp/webdav/webdavprovider.hxx +++ b/ucb/source/ucp/webdav/webdavprovider.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. @@ -122,3 +123,5 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/webdavresultset.cxx b/ucb/source/ucp/webdav/webdavresultset.cxx index 8234628e71..c60e55a58c 100644 --- a/ucb/source/ucp/webdav/webdavresultset.cxx +++ b/ucb/source/ucp/webdav/webdavresultset.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,9 +38,7 @@ *************************************************************************/ #include "webdavresultset.hxx" -#ifndef _WEBDAV_SESSION_HXX #include "DAVSession.hxx" -#endif using namespace com::sun::star; using namespace webdav_ucp; @@ -93,3 +92,4 @@ void DynamicResultSet::initDynamic() m_xResultSet2 = m_xResultSet1; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/webdavresultset.hxx b/ucb/source/ucp/webdav/webdavresultset.hxx index 7b084e6b5c..84d9d92d2e 100644 --- a/ucb/source/ucp/webdav/webdavresultset.hxx +++ b/ucb/source/ucp/webdav/webdavresultset.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. @@ -57,3 +58,5 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/webdavservices.cxx b/ucb/source/ucp/webdav/webdavservices.cxx index af09f8734e..a3acc8d3b1 100644 --- a/ucb/source/ucp/webdav/webdavservices.cxx +++ b/ucb/source/ucp/webdav/webdavservices.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,3 +75,4 @@ extern "C" void * SAL_CALL component_getFactory( } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/workben/cachemap/cachemapobject1.cxx b/ucb/workben/cachemap/cachemapobject1.cxx index e8223d480a..ed8bc4d38f 100644 --- a/ucb/workben/cachemap/cachemapobject1.cxx +++ b/ucb/workben/cachemap/cachemapobject1.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. @@ -88,3 +89,5 @@ rtl::Reference< Object1 > ObjectContainer1::get(rtl::OUString const & rKey) } return aIt->second; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/workben/cachemap/cachemapobject1.hxx b/ucb/workben/cachemap/cachemapobject1.hxx index 374870a532..e65033928c 100644 --- a/ucb/workben/cachemap/cachemapobject1.hxx +++ b/ucb/workben/cachemap/cachemapobject1.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. @@ -102,3 +103,5 @@ private: } } #endif // INCLUDED_UCB_CACHEMAPOBJECT1_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/workben/cachemap/cachemapobject2.hxx b/ucb/workben/cachemap/cachemapobject2.hxx index f70cef7292..55eca26a3d 100644 --- a/ucb/workben/cachemap/cachemapobject2.hxx +++ b/ucb/workben/cachemap/cachemapobject2.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. @@ -38,3 +39,5 @@ class Object2: public cppu::OWeakObject } } #endif // INCLUDED_UCB_CACHEMAPOBJECT2_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/workben/cachemap/cachemapobject3.cxx b/ucb/workben/cachemap/cachemapobject3.cxx index 5b8cd41135..a2bf08c0fb 100644 --- a/ucb/workben/cachemap/cachemapobject3.cxx +++ b/ucb/workben/cachemap/cachemapobject3.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 @@ rtl::Reference< Object3 > ObjectContainer3::get(rtl::OUString const & rKey) return aIt->second; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/workben/cachemap/cachemapobject3.hxx b/ucb/workben/cachemap/cachemapobject3.hxx index 91af9a719e..94c33849be 100644 --- a/ucb/workben/cachemap/cachemapobject3.hxx +++ b/ucb/workben/cachemap/cachemapobject3.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. @@ -101,3 +102,5 @@ private: } } #endif // INCLUDED_UCB_CACHEMAPOBJECT3_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/workben/cachemap/cachemapobjectcontainer2.cxx b/ucb/workben/cachemap/cachemapobjectcontainer2.cxx index 55a4b2deba..127306fee0 100644 --- a/ucb/workben/cachemap/cachemapobjectcontainer2.cxx +++ b/ucb/workben/cachemap/cachemapobjectcontainer2.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. @@ -66,3 +67,5 @@ rtl::Reference< Object2 > ObjectContainer2::get(rtl::OUString const & rKey) } return xElement; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/workben/cachemap/cachemapobjectcontainer2.hxx b/ucb/workben/cachemap/cachemapobjectcontainer2.hxx index a110a7adfe..5a4a78dea0 100644 --- a/ucb/workben/cachemap/cachemapobjectcontainer2.hxx +++ b/ucb/workben/cachemap/cachemapobjectcontainer2.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. @@ -71,3 +72,5 @@ private: } } #endif // INCLUDED_UCB_CACHEMAPOBJECTCONTAINER2_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/workben/cachemap/cachemaptest.cxx b/ucb/workben/cachemap/cachemaptest.cxx index ad754fbf90..76495abb7d 100644 --- a/ucb/workben/cachemap/cachemaptest.cxx +++ b/ucb/workben/cachemap/cachemaptest.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. @@ -32,9 +33,7 @@ #include "cachemapobject3.hxx" #include "cachemapobjectcontainer2.hxx" -#ifndef _SOL_TIME_H_ #include "osl/time.h" -#endif #include "rtl/ref.hxx" #include "rtl/ustring.hxx" @@ -166,3 +165,5 @@ int main() // wntmsci7.pro: Version 1: 3846 ms. // Version 2: 5598 ms. // Version 3: 2704 ms. + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/workben/ucb/srcharg.cxx b/ucb/workben/ucb/srcharg.cxx index 02d05ded3e..adee652451 100644 --- a/ucb/workben/ucb/srcharg.cxx +++ b/ucb/workben/ucb/srcharg.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,7 @@ #include #include -#ifndef CHAOS_UCBDEMO_SRCHARG_HXX #include -#endif namespace unnamed_chaos_ucbdemo_srcharg {} using namespace unnamed_chaos_ucbdemo_srcharg; @@ -488,3 +487,4 @@ bool parseSearchArgument(String const & rInput, ucb::SearchInfo & rInfo) return p == pEnd; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/workben/ucb/srcharg.hxx b/ucb/workben/ucb/srcharg.hxx index 52b26b435e..54ecf0e69c 100644 --- a/ucb/workben/ucb/srcharg.hxx +++ b/ucb/workben/ucb/srcharg.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. @@ -39,3 +40,4 @@ bool parseSearchArgument(String const & rInput, #endif // UCBDEMO_SRCHARG_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/workben/ucb/ucbdemo.cxx b/ucb/workben/ucb/ucbdemo.cxx index f90b64a09a..d1b4f5ea24 100644 --- a/ucb/workben/ucb/ucbdemo.cxx +++ b/ucb/workben/ucb/ucbdemo.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,8 +31,7 @@ #include #include -#include -#include +#include #include #include #include @@ -79,6 +79,7 @@ #include #include #include +#include using ucbhelper::getLocalFileURL; using ucbhelper::getSystemPathFromFileURL; @@ -158,7 +159,7 @@ void MessagePrinter::print( const sal_Char* pText ) //------------------------------------------------------------------------- void MessagePrinter::print( const UniString& rText ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( m_pOutEdit ) { @@ -235,7 +236,7 @@ rtl::OUString TestOutputStream::getStart() const { rtl::OUString sResult = m_sStart; if (m_bMore) - sResult += rtl::OUString::createFromAscii("..."); + sResult += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("...")); return sResult; } @@ -284,13 +285,13 @@ rtl::OUString ProgressHandler::toString(const uno::Any & rStatus) if (aStart.Text.getLength() > 0) { sResult = aStart.Text; - sResult += rtl::OUString::createFromAscii(" "); + sResult += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")); } - sResult += rtl::OUString::createFromAscii("["); + sResult += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[")); sResult += rtl::OUString::valueOf(aStart.Minimum); - sResult += rtl::OUString::createFromAscii(".."); + sResult += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("..")); sResult += rtl::OUString::valueOf(aStart.Maximum); - sResult += rtl::OUString::createFromAscii("]"); + sResult += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("]")); return sResult; } @@ -301,13 +302,13 @@ rtl::OUString ProgressHandler::toString(const uno::Any & rStatus) sal_Int32 nValue; if (rStatus >>= nValue) { - rtl::OUString sResult = rtl::OUString::createFromAscii(".."); + rtl::OUString sResult(RTL_CONSTASCII_USTRINGPARAM("..")); sResult += rtl::OUString::valueOf(nValue); - sResult += rtl::OUString::createFromAscii(".."); + sResult += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("..")); return rtl::OUString(sResult); } - return rtl::OUString::createFromAscii("(Unknown object)"); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("(Unknown object)")); } //============================================================================ @@ -327,7 +328,7 @@ ProgressHandler::queryInterface( const uno::Type & rType ) void SAL_CALL ProgressHandler::push(const uno::Any & rStatus) throw (uno::RuntimeException) { - rtl::OUString sMessage = rtl::OUString::createFromAscii("Status push: "); + rtl::OUString sMessage(RTL_CONSTASCII_USTRINGPARAM("Status push: ")); sMessage += toString(rStatus); m_rPrinter.print(sMessage); } @@ -337,7 +338,7 @@ void SAL_CALL ProgressHandler::push(const uno::Any & rStatus) void SAL_CALL ProgressHandler::update(const uno::Any & rStatus) throw (uno::RuntimeException) { - rtl::OUString sMessage = rtl::OUString::createFromAscii("Status update: "); + rtl::OUString sMessage(RTL_CONSTASCII_USTRINGPARAM("Status update: ")); sMessage += toString(rStatus); m_rPrinter.print(sMessage); } @@ -395,13 +396,13 @@ rtl::OUString Ucb::m_aProtocol; // static rtl::OUString Ucb::getUnoURL() { - rtl::OUString aUnoURL(rtl::OUString::createFromAscii( + rtl::OUString aUnoURL(RTL_CONSTASCII_USTRINGPARAM( "uno:socket,host=localhost,port=8121;")); if (m_aProtocol.getLength() == 0) - aUnoURL += rtl::OUString::createFromAscii("urp"); + aUnoURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("urp")); else aUnoURL += m_aProtocol; - aUnoURL += rtl::OUString::createFromAscii(";UCB.Factory"); + aUnoURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";UCB.Factory")); return aUnoURL; } @@ -432,27 +433,17 @@ sal_Bool Ucb::init() try { rtl::OUString aPipe; - vos::OSecurity().getUserIdent(aPipe); + osl::Security().getUserIdent(aPipe); uno::Sequence< uno::Any > aArgs(4); aArgs[0] <<= m_aConfigurationKey1; aArgs[1] <<= m_aConfigurationKey2; - aArgs[2] <<= rtl::OUString::createFromAscii("PIPE"); + aArgs[2] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PIPE")); aArgs[3] <<= aPipe; -#if 0 - m_xProv - = uno::Reference< XContentProvider >( - m_xFac-> - createInstanceWithArguments( - rtl::OUString::createFromAscii( - "com.sun.star.ucb." - "UniversalContentBroker"), - aArgs), - uno::UNO_QUERY); -#else + ::ucbhelper::ContentBroker::initialize( m_xFac, aArgs ); m_xProv = ::ucbhelper::ContentBroker::get()->getContentProviderInterface(); -#endif + } catch (uno::Exception const &) {} @@ -668,8 +659,8 @@ uno::Any UcbCommandProcessor::executeCommand( const rtl::OUString& rName, = uno::Reference< task::XInteractionHandler >( m_rUCB.getServiceFactory()-> createInstance( - rtl::OUString::createFromAscii( - "com.sun.star.task.InteractionHandler")), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.task.InteractionHandler"))), uno::UNO_QUERY); uno::Reference< ucb::XProgressHandler > xProgressHandler(new ProgressHandler(m_rUCB)); @@ -943,18 +934,18 @@ void UcbContent::open( const rtl::OUString & rName, const UniString& rInput, return; } aArgument.Properties.realloc(5); - aArgument.Properties[0].Name = rtl::OUString::createFromAscii("Title"); + aArgument.Properties[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); aArgument.Properties[0].Handle = -1; aArgument.Properties[1].Name - = rtl::OUString::createFromAscii("DateCreated"); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateCreated")); aArgument.Properties[1].Handle = -1; - aArgument.Properties[2].Name = rtl::OUString::createFromAscii("Size"); + aArgument.Properties[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")); aArgument.Properties[2].Handle = -1; aArgument.Properties[3].Name - = rtl::OUString::createFromAscii("IsFolder"); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")); aArgument.Properties[3].Handle = -1; aArgument.Properties[4].Name - = rtl::OUString::createFromAscii("IsDocument"); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")); aArgument.Properties[4].Handle = -1; aArg <<= aArgument; } @@ -967,19 +958,19 @@ void UcbContent::open( const rtl::OUString & rName, const UniString& rInput, // Property values which shall be in the result set... uno::Sequence< beans::Property > aProps( 5 ); beans::Property* pProps = aProps.getArray(); - pProps[ 0 ].Name = rtl::OUString::createFromAscii( "Title" ); + pProps[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); pProps[ 0 ].Handle = -1; // Important! /**/ pProps[ 0 ].Type = getCppuType(static_cast< rtl::OUString * >(0)); // HACK for sorting... - pProps[ 1 ].Name = rtl::OUString::createFromAscii( "DateCreated" ); + pProps[ 1 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateCreated")); pProps[ 1 ].Handle = -1; // Important! - pProps[ 2 ].Name = rtl::OUString::createFromAscii( "Size" ); + pProps[ 2 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")); pProps[ 2 ].Handle = -1; // Important! - pProps[ 3 ].Name = rtl::OUString::createFromAscii( "IsFolder" ); + pProps[ 3 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")); pProps[ 3 ].Handle = -1; // Important! /**/ pProps[ 3 ].Type = getCppuType(static_cast< sal_Bool * >(0)); // HACK for sorting... - pProps[ 4 ].Name = rtl::OUString::createFromAscii( "IsDocument" ); + pProps[ 4 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")); pProps[ 4 ].Handle = -1; // Important! aOpenArg.Properties = aProps; @@ -1031,9 +1022,9 @@ void UcbContent::open( const rtl::OUString & rName, const UniString& rInput, m_rUCB. getServiceFactory()-> createInstance( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SortedDynamic" - "ResultSetFactory")), + "ResultSetFactory"))), uno::UNO_QUERY); uno::Reference< ucb::XDynamicResultSet > xSorted; if (xSortedFactory.is()) @@ -1071,8 +1062,8 @@ void UcbContent::open( const rtl::OUString & rName, const UniString& rInput, try { xProperties-> - setPropertyValue(rtl::OUString::createFromAscii( - "FetchSize"), + setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "FetchSize")), uno::makeAny(nFetchSize)); bSet = true; } @@ -1310,47 +1301,17 @@ void UcbContent::transfer( const rtl::OUString& rSourceURL, sal_Bool bMove ) m_rUCB.getContentProvider(), uno::UNO_QUERY ); if ( xCommandProcessor.is() ) { - -#if 0 - ucb::Command aCommand( - rtl::OUString::createFromAscii( "getCommandInfo" ), -1, Any() ); - uno::Reference< ucb::XCommandInfo > xInfo; - xCommandProcessor->execute( - aCommand, 0, uno::Reference< ucb::XCommandEnvironment >() ) - >>= xInfo; - if ( xInfo.is() ) - { - ucb::CommandInfo aInfo - = xInfo->getCommandInfoByName( - rtl::OUString::createFromAscii( "globalTransfer" ) ); - - uno::Sequence< ucb::CommandInfo > aCommands - = xInfo->getCommands(); - const ucb::CommandInfo* pCommands = aCommands.getConstArray(); - - String aText( UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( "Commands:\n" ) ) ); - sal_uInt32 nCount = aCommands.getLength(); - for ( sal_uInt32 n = 0; n < nCount; ++n ) - { - aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " " ) ); - aText += String( pCommands[ n ].Name ); - aText += '\n'; - } - print( aText ); - } -#endif ucb::GlobalTransferCommandArgument aArg( bMove ? ucb::TransferCommandOperation_MOVE : ucb::TransferCommandOperation_COPY, rSourceURL, getURL(), rtl::OUString(), - //rtl::OUString::createFromAscii( "NewTitle" ), + //rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NewTitle")), ucb::NameClash::ERROR ); - ucb::Command aTransferCommand( rtl::OUString::createFromAscii( - "globalTransfer" ), + ucb::Command aTransferCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "globalTransfer" )), -1, uno::makeAny( aArg ) ); @@ -1360,8 +1321,8 @@ void UcbContent::transfer( const rtl::OUString& rSourceURL, sal_Bool bMove ) = uno::Reference< task::XInteractionHandler >( m_rUCB.getServiceFactory()-> createInstance( - rtl::OUString::createFromAscii( - "com.sun.star.task.InteractionHandler")), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.task.InteractionHandler"))), uno::UNO_QUERY); uno::Reference< ucb::XProgressHandler > xProgressHandler( new ProgressHandler(m_rUCB)); @@ -1386,9 +1347,9 @@ void UcbContent::transfer( const rtl::OUString& rSourceURL, sal_Bool bMove ) uno::Any aArg; aArg <<= ucb::TransferInfo( bMove, rSourceURL, rtl::OUString(), ucb::NameClash::ERROR ); - executeCommand( rtl::OUString::createFromAscii( "transfer" ), aArg ); + executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("transfer")), aArg ); -// executeCommand( rtl::OUString::createFromAscii( "flush" ), Any() ); +// executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("flush")), Any() ); #endif } @@ -1400,16 +1361,16 @@ void UcbContent::destroy() uno::Any aArg; aArg <<= sal_Bool( sal_True ); // delete physically, not only to trash. - executeCommand( rtl::OUString::createFromAscii( "delete" ), aArg ); + executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")), aArg ); -// executeCommand( rtl::OUString::createFromAscii( "flush" ), Any() ); +// executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("flush")), Any() ); } //------------------------------------------------------------------------- uno::Sequence< ucb::CommandInfo > UcbContent::getCommands() { uno::Any aResult = executeCommand( - rtl::OUString::createFromAscii( "getCommandInfo" ), uno::Any() ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getCommandInfo")), uno::Any() ); uno::Reference< ucb::XCommandInfo > xInfo; if ( aResult >>= xInfo ) @@ -1440,7 +1401,7 @@ uno::Sequence< ucb::CommandInfo > UcbContent::getCommands() uno::Sequence< beans::Property > UcbContent::getProperties() { uno::Any aResult = executeCommand( - rtl::OUString::createFromAscii( "getPropertySetInfo" ), uno::Any() ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertySetInfo")), uno::Any() ); uno::Reference< beans::XPropertySetInfo > xInfo; if ( aResult >>= xInfo ) @@ -1481,7 +1442,7 @@ uno::Any UcbContent::getPropertyValue( const rtl::OUString& rName ) aArg <<= aProps; uno::Any aResult = executeCommand( - rtl::OUString::createFromAscii( "getPropertyValues" ), aArg ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertyValues")), aArg ); uno::Reference< sdbc::XRow > xValues; if ( aResult >>= xValues ) @@ -1529,10 +1490,10 @@ void UcbContent::setPropertyValue( const rtl::OUString& rName, uno::Any aArg; aArg <<= aProps; - executeCommand( rtl::OUString::createFromAscii( "setPropertyValues" ), + executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("setPropertyValues")), aArg ); -// executeCommand( rtl::OUString::createFromAscii( "flush" ), Any() ); +// executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("flush")), Any() ); } //---------------------------------------------------------------------------- @@ -2139,7 +2100,7 @@ void MyWin::print( const sal_Char* pText ) //------------------------------------------------------------------------- void MyWin::print( const UniString& rText ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( m_pOutEdit ) { @@ -2160,7 +2121,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) { case MYWIN_ITEMID_CLEAR: { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; m_pOutEdit->Clear(); m_pOutEdit->Show(); @@ -2242,7 +2203,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) if ( m_pContent ) m_pContent->addStringProperty( aCmdLine, - rtl::OUString::createFromAscii( "DefaultValue" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultValue")) ); else print( "No content!" ); @@ -2268,7 +2229,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) if ( m_pContent ) m_pContent->setStringPropertyValue( aCmdLine, - rtl::OUString::createFromAscii( "NewValue" ) ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NewValue")) ); else print( "No content!" ); @@ -2276,7 +2237,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) case MYWIN_ITEMID_OPEN: if ( m_pContent ) - m_pContent->open(rtl::OUString::createFromAscii("open"), + m_pContent->open(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("open")), aCmdLine, !m_bTiming, m_bTiming, m_bSort, 0, 0, m_nFetchSize); else @@ -2295,7 +2256,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) case MYWIN_ITEMID_UPDATE: if ( m_pContent ) - m_pContent->open(rtl::OUString::createFromAscii("update"), + m_pContent->open(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("update")), aCmdLine, !m_bTiming, m_bTiming, m_bSort, 0, 0, m_nFetchSize); else @@ -2305,7 +2266,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) case MYWIN_ITEMID_SYNCHRONIZE: if ( m_pContent ) - m_pContent->open(rtl::OUString::createFromAscii("synchronize"), + m_pContent->open(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("synchronize")), aCmdLine, !m_bTiming, m_bTiming, m_bSort, 0, 0, m_nFetchSize); else @@ -2315,7 +2276,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) case MYWIN_ITEMID_SEARCH: if ( m_pContent ) - m_pContent->open(rtl::OUString::createFromAscii("search"), + m_pContent->open(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("search")), aCmdLine, !m_bTiming, m_bTiming, m_bSort, 0, 0, m_nFetchSize); else @@ -2326,7 +2287,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) case MYWIN_ITEMID_REORGANIZE: if ( m_pContent ) m_pContent->executeCommand ( - rtl::OUString::createFromAscii ("reorganizeData"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("reorganizeData")), uno::Any()); else print( "No content!" ); @@ -2441,7 +2402,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) uno::Any aArgument; if (nItemId == MYWIN_ITEMID_OFFLINE) { - aName = rtl::OUString::createFromAscii("goOffline"); + aName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("goOffline")); uno::Sequence< uno::Reference< ucb::XContentIdentifier > > @@ -2452,7 +2413,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox ) aArgument <<= aIdentifiers; } else - aName = rtl::OUString::createFromAscii("goOnline"); + aName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("goOnline")); UcbCommandProcessor(m_aUCB, xProcessor, m_pOutEdit). executeCommand(aName, aArgument); @@ -2488,9 +2449,9 @@ void MyApp::Main() // Read command line params. ////////////////////////////////////////////////////////////////////// - rtl::OUString aConfigurationKey1(rtl::OUString::createFromAscii( + rtl::OUString aConfigurationKey1(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY1_LOCAL)); - rtl::OUString aConfigurationKey2(rtl::OUString::createFromAscii( + rtl::OUString aConfigurationKey2(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY2_OFFICE)); USHORT nParams = Application::GetCommandLineParamCount(); @@ -2595,3 +2556,4 @@ void MyApp::Main() xComponent->dispose(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3