diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:47:44 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:47:44 +0200 |
commit | 941020379b1ea1ec7c564c21e68ea1674cda7683 (patch) | |
tree | 40fcaf109d6d585bcdc0faf7ea6c0812b3cc9a39 /padmin | |
parent | 0692507dcc62e94c7af88388961db1d7d12d6dbd (diff) | |
parent | 0d2916e03ea51529e15995830a1a8c36bd72e442 (diff) |
Merge branch 'master' into feature/gnumake4
Conflicts:
basebmp/prj/d.lst
basebmp/test/basictest.cxx
basebmp/test/makefile.mk
basegfx/inc/basegfx/basegfxdllapi.h
basegfx/inc/basegfx/tools/debugplotter.hxx
basegfx/inc/basegfx/tuple/b2ituple.hxx
basegfx/prj/d.lst
basegfx/source/numeric/makefile.mk
basegfx/source/polygon/makefile.mk
basegfx/source/range/makefile.mk
basegfx/source/raster/makefile.mk
basegfx/source/tuple/makefile.mk
basegfx/source/vector/makefile.mk
basegfx/test/basegfx1d.cxx
basegfx/test/makefile.mk
basegfx/util/makefile.mk
canvas/Library_canvasfactory.mk
canvas/Module_canvas.mk
canvas/prj/build.lst
canvas/prj/d.lst
canvas/source/cairo/cairo_canvashelper_texturefill.cxx
canvas/source/cairo/makefile.mk
canvas/source/tools/makefile.mk
comphelper/qa/string/makefile.mk
cppcanvas/Module_cppcanvas.mk
cppcanvas/inc/cppcanvas/cppcanvasdllapi.h
cppcanvas/prj/build.lst
cppcanvas/prj/d.lst
cppcanvas/source/mtfrenderer/makefile.mk
cppcanvas/util/makefile.mk
i18npool/source/search/makefile.mk
regexp/Library_regexp.mk
regexp/prj/d.lst
sax/CppunitTest_sax.mk
sax/Library_sax.mk
sax/prj/d.lst
sax/qa/cppunit/test_converter.cxx
sax/source/expatwrap/attrlistimpl.hxx
sax/util/makefile.mk
svtools/Library_svt.mk
tools/Executable_sspretty.mk
ucbhelper/prj/d.lst
ucbhelper/source/provider/configureucb.cxx
ucbhelper/source/provider/provconf.cxx
ucbhelper/util/makefile.mk
unotools/Library_utl.mk
unotools/Module_unotools.mk
unotools/Package_inc.mk
unotools/prj/build.lst
vcl/Library_desktop_detector.mk
vcl/Library_vcl.mk
vcl/Library_vclplug_gtk.mk
vcl/aqua/source/gdi/salprn.cxx
vcl/inc/aqua/saldata.hxx
vcl/unx/generic/gdi/salgdi3.cxx
Diffstat (limited to 'padmin')
-rw-r--r-- | padmin/Executable_spadmin.bin.mk | 8 | ||||
-rw-r--r-- | padmin/Library_spa.mk | 12 | ||||
-rw-r--r-- | padmin/source/adddlg.cxx | 35 | ||||
-rw-r--r-- | padmin/source/adddlg.hxx | 3 | ||||
-rw-r--r-- | padmin/source/cmddlg.cxx | 14 | ||||
-rw-r--r-- | padmin/source/cmddlg.hxx | 5 | ||||
-rw-r--r-- | padmin/source/desktopcontext.cxx | 6 | ||||
-rw-r--r-- | padmin/source/desktopcontext.hxx | 3 | ||||
-rw-r--r-- | padmin/source/fontentry.cxx | 136 | ||||
-rw-r--r-- | padmin/source/fontentry.hxx | 7 | ||||
-rw-r--r-- | padmin/source/helper.cxx | 22 | ||||
-rw-r--r-- | padmin/source/helper.hxx | 9 | ||||
-rw-r--r-- | padmin/source/newppdlg.cxx | 7 | ||||
-rw-r--r-- | padmin/source/newppdlg.hxx | 5 | ||||
-rw-r--r-- | padmin/source/padialog.cxx | 26 | ||||
-rw-r--r-- | padmin/source/padialog.hrc | 4 | ||||
-rw-r--r-- | padmin/source/padialog.hxx | 5 | ||||
-rw-r--r-- | padmin/source/padialog.src | 31 | ||||
-rw-r--r-- | padmin/source/pamain.cxx | 33 | ||||
-rw-r--r-- | padmin/source/progress.cxx | 6 | ||||
-rw-r--r-- | padmin/source/progress.hxx | 3 | ||||
-rw-r--r-- | padmin/source/prtsetup.cxx | 12 | ||||
-rw-r--r-- | padmin/source/prtsetup.hxx | 3 | ||||
-rw-r--r-- | padmin/source/spadmin.sh | 28 | ||||
-rw-r--r-- | padmin/source/titlectrl.cxx | 5 | ||||
-rw-r--r-- | padmin/source/titlectrl.hxx | 3 |
26 files changed, 209 insertions, 222 deletions
diff --git a/padmin/Executable_spadmin.bin.mk b/padmin/Executable_spadmin.bin.mk index e63edb21a153..eef72e115054 100644 --- a/padmin/Executable_spadmin.bin.mk +++ b/padmin/Executable_spadmin.bin.mk @@ -48,7 +48,6 @@ $(eval $(call gb_Executable_add_linked_libs,spadmin.bin,\ cppuhelper \ cppu \ sal \ - stl \ $(gb_STDLIBS) \ )) @@ -57,10 +56,15 @@ $(eval $(call gb_Executable_add_exception_objects,spadmin.bin,\ padmin/source/pamain \ )) +ifneq (,$(filter LINUX DRAGONFLY OPENBSD FREEBSD NETBSD, $(OS))) +$(eval $(call gb_Executable_add_linked_libs,spadmin.bin,\ + pthread \ +)) +endif + ifeq ($(OS),LINUX) $(eval $(call gb_Executable_add_linked_libs,spadmin.bin,\ dl \ - pthread \ )) endif diff --git a/padmin/Library_spa.mk b/padmin/Library_spa.mk index 5793f793fead..8d19fe41248f 100644 --- a/padmin/Library_spa.mk +++ b/padmin/Library_spa.mk @@ -30,7 +30,6 @@ $(eval $(call gb_Library_Library,spa)) $(eval $(call gb_Library_set_include,spa,\ $$(INCLUDE) \ -I$(OUTDIR)/inc/offuh \ - -I$(OUTDIR)/inc/stl \ )) $(eval $(call gb_Library_add_defs,spa,\ @@ -45,10 +44,8 @@ $(eval $(call gb_Library_add_linked_libs,spa,\ basegfx \ comphelper \ i18nisolang1 \ - stl \ cppu \ sal \ - vos3 \ $(gb_STDLIBS) \ )) @@ -65,12 +62,17 @@ $(eval $(call gb_Library_add_exception_objects,spa,\ padmin/source/titlectrl \ )) -ifeq ($(OS),LINUX) +ifneq (,$(filter LINUX DRAGONFLY OPENBSD FREEBSD NETBSD, $(OS))) $(eval $(call gb_Library_add_linked_libs,spa,\ - dl \ m \ pthread \ )) endif +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,spa,\ + dl \ +)) +endif + # vim: set noet sw=4 ts=4: diff --git a/padmin/source/adddlg.cxx b/padmin/source/adddlg.cxx index e3d94a05d0ef..639b871210ec 100644 --- a/padmin/source/adddlg.cxx +++ b/padmin/source/adddlg.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,14 +38,19 @@ #include "osl/thread.h" -#include <hash_set> +#include <boost/unordered_set.hpp> -using namespace rtl; using namespace psp; using namespace padmin; using namespace std; +using ::rtl::OUString; +using ::rtl::OUStringBuffer; +using ::rtl::OUStringHash; +using ::rtl::OUStringToOString; + + APTabPage::APTabPage( AddPrinterDialog* pParent, const ResId& rResId ) : TabPage( pParent, rResId ), m_aTitle( PaResId( RID_ADDP_STR_TITLE ) ), @@ -89,11 +95,11 @@ void APChooseDevicePage::fill( PrinterInfo& rInfo ) { if( m_aPDFBtn.IsChecked() ) { - rInfo.m_aFeatures = OUString::createFromAscii( "pdf=" ); + rInfo.m_aFeatures = OUString(RTL_CONSTASCII_USTRINGPARAM("pdf=")); } else if( m_aFaxBtn.IsChecked() ) { - rInfo.m_aFeatures = OUString::createFromAscii( "fax" ); + rInfo.m_aFeatures = OUString(RTL_CONSTASCII_USTRINGPARAM("fax")); } else rInfo.m_aFeatures = OUString(); @@ -693,7 +699,7 @@ void APFaxDriverPage::fill( PrinterInfo& rInfo ) { if( isDefault() ) { - rInfo.m_aDriverName = OUString::createFromAscii( "SGENPRT" ); + rInfo.m_aDriverName = OUString(RTL_CONSTASCII_USTRINGPARAM("SGENPRT")); } } @@ -726,9 +732,9 @@ bool APPdfDriverPage::check() void APPdfDriverPage::fill( PrinterInfo& rInfo ) { if( isDefault() ) - rInfo.m_aDriverName = OUString::createFromAscii( "SGENPRT" ); + rInfo.m_aDriverName = OUString(RTL_CONSTASCII_USTRINGPARAM("SGENPRT")); else if( isDist() ) - rInfo.m_aDriverName = OUString::createFromAscii( "ADISTILL" ); + rInfo.m_aDriverName = OUString(RTL_CONSTASCII_USTRINGPARAM("ADISTILL")); } //-------------------------------------------------------------------- @@ -804,10 +810,7 @@ AddPrinterDialog::~AddPrinterDialog() void AddPrinterDialog::updateSettings() { - if( ! GetSettings().GetStyleSettings().GetHighContrastMode() ) - m_aTitleImage.SetImage( Image( BitmapEx( PaResId( RID_BMP_PRINTER ) ) ) ); - else - m_aTitleImage.SetImage( Image( BitmapEx( PaResId( RID_BMP_PRINTER_HC ) ) ) ); + m_aTitleImage.SetImage( Image( BitmapEx( PaResId( RID_BMP_PRINTER ) ) ) ); } void AddPrinterDialog::DataChanged( const DataChangedEvent& rEv ) @@ -1017,13 +1020,13 @@ void AddPrinterDialog::addPrinter() } else if( m_pChooseDevicePage->isFax() ) { - aInfo.m_aFeatures = OUString::createFromAscii( "fax=" ); + aInfo.m_aFeatures = OUString(RTL_CONSTASCII_USTRINGPARAM("fax=")); if( m_pFaxNamePage->isFaxSwallow() ) - aInfo.m_aFeatures += OUString::createFromAscii( "swallow" ); + aInfo.m_aFeatures += OUString(RTL_CONSTASCII_USTRINGPARAM("swallow")); } else if( m_pChooseDevicePage->isPDF() ) { - OUString aPdf( OUString::createFromAscii( "pdf=" ) ); + OUString aPdf( RTL_CONSTASCII_USTRINGPARAM("pdf=") ); aPdf += m_pPdfCommandPage->getPdfDir(); aInfo.m_aFeatures = aPdf; } @@ -1075,7 +1078,7 @@ String AddPrinterDialog::uniquePrinterName( const String& rBase ) int nVersion = 1; list< OUString > aPrinterList; rManager.listPrinters( aPrinterList ); - hash_set< OUString, OUStringHash > aPrinters; + boost::unordered_set< OUString, OUStringHash > aPrinters; for( list< OUString >::const_iterator it = aPrinterList.begin(); it != aPrinterList.end(); ++it ) aPrinters.insert( *it ); while( aPrinters.find( aResult ) != aPrinters.end() ) @@ -1126,3 +1129,5 @@ String AddPrinterDialog::getOldPrinterLocation() aRet = String( aFileName, aEncoding ); return aRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/adddlg.hxx b/padmin/source/adddlg.hxx index 6cf545e130db..a8494d26d5d6 100644 --- a/padmin/source/adddlg.hxx +++ b/padmin/source/adddlg.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. @@ -246,3 +247,5 @@ public: } // namespace #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/cmddlg.cxx b/padmin/source/cmddlg.cxx index d1fad0189b45..be87417891f4 100644 --- a/padmin/source/cmddlg.cxx +++ b/padmin/source/cmddlg.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,18 +29,17 @@ #include <stdio.h> #include <vcl/msgbox.hxx> #include <vcl/svapp.hxx> -#ifndef _PAD_RTSETUP_HRC_ #include <rtsetup.hrc> -#endif #include <cmddlg.hxx> #include <padialog.hxx> #include <helper.hxx> #include <prtsetup.hxx> using namespace psp; -using namespace rtl; using namespace padmin; +using ::rtl::OUString; + #define PRINTER_PERSISTENCE_GROUP "KnownPrinterCommands" #define FAX_PERSISTENCE_GROUP "KnownFaxCommands" #define PDF_PERSISTENCE_GROUP "KnowPdfCommands" @@ -334,7 +334,7 @@ void RTSCommandPage::save() String aOldPdfPath; bool bOldFaxSwallow = false; bool bFaxSwallow = m_aFaxSwallowBox.IsChecked() ? true : false; - bool bOldExternalDialog = false, bExternalDialog = m_aExternalCB.IsChecked() ? true : false; + bool bExternalDialog = m_aExternalCB.IsChecked() ? true : false; while( nIndex != -1 ) { @@ -361,10 +361,6 @@ void RTSCommandPage::save() sal_Int32 nPos = 0; bOldFaxSwallow = aToken.getToken( 1, '=', nPos ).compareToAscii( "swallow", 7 ) ? false : true; } - else if( ! aToken.compareToAscii( "external_dialog" ) ) - { - bOldExternalDialog = true; - } } ::std::list< String >* pList = &m_aPrinterCommands; if( bExternalDialog ) @@ -549,3 +545,5 @@ void RTSCommandPage::ConnectCommand() m_aConnectedTo.SetText( aString ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/cmddlg.hxx b/padmin/source/cmddlg.hxx index 0b1e07dd1db7..4dd49e59e391 100644 --- a/padmin/source/cmddlg.hxx +++ b/padmin/source/cmddlg.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,9 +31,7 @@ #include <vcl/dialog.hxx> #include <tools/config.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/fixed.hxx> #include <vcl/group.hxx> #include <vcl/combobox.hxx> @@ -120,3 +119,5 @@ public: } // namespace #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/desktopcontext.cxx b/padmin/source/desktopcontext.cxx index 25db25bfaa31..c0e6c3f27dc6 100644 --- a/padmin/source/desktopcontext.cxx +++ b/padmin/source/desktopcontext.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,10 @@ #include <vcl/svapp.hxx> -using namespace rtl; using namespace com::sun::star::uno; +using ::rtl::OUString; + namespace padmin { @@ -57,3 +59,5 @@ Any SAL_CALL DesktopContext::getValueByName( const OUString& Name) throw (Runtim } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/desktopcontext.hxx b/padmin/source/desktopcontext.hxx index 13dcdd4c0105..2330019f23a5 100644 --- a/padmin/source/desktopcontext.hxx +++ b/padmin/source/desktopcontext.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 @@ namespace padmin } #endif // _PADMIN_DESKTOPCONTEXT_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/fontentry.cxx b/padmin/source/fontentry.cxx index 93ed87e221a9..ab84a548c1bc 100644 --- a/padmin/source/fontentry.cxx +++ b/padmin/source/fontentry.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. @@ -39,94 +40,13 @@ using namespace padmin; using namespace osl; -using namespace rtl; using namespace psp; -#if 0 -static void CreateAfmFile( const INetURLObject& rFontFile ) -{ - rtl_TextEncoding aEncoding = gsl_getSystemTextEncoding(); - - INetURLObject aFontMap( rFontFile.GetPath(), INET_PROT_FILE, INetURLObject::ENCODE_ALL ); - aFontMap.Append( String( RTL_CONSTASCII_USTRINGPARAM( "Fontmap" ) ) ); - INetURLObject aAfmFile( rFontFile ); - aAfmFile.setExtension( String::CreateFromAscii( "afm", 3 ) ); - - - SvFileStream aMap( aFontMap.PathToFileName(), STREAM_WRITE | STREAM_TRUNC ); - if( aMap.IsOpen() ) - { - SvFileStream aRead( rFontFile.GetFull(), STREAM_READ ); - ByteString aLine; - ByteString aFullName; - int nPos; - while( ! aRead.IsEof() && - ( nPos = aLine.Search( "/FullName" ) ) == STRING_NOTFOUND ) - aRead.ReadLine( aLine ); - aRead.Close(); - if( nPos != STRING_NOTFOUND ) - { - aLine.Erase( 0, nPos ); - aFullName = aLine.GetToken( 1, '(' ).GetToken( 0, ')' ); - - aLine = '/'; - aLine += aFullName; - aLine += ' '; - aLine += '('; - aLine += ByteString( rFontFile.GetName(), aEncoding ); - aLine += ')'; - aLine += ';'; - - aMap.WriteLine( aLine ); - } - aMap.Close(); - pid_t nPID = fork(); - if( ! nPID ) - { - INetURLObject aTmp( rFontFile ); - aTmp.CutName(); - ByteString aEnv( "GS_LIB=" ); - aEnv += ByteString( aTmp.PathToFileName(), aEncoding ); - putenv( const_cast<char*>(aEnv.GetBuffer()) ); - - int nDescr = open( ByteString( aAfmFile.PathToFileName(), aEncoding ).GetBuffer(), - O_CREAT | O_TRUNC| O_WRONLY, - 00755 ); -#if OSL_DEBUG_LEVEL > 1 - if( nDescr < 0 ) - fprintf( stderr, "open( %s ) failed because of %d\n", ByteString( aAfmFile.GetFull(), aEncoding ).GetBuffer(), errno ); -#endif - if( dup2( nDescr, STDOUT_FILENO ) > 0 ) - { - execlp( "gs", - "-q", - "-dNODISPLAY", - "--", "printafm.ps", - aFullName.GetBuffer(), - NULL ); - } -#if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "dup2( %d, %d ) failed because of %d\n", nDescr, STDOUT_FILENO, errno ); -#endif - _exit( 0 ); - } - if( nPID > 0 ) - waitpid( nPID, NULL, 0 ); - MetricConverter::ConvertAFM( aAfmFile ); - } - - struct stat aStat; - ByteString aSysFile( aAfmFile.PathToFileName(), aEncoding ); - if( stat( aSysFile.GetBuffer(), &aStat ) || ! aStat.st_size ) - unlink( aSysFile.GetBuffer() ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, " %s\n", ! access( aSysFile.GetBuffer(), F_OK ) ? "success" : "failed" ); -#endif - unlink( ByteString( aFontMap.PathToFileName(), aEncoding ).GetBuffer() ); -} - -#endif +using ::rtl::OUString; +using ::rtl::OUStringHash; +using ::rtl::OUStringToOString; +using ::rtl::OString; +using ::rtl::OStringHash; FontNameDlg::FontNameDlg( Window *pParent ) : ModalDialog( pParent, PaResId( RID_FONTNAMEDIALOG ) ), @@ -187,35 +107,35 @@ String FontNameDlg::fillFontEntry( FastPrintFontInfo& rInfo, const String& rFile bool bWeight = true, bItalic = true, bWidth = true; switch( rInfo.m_eWeight ) { - case weight::Thin: aEntry.AppendAscii( ", " ); aEntry.Append( aThinTxt ); break; - case weight::UltraLight: aEntry.AppendAscii( ", " ); aEntry.Append( aUltraLightTxt ); break; - case weight::Light: aEntry.AppendAscii( ", " ); aEntry.Append( aLightTxt ); break; - case weight::SemiLight: aEntry.AppendAscii( ", " ); aEntry.Append( aSemiLightTxt ); break; - case weight::SemiBold: aEntry.AppendAscii( ", " ); aEntry.Append( aSemiBoldTxt ); break; - case weight::Bold: aEntry.AppendAscii( ", " ); aEntry.Append( aBoldTxt ); break; - case weight::UltraBold: aEntry.AppendAscii( ", " ); aEntry.Append( aUltraBoldTxt ); break; + case WEIGHT_THIN: aEntry.AppendAscii( ", " ); aEntry.Append( aThinTxt ); break; + case WEIGHT_ULTRALIGHT: aEntry.AppendAscii( ", " ); aEntry.Append( aUltraLightTxt ); break; + case WEIGHT_LIGHT: aEntry.AppendAscii( ", " ); aEntry.Append( aLightTxt ); break; + case WEIGHT_SEMILIGHT: aEntry.AppendAscii( ", " ); aEntry.Append( aSemiLightTxt ); break; + case WEIGHT_SEMIBOLD: aEntry.AppendAscii( ", " ); aEntry.Append( aSemiBoldTxt ); break; + case WEIGHT_BOLD: aEntry.AppendAscii( ", " ); aEntry.Append( aBoldTxt ); break; + case WEIGHT_ULTRABOLD: aEntry.AppendAscii( ", " ); aEntry.Append( aUltraBoldTxt ); break; default: bWeight = false; break; } switch( rInfo.m_eItalic ) { - case italic::Oblique: aEntry.AppendAscii( ", " ); aEntry.Append( aObliqueTxt ); break; - case italic::Italic: aEntry.AppendAscii( ", " ); aEntry.Append( aItalicTxt ); break; + case ITALIC_OBLIQUE: aEntry.AppendAscii( ", " ); aEntry.Append( aObliqueTxt ); break; + case ITALIC_NORMAL: aEntry.AppendAscii( ", " ); aEntry.Append( aItalicTxt ); break; default: bItalic = false; break; } switch( rInfo.m_eWidth ) { - case width::UltraCondensed: aEntry.AppendAscii( ", " ); aEntry.Append( aUltraCondensedTxt ); break; - case width::ExtraCondensed: aEntry.AppendAscii( ", " ); aEntry.Append( aExtraCondensedTxt ); break; - case width::Condensed: aEntry.AppendAscii( ", " ); aEntry.Append( aCondensedTxt ); break; - case width::SemiCondensed: aEntry.AppendAscii( ", " ); aEntry.Append( aSemiCondensedTxt ); break; - case width::SemiExpanded: aEntry.AppendAscii( ", " ); aEntry.Append( aSemiExpandedTxt ); break; - case width::Expanded: aEntry.AppendAscii( ", " ); aEntry.Append( aExpandedTxt ); break; - case width::ExtraExpanded: aEntry.AppendAscii( ", " ); aEntry.Append( aExtraExpandedTxt ); break; - case width::UltraExpanded: aEntry.AppendAscii( ", " ); aEntry.Append( aUltraExpandedTxt ); break; + case WIDTH_ULTRA_CONDENSED: aEntry.AppendAscii( ", " ); aEntry.Append( aUltraCondensedTxt ); break; + case WIDTH_EXTRA_CONDENSED: aEntry.AppendAscii( ", " ); aEntry.Append( aExtraCondensedTxt ); break; + case WIDTH_CONDENSED: aEntry.AppendAscii( ", " ); aEntry.Append( aCondensedTxt ); break; + case WIDTH_SEMI_CONDENSED: aEntry.AppendAscii( ", " ); aEntry.Append( aSemiCondensedTxt ); break; + case WIDTH_SEMI_EXPANDED: aEntry.AppendAscii( ", " ); aEntry.Append( aSemiExpandedTxt ); break; + case WIDTH_EXPANDED: aEntry.AppendAscii( ", " ); aEntry.Append( aExpandedTxt ); break; + case WIDTH_EXTRA_EXPANDED: aEntry.AppendAscii( ", " ); aEntry.Append( aExtraExpandedTxt ); break; + case WIDTH_ULTRA_EXPANDED: aEntry.AppendAscii( ", " ); aEntry.Append( aUltraExpandedTxt ); break; default: bWidth = false; break; @@ -259,7 +179,7 @@ void FontNameDlg::init() m_aRemoveButton.Enable( sal_False ); m_aRenameButton.Enable( sal_False ); - ::std::hash_map< OUString, int, OUStringHash > aFamilies; + ::boost::unordered_map< OUString, int, OUStringHash > aFamilies; ::std::list< fontID >::iterator font_it; for( font_it = aFonts.begin(); font_it != aFonts.end(); ++font_it ) { @@ -301,7 +221,7 @@ void FontNameDlg::init() else aEntry = fillFontEntry( aInfo, String( ByteString( aFile ), osl_getThreadTextEncoding() ), aFamilies[ aInfo.m_aFamilyName ] > 1 ); sal_uInt16 nEntry = m_aFontBox.InsertEntry( aEntry ); - m_aFontBox.SetEntryData( nEntry, (void*)(*font_it) ); + m_aFontBox.SetEntryData( nEntry, (void*)(sal_IntPtr)(*font_it) ); } } } @@ -576,8 +496,8 @@ void FontImportDialog::fillFontBox() rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); m_aNewFontsBox.Clear(); - ::std::hash_map< OUString, int, OUStringHash > aFamilies; - ::std::hash_map< OString, ::std::list< FastPrintFontInfo >, OStringHash >::iterator it; + ::boost::unordered_map< OUString, int, OUStringHash > aFamilies; + ::boost::unordered_map< OString, ::std::list< FastPrintFontInfo >, OStringHash >::iterator it; for( it = m_aNewFonts.begin(); it != m_aNewFonts.end(); ++it ) { const OUString& rFamily( it->second.front().m_aFamilyName ); @@ -666,3 +586,5 @@ IMPL_LINK( FontImportDialog, ToggleHdl, CheckBox*, pBox ) return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/fontentry.hxx b/padmin/source/fontentry.hxx index c9585564be9f..262134ac8eb4 100644 --- a/padmin/source/fontentry.hxx +++ b/padmin/source/fontentry.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,7 +74,7 @@ namespace padmin { String m_aNoWritableFontsDirText; String m_aFontsImportedText; - ::std::hash_map< ::rtl::OString, ::std::list< ::psp::FastPrintFontInfo >, ::rtl::OStringHash > + ::boost::unordered_map< ::rtl::OString, ::std::list< ::psp::FastPrintFontInfo >, ::rtl::OStringHash > m_aNewFonts; Timer m_aRefreshTimer; @@ -118,7 +119,7 @@ namespace padmin { ::psp::PrintFontManager& m_rFontManager; // maps fontID to XLFD - ::std::hash_map< ::psp::fontID, String > + ::boost::unordered_map< ::psp::fontID, String > m_aFonts; void init(); public: @@ -135,3 +136,5 @@ namespace padmin { } // namespace #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/helper.cxx b/padmin/source/helper.cxx index cab3bc9bde71..0a1cee5e557f 100644 --- a/padmin/source/helper.cxx +++ b/padmin/source/helper.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,9 +28,7 @@ #include <unistd.h> #include <helper.hxx> -#ifndef _PAD_PADIALOG_HRC_ #include <padialog.hrc> -#endif #include <osl/file.hxx> #include <tools/urlobj.hxx> #include <vcl/svapp.hxx> @@ -48,12 +47,14 @@ using namespace osl; -using namespace rtl; using namespace padmin; using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::ui::dialogs; +using ::rtl::OUString; +using ::rtl::OUStringBuffer; + #define MAX_PATH 1024 /* @@ -66,21 +67,17 @@ ResId padmin::PaResId( sal_uInt32 nId ) if( ! pPaResMgr ) { ::com::sun::star::lang::Locale aLocale; -// LanguageType nLang = LANGUAGE_SYSTEM; utl::OConfigurationNode aNode = utl::OConfigurationTreeRoot::tryCreateWithServiceFactory( vcl::unohelper::GetMultiServiceFactory(), - OUString::createFromAscii( "org.openoffice.Setup/L10N" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup/L10N")) ); if ( aNode.isValid() ) { rtl::OUString aLoc; - Any aValue = aNode.getNodeValue( OUString::createFromAscii( "ooLocale" ) ); + Any aValue = aNode.getNodeValue( OUString(RTL_CONSTASCII_USTRINGPARAM("ooLocale")) ); if( aValue >>= aLoc ) { -// LanguageType nTmpLang = MsLangId::convertIsoStringToLanguage( aLoc ); -// if( nTmpLang != LANGUAGE_DONTKNOW ) -// nLang = nTmpLang; sal_Int32 nIndex = 0; aLocale.Language = aLoc.getToken( 0, '-', nIndex ); aLocale.Country = aLoc.getToken( 0, '-', nIndex ); @@ -89,7 +86,6 @@ ResId padmin::PaResId( sal_uInt32 nId ) } pPaResMgr = ResMgr::SearchCreateResMgr( "spa", aLocale ); AllSettings aSettings = Application::GetSettings(); -// aSettings.SetUILanguage( nLang ); aSettings.SetUILocale( aLocale ); Application::SetSettings( aSettings ); } @@ -112,8 +108,8 @@ void padmin::FindFiles( const String& rDirectory, ::std::list< String >& rResult DirectoryItem aItem; while( aDir.getNextItem( aItem ) == FileBase::E_None ) { - FileStatus aStatus( FileStatusMask_FileName | - FileStatusMask_Type + FileStatus aStatus( osl_FileStatus_Mask_FileName | + osl_FileStatus_Mask_Type ); if( aItem.getFileStatus( aStatus ) == FileBase::E_None ) { @@ -325,3 +321,5 @@ bool padmin::chooseDirectory( String& rInOutPath ) } return bRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/helper.hxx b/padmin/source/helper.hxx index 5b7b710679a8..14cee58531bd 100644 --- a/padmin/source/helper.hxx +++ b/padmin/source/helper.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. @@ -32,18 +33,12 @@ #include <list> #endif #include <tools/string.hxx> -#ifndef _RESID_HXX #include <tools/resid.hxx> -#endif #include <vcl/dialog.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/edit.hxx> #include <vcl/fixed.hxx> -#ifndef _SV_LISTBOX_HXX #include <vcl/lstbox.hxx> -#endif #include <vcl/combobox.hxx> #if defined SPA_DLLIMPLEMENTATION @@ -131,3 +126,5 @@ bool chooseDirectory( String& rInOutPath ); } // namespace padmin #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/newppdlg.cxx b/padmin/source/newppdlg.cxx index 636e2d7435ea..6382ae1359dd 100644 --- a/padmin/source/newppdlg.cxx +++ b/padmin/source/newppdlg.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,7 +51,9 @@ using namespace padmin; using namespace psp; using namespace osl; -using namespace rtl; + +using ::rtl::OUString; +using ::rtl::OUStringToOString; PPDImportDialog::PPDImportDialog( Window* pParent ) : ModalDialog( pParent, PaResId( RID_PPDIMPORT_DLG ) ), @@ -224,3 +227,5 @@ IMPL_LINK( PPDImportDialog, ModifyHdl, ComboBox*, pListBox ) } return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/newppdlg.hxx b/padmin/source/newppdlg.hxx index 5b4aa9f755eb..576a1bf2cb43 100644 --- a/padmin/source/newppdlg.hxx +++ b/padmin/source/newppdlg.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,9 +30,7 @@ #define _PAD_NEWPPDLG_HXX_ #include <vcl/dialog.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/combobox.hxx> #include <vcl/lstbox.hxx> #include <vcl/fixed.hxx> @@ -74,3 +73,5 @@ namespace padmin { } // namespace #endif // _NEWPPDLG_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/padialog.cxx b/padmin/source/padialog.cxx index bd81fe5d002b..67b84a41716d 100644 --- a/padmin/source/padialog.cxx +++ b/padmin/source/padialog.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. @@ -53,6 +54,7 @@ #include "osl/file.hxx" #include "rtl/ustrbuf.hxx" +#include <sal/macros.h> #include "unotools/localedatawrapper.hxx" #include "unotools/configitem.hxx" @@ -61,13 +63,15 @@ #include "com/sun/star/awt/Size.hpp" using namespace psp; -using namespace rtl; using namespace padmin; using namespace osl; using namespace com::sun::star; using namespace com::sun::star::uno; using namespace com::sun::star::beans; +using ::rtl::OUString; +using ::rtl::OUStringBuffer; + PADialog* PADialog::Create( Window* pParent, sal_Bool bAdmin ) { return new PADialog( pParent, bAdmin ); @@ -107,18 +111,9 @@ PADialog::PADialog( Window* pParent, sal_Bool /*bAdmin*/ ) : void PADialog::updateSettings() { - if( ! GetSettings().GetStyleSettings().GetHighContrastMode() ) - { - m_aPrinterImg = Image( BitmapEx( PaResId( RID_BMP_SMALL_PRINTER ) ) ); - m_aFaxImg = Image( BitmapEx( PaResId( RID_BMP_SMALL_FAX ) ) ); - m_aPdfImg = Image( BitmapEx( PaResId( RID_BMP_SMALL_PDF ) ) ); - } - else - { - m_aPrinterImg = Image( BitmapEx( PaResId( RID_BMP_SMALL_PRINTER_HC ) ) ); - m_aFaxImg = Image( BitmapEx( PaResId( RID_BMP_SMALL_FAX_HC ) ) ); - m_aPdfImg = Image( BitmapEx( PaResId( RID_BMP_SMALL_PDF_HC ) ) ); - } + m_aPrinterImg = Image( BitmapEx( PaResId( RID_BMP_SMALL_PRINTER ) ) ); + m_aFaxImg = Image( BitmapEx( PaResId( RID_BMP_SMALL_FAX ) ) ); + m_aPdfImg = Image( BitmapEx( PaResId( RID_BMP_SMALL_PDF ) ) ); } void PADialog::Init() @@ -468,7 +463,7 @@ void SpaPrinterController::printPage( int ) const { NULL, RID_TXT_TESTPAGE_TIME } }; - for( unsigned int i = 0; i < sizeof(aResIds)/sizeof(aResIds[0]); i++ ) + for( unsigned int i = 0; i < SAL_N_ELEMENTS(aResIds); i++ ) { if( aResIds[i].pDirect ) aToken = String::CreateFromAscii( aResIds[i].pDirect ); @@ -758,7 +753,7 @@ void PADialog::UpdateDevice() bFax ? m_aFaxImg : bPdf ? m_aPdfImg : m_aPrinterImg ); - m_aDevicesLB.SetEntryData( nPos, (void*)it->getLength() ); + m_aDevicesLB.SetEntryData( nPos, (void*)(sal_IntPtr)it->getLength() ); if( *it == m_rPIManager.getDefaultPrinter() ) { m_aDevicesLB.SelectEntryPos( nPos ); @@ -767,3 +762,4 @@ void PADialog::UpdateDevice() } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/padialog.hrc b/padmin/source/padialog.hrc index 2f238592231a..69e12428ddab 100644 --- a/padmin/source/padialog.hrc +++ b/padmin/source/padialog.hrc @@ -190,13 +190,9 @@ #define RID_TXT_FONT_REGULAR 1095 #define RID_BMP_SMALL_PRINTER 1096 -#define RID_BMP_SMALL_PRINTER_HC 1097 #define RID_BMP_SMALL_FAX 1098 -#define RID_BMP_SMALL_FAX_HC 1099 #define RID_BMP_SMALL_PDF 1100 -#define RID_BMP_SMALL_PDF_HC 1101 #define RID_BMP_PRINTER 1102 -#define RID_BMP_PRINTER_HC 1103 #define RID_AFMERROR_OK 1300 #define RID_AFMERROR_NO_FONT_NAME 1301 diff --git a/padmin/source/padialog.hxx b/padmin/source/padialog.hxx index a0cee7b2af7d..42f034b781b5 100644 --- a/padmin/source/padialog.hxx +++ b/padmin/source/padialog.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,9 +37,7 @@ #include <vcl/dialog.hxx> #include <tools/config.hxx> #include <vcl/lstbox.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/fixed.hxx> #include <vcl/group.hxx> #include <vcl/edit.hxx> @@ -118,3 +117,5 @@ namespace padmin { } // namespace #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/padialog.src b/padmin/source/padialog.src index 85191f3dddf9..b3b46f5131f7 100644 --- a/padmin/source/padialog.src +++ b/padmin/source/padialog.src @@ -467,10 +467,12 @@ ModalDialog RID_FONTNAMEDIALOG }; Text [ en-US ] = "Fonts"; }; + String RID_BXT_TESTPAGE { Text [ en-US ] = "Test page"; }; + String RID_BXT_ENVIRONMENT { Text [ en-US ] = "Wrong environment"; @@ -506,59 +508,46 @@ Bitmap RID_BMP_PRINTER File = "source/printer_large.png"; }; -Bitmap RID_BMP_SMALL_PRINTER_HC -{ - File = "source/printer_16_h.png"; -}; - -Bitmap RID_BMP_SMALL_FAX_HC -{ - File = "source/fax_16_h.png"; -}; - -Bitmap RID_BMP_SMALL_PDF_HC -{ - File = "source/printpdf_16_h.png"; -}; - -Bitmap RID_BMP_PRINTER_HC -{ - File = "source/printer_40x48_h.png"; -}; - - String RID_AFMERROR_OK { Text [ en-US ] = "No error"; }; + String RID_AFMERROR_NO_FONT_NAME { Text [ en-US ] = "The metric does not contain a 'FontName' entry."; }; + String RID_AFMERROR_NO_FULL_NAME { Text [ en-US ] = "The metric does not contain a 'FullName' entry."; }; + String RID_AFMERROR_NO_FAMILY_NAME { Text [ en-US ] = "The metric does not contain a 'FamilyName' entry."; }; + String RID_AFMERROR_MOVETO_FAILED { Text [ en-US ] = "The converted metric could not be written."; }; + String RID_AFMERROR_STREAM_READ_FAILED { Text [ en-US ] = "The metric could not be read."; }; + String RID_AFMERROR_STREAM_WRITE_FAILED { Text [ en-US ] = "A temporary file could not be created."; }; + STRING RID_AFMERROR_NOT_A_METRIC { Text [ en-US ] = "The file does not contain a metric."; }; + String RID_AFMERROR_BOX_TXT { Text [ en-US ] = "The metric\n\n%s\n\ncould not be converted for the following reason:\n\n"; diff --git a/padmin/source/pamain.cxx b/padmin/source/pamain.cxx index a780dddd915f..63c46fd3160b 100644 --- a/padmin/source/pamain.cxx +++ b/padmin/source/pamain.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,20 +46,22 @@ #include "unotools/configmgr.hxx" #include "com/sun/star/lang/XMultiServiceFactory.hpp" +#include "com/sun/star/lang/XComponent.hpp" using namespace padmin; -using namespace rtl; using namespace cppu; using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace comphelper; +using ::rtl::OUString; + // ----------------------------------------------------------------------- class MyApp : public Application { public: - void Main(); + int Main(); virtual sal_uInt16 Exception( sal_uInt16 nError ); static void ReadStringHook( String& ); @@ -93,7 +96,7 @@ sal_uInt16 MyApp::Exception( sal_uInt16 nError ) return 0; } -void MyApp::Main() +int MyApp::Main() { PADialog* pPADialog; @@ -102,10 +105,11 @@ void MyApp::Main() //------------------------------------------------- // create the global service-manager //------------------------------------------------- + Reference< XComponentContext > xCtx; Reference< XMultiServiceFactory > xFactory; try { - Reference< XComponentContext > xCtx = defaultBootstrap_InitialComponentContext(); + xCtx = defaultBootstrap_InitialComponentContext(); xFactory = Reference< XMultiServiceFactory >( xCtx->getServiceManager(), UNO_QUERY ); if( xFactory.is() ) setProcessServiceFactory( xFactory ); @@ -128,8 +132,8 @@ void MyApp::Main() * Create UCB. */ Sequence< Any > aArgs( 2 ); - aArgs[ 0 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL ); - aArgs[ 1 ] <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY2_OFFICE ); + aArgs[ 0 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY1_LOCAL )); + aArgs[ 1 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY2_OFFICE )); #if OSL_DEBUG_LEVEL > 1 sal_Bool bSuccess = #endif @@ -152,7 +156,7 @@ void MyApp::Main() sal_Bool bQuitApp; if( !InitAccessBridge( true, bQuitApp ) ) if( bQuitApp ) - return; + return EXIT_FAILURE; } // initialize test-tool library (if available) @@ -173,4 +177,19 @@ void MyApp::Main() */ ::ucbhelper::ContentBroker::deinitialize(); + /* + * clean up UNO + */ + try + { + Reference<XComponent> xComp(xCtx, UNO_QUERY_THROW); + xComp->dispose(); + } + catch(...) + { + } + + return EXIT_SUCCESS; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/progress.cxx b/padmin/source/progress.cxx index 9a7cf537a842..86055578ace3 100644 --- a/padmin/source/progress.cxx +++ b/padmin/source/progress.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,14 +30,11 @@ #include <stdio.h> #include <tools/string.hxx> #include <tools/stream.hxx> -#include <tools/list.hxx> #include <vcl/msgbox.hxx> #include <vcl/svapp.hxx> #include <progress.hxx> #include <helper.hxx> -#ifndef _PAD_PADIALOG_HRC_ #include <padialog.hrc> -#endif using namespace padmin; @@ -101,3 +99,5 @@ IMPL_LINK( ProgressDialog, ClickBtnHdl, Button*, pButton ) } return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/progress.hxx b/padmin/source/progress.hxx index f249732549c6..06394a5a1c45 100644 --- a/padmin/source/progress.hxx +++ b/padmin/source/progress.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 @@ namespace padmin { } // namespace #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/prtsetup.cxx b/padmin/source/prtsetup.cxx index ad73d48ae48b..201f0875adc2 100644 --- a/padmin/source/prtsetup.cxx +++ b/padmin/source/prtsetup.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,10 +38,13 @@ #define LSCAPE_STRING String( RTL_CONSTASCII_USTRINGPARAM( "Landscape" ) ) #define PORTRAIT_STRING String( RTL_CONSTASCII_USTRINGPARAM( "Portrait" ) ) -using namespace rtl; using namespace psp; using namespace padmin; +using ::rtl::OUString; +using ::rtl::OUStringHash; +using ::rtl::OString; + void RTSDialog::insertAllPPDValues( ListBox& rBox, const PPDParser* pParser, const PPDKey* pKey ) { if( ! pKey || ! pParser ) @@ -636,7 +640,7 @@ RTSFontSubstPage::RTSFontSubstPage( RTSDialog* pParent ) : ::std::list< FastPrintFontInfo > aFonts; rFontManager.getFontListWithFastInfo( aFonts, m_pParent->m_aJobData.m_pParser, false ); ::std::list< FastPrintFontInfo >::const_iterator it; - ::std::hash_map< OUString, int, OUStringHash > aToMap, aFromMap; + ::boost::unordered_map< OUString, int, OUStringHash > aToMap, aFromMap; for( it = aFonts.begin(); it != aFonts.end(); ++it ) { if( it->m_eType == fonttype::Builtin ) @@ -688,7 +692,7 @@ void RTSFontSubstPage::update() m_aSubstitutionsBox.Clear(); m_aRemoveButton.Enable( sal_False ); // fill substitutions box - ::std::hash_map< OUString, OUString, OUStringHash >::const_iterator it; + ::boost::unordered_map< OUString, OUString, OUStringHash >::const_iterator it; for( it = m_pParent->m_aJobData.m_aFontSubstitutes.begin(); it != m_pParent->m_aJobData.m_aFontSubstitutes.end(); ++it ) { @@ -838,3 +842,5 @@ extern "C" { } } // extern "C" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/prtsetup.hxx b/padmin/source/prtsetup.hxx index 02a9325726fc..b6de919cee04 100644 --- a/padmin/source/prtsetup.hxx +++ b/padmin/source/prtsetup.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. @@ -212,3 +213,5 @@ public: } // namespace #endif // _PAD_PRTSETUP_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/spadmin.sh b/padmin/source/spadmin.sh index c831ab7f0919..55a2a89c3d3d 100644 --- a/padmin/source/spadmin.sh +++ b/padmin/source/spadmin.sh @@ -43,6 +43,21 @@ fi sd_prog=`pwd` cd "$sd_cwd" +case "`uname -s`" in + FreeBSD) + sd_prog1="$sd_prog/../basis-link/program" + sd_prog2="$sd_prog/../basis-link/ure-link/lib" + LD_LIBRARY_PATH=$sd_prog1:$sd_prog2${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} + export LD_LIBRARY_PATH + ;; + AIX) + sd_prog1="$sd_prog/../basis-link/program" + sd_prog2="$sd_prog/../basis-link/ure-link/lib" + LIBPATH=$sd_prog1:$sd_prog2${LIBPATH:+:$LIBPATH} + export LIBPATH + ;; +esac + #collect all bootstrap variables specified on the command line #so that they can be passed as arguments to javaldx later on for arg in $@ @@ -57,8 +72,17 @@ if [ -x "$sd_prog/../basis-link/ure-link/bin/javaldx" ] ; then my_path=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS \ "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"` if [ -n "$my_path" ] ; then - LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} - export LD_LIBRARY_PATH + sd_platform=`uname -s` + case $sd_platform in + AIX) + LIBPATH=$my_path${LIBPATH:+:$LIBPATH} + export LIBPATH + ;; + *) + LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} + export LD_LIBRARY_PATH + ;; + esac fi fi diff --git a/padmin/source/titlectrl.cxx b/padmin/source/titlectrl.cxx index 450780dce1e3..1b67939099aa 100644 --- a/padmin/source/titlectrl.cxx +++ b/padmin/source/titlectrl.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. @@ -25,9 +26,7 @@ * ************************************************************************/ -#ifndef _PAD_NEWPPDLG_HXX_ #include <titlectrl.hxx> -#endif using namespace padmin; @@ -100,3 +99,5 @@ void TitleImage::SetBackgroundColor( const Color& rColor ) m_aBGColor = rColor; Invalidate(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/titlectrl.hxx b/padmin/source/titlectrl.hxx index 75c8d3eeeceb..df5a70bb07c9 100644 --- a/padmin/source/titlectrl.hxx +++ b/padmin/source/titlectrl.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 // _PAD_TITLECTRL_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |