diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-06 09:46:57 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-06 16:45:13 +0000 |
commit | c7258cfccdf9f4c5235da1b135801f957a5b0ec1 (patch) | |
tree | d5af5085ad1327afe2d41045ea452e017fea1fb6 /vcl | |
parent | 027c383584bff4ea2aa7aa2b9e294e614087f28f (diff) |
shared_ptr<T>(new T(args)) -> make_shared<T>(args)
and boost:make_shared->std::make_shared
Change-Id: Ic1e187c52c856a7b27817967b2caa8920f23a98d
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/glyphs/gcach_ftyp.cxx | 22 | ||||
-rw-r--r-- | vcl/generic/print/genprnpsp.cxx | 18 | ||||
-rw-r--r-- | vcl/inc/generic/glyphcache.hxx | 10 | ||||
-rw-r--r-- | vcl/inc/impimagetree.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/pch/precompiled_vcl.hxx | 1 | ||||
-rw-r--r-- | vcl/inc/printdlg.hxx | 6 | ||||
-rw-r--r-- | vcl/inc/window.h | 4 | ||||
-rw-r--r-- | vcl/source/app/IconThemeScanner.cxx | 4 | ||||
-rw-r--r-- | vcl/source/app/settings.cxx | 985 | ||||
-rw-r--r-- | vcl/source/gdi/impimagetree.cxx | 16 | ||||
-rw-r--r-- | vcl/source/gdi/oldprintadaptor.cxx | 16 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 321 | ||||
-rw-r--r-- | vcl/source/outdev/nativecontrols.cxx | 8 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/printdlg.cxx | 10 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/cairotextrender.cxx | 4 |
17 files changed, 709 insertions, 724 deletions
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx index 635abb30a671..16f123f81595 100644 --- a/vcl/generic/glyphs/gcach_ftyp.cxx +++ b/vcl/generic/glyphs/gcach_ftyp.cxx @@ -93,7 +93,7 @@ static FT_Library aLibFT = 0; // enable linking with old FT versions static int nFTVERSION = 0; -typedef std::unordered_map<const char*, boost::shared_ptr<FtFontFile>, rtl::CStringHash, rtl::CStringEqual> FontFileList; +typedef std::unordered_map<const char*, std::shared_ptr<FtFontFile>, rtl::CStringHash, rtl::CStringEqual> FontFileList; namespace { struct vclFontFileList : public rtl::Static< FontFileList, vclFontFileList > {}; } @@ -558,14 +558,14 @@ ServerFont::ServerFont( const FontSelectPattern& rFSD, FtFontInfo* pFI ) mnLoadFlags |= FT_LOAD_NO_BITMAP; } -void ServerFont::SetFontOptions( boost::shared_ptr<ImplFontOptions> pFontOptions) +void ServerFont::SetFontOptions(std::shared_ptr<ImplFontOptions> xFontOptions) { - mpFontOptions = pFontOptions; + mxFontOptions = xFontOptions; - if (!mpFontOptions) + if (!mxFontOptions) return; - FontAutoHint eHint = mpFontOptions->GetUseAutoHint(); + FontAutoHint eHint = mxFontOptions->GetUseAutoHint(); if( eHint == AUTOHINT_DONTKNOW ) eHint = mbUseGamma ? AUTOHINT_TRUE : AUTOHINT_FALSE; @@ -576,11 +576,11 @@ void ServerFont::SetFontOptions( boost::shared_ptr<ImplFontOptions> pFontOptions mnLoadFlags |= FT_LOAD_NO_HINTING; mnLoadFlags |= FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH; //#88334# - if( mpFontOptions->DontUseAntiAlias() ) + if (mxFontOptions->DontUseAntiAlias()) mnPrioAntiAlias = 0; - if( mpFontOptions->DontUseEmbeddedBitmaps() ) + if (mxFontOptions->DontUseEmbeddedBitmaps()) mnPrioEmbedded = 0; - if( mpFontOptions->DontUseHinting() ) + if (mxFontOptions->DontUseHinting()) mnPrioAutoHint = 0; if( mnPrioAutoHint <= 0 ) @@ -590,7 +590,7 @@ void ServerFont::SetFontOptions( boost::shared_ptr<ImplFontOptions> pFontOptions if( !(mnLoadFlags & FT_LOAD_NO_HINTING) ) { mnLoadFlags |= FT_LOAD_TARGET_NORMAL; - switch( mpFontOptions->GetHintStyle() ) + switch (mxFontOptions->GetHintStyle()) { case HINT_NONE: mnLoadFlags |= FT_LOAD_NO_HINTING; @@ -611,9 +611,9 @@ void ServerFont::SetFontOptions( boost::shared_ptr<ImplFontOptions> pFontOptions mnLoadFlags |= FT_LOAD_NO_BITMAP; } -boost::shared_ptr<ImplFontOptions> ServerFont::GetFontOptions() const +std::shared_ptr<ImplFontOptions> ServerFont::GetFontOptions() const { - return mpFontOptions; + return mxFontOptions; } const OString& ServerFont::GetFontFileName() const diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx index 02d2ab9ab596..02de54681adc 100644 --- a/vcl/generic/print/genprnpsp.cxx +++ b/vcl/generic/print/genprnpsp.cxx @@ -1070,14 +1070,14 @@ bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJo boost::shared_ptr<vcl::PDFWriter> pWriter; std::vector< PDFPrintFile > aPDFFiles; - boost::shared_ptr<Printer> pPrinter( i_rController.getPrinter() ); + std::shared_ptr<Printer> xPrinter(i_rController.getPrinter()); int nAllPages = i_rController.getFilteredPageCount(); i_rController.createProgressDialog(); bool bAborted = false; PDFNewJobParameters aLastParm; - aContext.DPIx = pPrinter->GetDPIX(); - aContext.DPIy = pPrinter->GetDPIY(); + aContext.DPIx = xPrinter->GetDPIX(); + aContext.DPIy = xPrinter->GetDPIY(); for( int nPage = 0; nPage < nAllPages && ! bAborted; nPage++ ) { if( nPage == nAllPages-1 ) @@ -1098,9 +1098,9 @@ bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJo } else { - pPrinter->SetMapMode( MapMode( MAP_100TH_MM ) ); - pPrinter->SetPaperSizeUser( aPageSize.aSize, true ); - PDFNewJobParameters aNewParm( pPrinter->GetPaperSize(), pPrinter->GetPaperBin() ); + xPrinter->SetMapMode( MapMode( MAP_100TH_MM ) ); + xPrinter->SetPaperSizeUser( aPageSize.aSize, true ); + PDFNewJobParameters aNewParm(xPrinter->GetPaperSize(), xPrinter->GetPaperBin()); // create PDF writer on demand // either on first page @@ -1162,7 +1162,7 @@ bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJo { if( bCollate ) { - if( aPDFFiles.size() == 1 && pPrinter->HasSupport( SUPPORT_COLLATECOPY ) ) + if (aPDFFiles.size() == 1 && xPrinter->HasSupport(SUPPORT_COLLATECOPY)) { m_aJobData.setCollate( true ); m_aJobData.m_nCopies = nCopies; @@ -1219,7 +1219,7 @@ bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJo m_aJobData.setPaperBin( aPDFFiles[i].maParameters.mnPaperBin ); // spool current file - FILE* fp = PrinterInfoManager::get().startSpool( pPrinter->GetName(), i_rController.isDirectPrint() ); + FILE* fp = PrinterInfoManager::get().startSpool(xPrinter->GetName(), i_rController.isDirectPrint()); if( fp ) { sal_uInt64 nBytesRead = 0; @@ -1242,7 +1242,7 @@ bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJo aBuf.append( sal_Int32( i + nCurJob * aPDFFiles.size() ) ); } bSuccess &= - PrinterInfoManager::get().endSpool( pPrinter->GetName(), aBuf.makeStringAndClear(), fp, m_aJobData, bFirstJob, sFaxNumber ); + PrinterInfoManager::get().endSpool(xPrinter->GetName(), aBuf.makeStringAndClear(), fp, m_aJobData, bFirstJob, sFaxNumber); bFirstJob = false; } } diff --git a/vcl/inc/generic/glyphcache.hxx b/vcl/inc/generic/glyphcache.hxx index b5e8d75cfd54..382e70c5206a 100644 --- a/vcl/inc/generic/glyphcache.hxx +++ b/vcl/inc/generic/glyphcache.hxx @@ -26,8 +26,6 @@ #include FT_FREETYPE_H #include FT_GLYPH_H -#include <boost/shared_ptr.hpp> - #include <basebmp/bitmapdevice.hxx> #include <com/sun/star/i18n/XBreakIterator.hpp> #include <tools/gen.hxx> @@ -176,8 +174,8 @@ public: bool TestFont() const { return mbFaceOk;} FT_Face GetFtFace() const; int GetLoadFlags() const { return (mnLoadFlags & ~FT_LOAD_IGNORE_TRANSFORM); } - void SetFontOptions( boost::shared_ptr<ImplFontOptions> ); - boost::shared_ptr<ImplFontOptions> GetFontOptions() const; + void SetFontOptions(std::shared_ptr<ImplFontOptions>); + std::shared_ptr<ImplFontOptions> GetFontOptions() const; bool NeedsArtificialBold() const { return mbArtBold; } bool NeedsArtificialItalic() const { return mbArtItalic; } @@ -255,7 +253,7 @@ private: FT_FaceRec_* maFaceFT; FT_SizeRec_* maSizeFT; - boost::shared_ptr<ImplFontOptions> mpFontOptions; + std::shared_ptr<ImplFontOptions> mxFontOptions; bool mbFaceOk; bool mbArtItalic; @@ -280,7 +278,7 @@ public: private: ServerFont* mpServerFont; - boost::shared_ptr<ImplFontOptions> mpFontOptions; + std::shared_ptr<ImplFontOptions> mxFontOptions; bool mbGotFontOptions; }; diff --git a/vcl/inc/impimagetree.hxx b/vcl/inc/impimagetree.hxx index 0fbb2769e086..4a5e3a6be5e7 100644 --- a/vcl/inc/impimagetree.hxx +++ b/vcl/inc/impimagetree.hxx @@ -22,10 +22,10 @@ #include "sal/config.h" +#include <memory> #include <unordered_map> #include <vector> -#include "boost/noncopyable.hpp" #include "com/sun/star/uno/Reference.hxx" #include "rtl/ustring.hxx" #include "salhelper/singletonref.hxx" @@ -95,7 +95,7 @@ private: void loadImageLinks(); - void parseLinkFile(boost::shared_ptr< SvStream > stream); + void parseLinkFile(std::shared_ptr<SvStream> stream); /// Return name of a real .png according to links.txt. OUString const & getRealImageName(OUString const & name); diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx index 715615e73846..56db30f8e284 100644 --- a/vcl/inc/pch/precompiled_vcl.hxx +++ b/vcl/inc/pch/precompiled_vcl.hxx @@ -137,7 +137,6 @@ #include <basegfx/vector/b2isize.hxx> #include <boost/bind.hpp> #include <boost/functional/hash.hpp> -#include <boost/make_shared.hpp> #include <boost/mem_fn.hpp> #include <boost/optional.hpp> #include <boost/ptr_container/ptr_vector.hpp> diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx index 49c97e3467a1..ab6adbbdce55 100644 --- a/vcl/inc/printdlg.hxx +++ b/vcl/inc/printdlg.hxx @@ -36,7 +36,7 @@ #include "vcl/tabpage.hxx" #include "vcl/virdev.hxx" -#include <boost/shared_ptr.hpp> +#include <memory> #include <map> namespace vcl @@ -186,7 +186,7 @@ namespace vcl VclBuilder* mpCustomOptionsUIBuilder; - boost::shared_ptr< PrinterController > maPController; + std::shared_ptr<PrinterController> maPController; TabControl* mpTabCtrl; NUpTabPage maNUpPage; JobTabPage maJobPage; @@ -258,7 +258,7 @@ namespace vcl DECL_LINK( UIOption_ModifyHdl, Edit* ); public: - PrintDialog( vcl::Window*, const boost::shared_ptr< PrinterController >& ); + PrintDialog( vcl::Window*, const std::shared_ptr< PrinterController >& ); virtual ~PrintDialog(); bool isPrintToFile(); diff --git a/vcl/inc/window.h b/vcl/inc/window.h index 6e6129b1b1b4..e14c1c5fd334 100644 --- a/vcl/inc/window.h +++ b/vcl/inc/window.h @@ -258,8 +258,8 @@ public: InputContext maInputContext; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > mxWindowPeer; ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > mxAccessible; - ::boost::shared_ptr< VclSizeGroup > m_xSizeGroup; - ::std::vector< FixedText* > m_aMnemonicLabels; + std::shared_ptr<VclSizeGroup> m_xSizeGroup; + std::vector<FixedText*> m_aMnemonicLabels; ImplAccessibleInfos* mpAccessibleInfos; VCLXWindow* mpVCLXWindow; vcl::Region maWinRegion; //< region to 'shape' the VCL window (frame coordinates) diff --git a/vcl/source/app/IconThemeScanner.cxx b/vcl/source/app/IconThemeScanner.cxx index 8cb58fe58629..45346cb3be45 100644 --- a/vcl/source/app/IconThemeScanner.cxx +++ b/vcl/source/app/IconThemeScanner.cxx @@ -154,10 +154,10 @@ IconThemeScanner::IconThemeIsInstalled(const OUString& themeId) const return IconThemeInfo::IconThemeIsInVector(mFoundIconThemes, themeId); } -/*static*/ boost::shared_ptr<IconThemeScanner> +/*static*/ std::shared_ptr<IconThemeScanner> IconThemeScanner::Create(const OUString &path) { - boost::shared_ptr<IconThemeScanner> retval(new IconThemeScanner); + std::shared_ptr<IconThemeScanner> retval(new IconThemeScanner); retval->ScanDirectoryForIconThemes(path); return retval; } diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 57377ff3fb27..bc6f1319c6d1 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -55,8 +55,6 @@ using namespace ::com::sun::star; #include "svdata.hxx" #include "impimagetree.hxx" -#include <boost/make_shared.hpp> - struct ImplMouseData { ImplMouseData(); @@ -174,9 +172,9 @@ struct ImplStyleData bool mnUseFlatBorders; bool mbPreferredUseImagesInMenus; long mnMinThumbSize; - boost::shared_ptr<vcl::IconThemeScanner> + std::shared_ptr<vcl::IconThemeScanner> mIconThemeScanner; - boost::shared_ptr<vcl::IconThemeSelector> + std::shared_ptr<vcl::IconThemeSelector> mIconThemeSelector; rtl::OUString mIconTheme; @@ -294,179 +292,179 @@ void MouseSettings::SetOptions(sal_uLong nOptions) { CopyData(); - mpData->mnOptions = nOptions; + mxData->mnOptions = nOptions; } sal_uLong MouseSettings::GetOptions() const { - return mpData->mnOptions; + return mxData->mnOptions; } void MouseSettings::SetDoubleClickTime( sal_uLong nDoubleClkTime ) { CopyData(); - mpData->mnDoubleClkTime = nDoubleClkTime; + mxData->mnDoubleClkTime = nDoubleClkTime; } sal_uLong MouseSettings::GetDoubleClickTime() const { - return mpData->mnDoubleClkTime; + return mxData->mnDoubleClkTime; } void MouseSettings::SetDoubleClickWidth( long nDoubleClkWidth ) { CopyData(); - mpData->mnDoubleClkWidth = nDoubleClkWidth; + mxData->mnDoubleClkWidth = nDoubleClkWidth; } long MouseSettings::GetDoubleClickWidth() const { - return mpData->mnDoubleClkWidth; + return mxData->mnDoubleClkWidth; } void MouseSettings::SetDoubleClickHeight( long nDoubleClkHeight ) { CopyData(); - mpData->mnDoubleClkHeight = nDoubleClkHeight; + mxData->mnDoubleClkHeight = nDoubleClkHeight; } long MouseSettings::GetDoubleClickHeight() const { - return mpData->mnDoubleClkHeight; + return mxData->mnDoubleClkHeight; } void MouseSettings::SetStartDragWidth( long nDragWidth ) { CopyData(); - mpData->mnStartDragWidth = nDragWidth; + mxData->mnStartDragWidth = nDragWidth; } long MouseSettings::GetStartDragWidth() const { - return mpData->mnStartDragWidth; + return mxData->mnStartDragWidth; } void MouseSettings::SetStartDragHeight( long nDragHeight ) { CopyData(); - mpData->mnStartDragHeight = nDragHeight; + mxData->mnStartDragHeight = nDragHeight; } long MouseSettings::GetStartDragHeight() const { - return mpData->mnStartDragHeight; + return mxData->mnStartDragHeight; } sal_uInt16 MouseSettings::GetStartDragCode() const { - return mpData->mnStartDragCode; + return mxData->mnStartDragCode; } sal_uInt16 MouseSettings::GetContextMenuCode() const { - return mpData->mnContextMenuCode; + return mxData->mnContextMenuCode; } sal_uInt16 MouseSettings::GetContextMenuClicks() const { - return mpData->mnContextMenuClicks; + return mxData->mnContextMenuClicks; } sal_uLong MouseSettings::GetScrollRepeat() const { - return mpData->mnScrollRepeat; + return mxData->mnScrollRepeat; } sal_uLong MouseSettings::GetButtonStartRepeat() const { - return mpData->mnButtonStartRepeat; + return mxData->mnButtonStartRepeat; } void MouseSettings::SetButtonRepeat( sal_uLong nRepeat ) { CopyData(); - mpData->mnButtonRepeat = nRepeat; + mxData->mnButtonRepeat = nRepeat; } sal_uLong MouseSettings::GetButtonRepeat() const { - return mpData->mnButtonRepeat; + return mxData->mnButtonRepeat; } sal_uLong MouseSettings::GetActionDelay() const { - return mpData->mnActionDelay; + return mxData->mnActionDelay; } void MouseSettings::SetMenuDelay( sal_uLong nDelay ) { CopyData(); - mpData->mnMenuDelay = nDelay; + mxData->mnMenuDelay = nDelay; } sal_uLong MouseSettings::GetMenuDelay() const { - return mpData->mnMenuDelay; + return mxData->mnMenuDelay; } void MouseSettings::SetFollow( sal_uLong nFollow ) { CopyData(); - mpData->mnFollow = nFollow; + mxData->mnFollow = nFollow; } sal_uLong MouseSettings::GetFollow() const { - return mpData->mnFollow; + return mxData->mnFollow; } void MouseSettings::SetMiddleButtonAction( sal_uInt16 nAction ) { CopyData(); - mpData->mnMiddleButtonAction = nAction; + mxData->mnMiddleButtonAction = nAction; } sal_uInt16 MouseSettings::GetMiddleButtonAction() const { - return mpData->mnMiddleButtonAction; + return mxData->mnMiddleButtonAction; } void MouseSettings::SetWheelBehavior( sal_uInt16 nBehavior ) { CopyData(); - mpData->mnWheelBehavior = nBehavior; + mxData->mnWheelBehavior = nBehavior; } sal_uInt16 MouseSettings::GetWheelBehavior() const { - return mpData->mnWheelBehavior; + return mxData->mnWheelBehavior; } bool @@ -476,7 +474,7 @@ MouseSettings::operator !=( const MouseSettings& rSet ) const } MouseSettings::MouseSettings() -: mpData(boost::make_shared<ImplMouseData>()) + : mxData(std::make_shared<ImplMouseData>()) { } @@ -487,33 +485,33 @@ MouseSettings::~MouseSettings() void MouseSettings::CopyData() { // copy if other references exist - if ( ! mpData.unique() ) { - mpData = boost::make_shared<ImplMouseData>(*mpData); + if ( ! mxData.unique() ) { + mxData = std::make_shared<ImplMouseData>(*mxData); } } bool MouseSettings::operator ==( const MouseSettings& rSet ) const { - if ( mpData == rSet.mpData ) + if ( mxData == rSet.mxData ) return true; - if ( (mpData->mnOptions == rSet.mpData->mnOptions) && - (mpData->mnDoubleClkTime == rSet.mpData->mnDoubleClkTime) && - (mpData->mnDoubleClkWidth == rSet.mpData->mnDoubleClkWidth) && - (mpData->mnDoubleClkHeight == rSet.mpData->mnDoubleClkHeight) && - (mpData->mnStartDragWidth == rSet.mpData->mnStartDragWidth) && - (mpData->mnStartDragHeight == rSet.mpData->mnStartDragHeight) && - (mpData->mnStartDragCode == rSet.mpData->mnStartDragCode) && - (mpData->mnContextMenuCode == rSet.mpData->mnContextMenuCode) && - (mpData->mnContextMenuClicks == rSet.mpData->mnContextMenuClicks) && - (mpData->mnMiddleButtonAction == rSet.mpData->mnMiddleButtonAction) && - (mpData->mnScrollRepeat == rSet.mpData->mnScrollRepeat) && - (mpData->mnButtonStartRepeat == rSet.mpData->mnButtonStartRepeat) && - (mpData->mnButtonRepeat == rSet.mpData->mnButtonRepeat) && - (mpData->mnActionDelay == rSet.mpData->mnActionDelay) && - (mpData->mnMenuDelay == rSet.mpData->mnMenuDelay) && - (mpData->mnFollow == rSet.mpData->mnFollow) && - (mpData->mnWheelBehavior == rSet.mpData->mnWheelBehavior ) ) + if ( (mxData->mnOptions == rSet.mxData->mnOptions) && + (mxData->mnDoubleClkTime == rSet.mxData->mnDoubleClkTime) && + (mxData->mnDoubleClkWidth == rSet.mxData->mnDoubleClkWidth) && + (mxData->mnDoubleClkHeight == rSet.mxData->mnDoubleClkHeight) && + (mxData->mnStartDragWidth == rSet.mxData->mnStartDragWidth) && + (mxData->mnStartDragHeight == rSet.mxData->mnStartDragHeight) && + (mxData->mnStartDragCode == rSet.mxData->mnStartDragCode) && + (mxData->mnContextMenuCode == rSet.mxData->mnContextMenuCode) && + (mxData->mnContextMenuClicks == rSet.mxData->mnContextMenuClicks) && + (mxData->mnMiddleButtonAction == rSet.mxData->mnMiddleButtonAction) && + (mxData->mnScrollRepeat == rSet.mxData->mnScrollRepeat) && + (mxData->mnButtonStartRepeat == rSet.mxData->mnButtonStartRepeat) && + (mxData->mnButtonRepeat == rSet.mxData->mnButtonRepeat) && + (mxData->mnActionDelay == rSet.mxData->mnActionDelay) && + (mxData->mnMenuDelay == rSet.mxData->mnMenuDelay) && + (mxData->mnFollow == rSet.mxData->mnFollow) && + (mxData->mnWheelBehavior == rSet.mxData->mnWheelBehavior ) ) return true; else return false; @@ -758,7 +756,7 @@ void ImplStyleData::SetStandardStyles() } StyleSettings::StyleSettings() -: mpData(boost::make_shared<ImplStyleData>()) + : mxData(std::make_shared<ImplStyleData>()) { } @@ -770,1232 +768,1232 @@ void StyleSettings::SetFaceColor( const Color& rColor ) { CopyData(); - mpData->maFaceColor = rColor; + mxData->maFaceColor = rColor; } const Color& StyleSettings::GetFaceColor() const { - return mpData->maFaceColor; + return mxData->maFaceColor; } void StyleSettings::SetCheckedColor( const Color& rColor ) { CopyData(); - mpData->maCheckedColor = rColor; + mxData->maCheckedColor = rColor; } const Color& StyleSettings::GetCheckedColor() const { - return mpData->maCheckedColor; + return mxData->maCheckedColor; } void StyleSettings::SetLightColor( const Color& rColor ) { CopyData(); - mpData->maLightColor = rColor; + mxData->maLightColor = rColor; } const Color& StyleSettings::GetLightColor() const { - return mpData->maLightColor; + return mxData->maLightColor; } void StyleSettings::SetLightBorderColor( const Color& rColor ) { CopyData(); - mpData->maLightBorderColor = rColor; + mxData->maLightBorderColor = rColor; } const Color& StyleSettings::GetLightBorderColor() const { - return mpData->maLightBorderColor; + return mxData->maLightBorderColor; } void StyleSettings::SetShadowColor( const Color& rColor ) { CopyData(); - mpData->maShadowColor = rColor; + mxData->maShadowColor = rColor; } const Color& StyleSettings::GetShadowColor() const { - return mpData->maShadowColor; + return mxData->maShadowColor; } void StyleSettings::SetDarkShadowColor( const Color& rColor ) { CopyData(); - mpData->maDarkShadowColor = rColor; + mxData->maDarkShadowColor = rColor; } const Color& StyleSettings::GetDarkShadowColor() const { - return mpData->maDarkShadowColor; + return mxData->maDarkShadowColor; } void StyleSettings::SetButtonTextColor( const Color& rColor ) { CopyData(); - mpData->maButtonTextColor = rColor; + mxData->maButtonTextColor = rColor; } const Color& StyleSettings::GetButtonTextColor() const { - return mpData->maButtonTextColor; + return mxData->maButtonTextColor; } void StyleSettings::SetButtonRolloverTextColor( const Color& rColor ) { CopyData(); - mpData->maButtonRolloverTextColor = rColor; + mxData->maButtonRolloverTextColor = rColor; } const Color& StyleSettings::GetButtonRolloverTextColor() const { - return mpData->maButtonRolloverTextColor; + return mxData->maButtonRolloverTextColor; } void StyleSettings::SetRadioCheckTextColor( const Color& rColor ) { CopyData(); - mpData->maRadioCheckTextColor = rColor; + mxData->maRadioCheckTextColor = rColor; } const Color& StyleSettings::GetRadioCheckTextColor() const { - return mpData->maRadioCheckTextColor; + return mxData->maRadioCheckTextColor; } void StyleSettings::SetGroupTextColor( const Color& rColor ) { CopyData(); - mpData->maGroupTextColor = rColor; + mxData->maGroupTextColor = rColor; } const Color& StyleSettings::GetGroupTextColor() const { - return mpData->maGroupTextColor; + return mxData->maGroupTextColor; } void StyleSettings::SetLabelTextColor( const Color& rColor ) { CopyData(); - mpData->maLabelTextColor = rColor; + mxData->maLabelTextColor = rColor; } const Color& StyleSettings::GetLabelTextColor() const { - return mpData->maLabelTextColor; + return mxData->maLabelTextColor; } void StyleSettings::SetInfoTextColor( const Color& rColor ) { CopyData(); - mpData->maInfoTextColor = rColor; + mxData->maInfoTextColor = rColor; } const Color& StyleSettings::GetInfoTextColor() const { - return mpData->maInfoTextColor; + return mxData->maInfoTextColor; } void StyleSettings::SetWindowColor( const Color& rColor ) { CopyData(); - mpData->maWindowColor = rColor; + mxData->maWindowColor = rColor; } const Color& StyleSettings::GetWindowColor() const { - return mpData->maWindowColor; + return mxData->maWindowColor; } void StyleSettings::SetWindowTextColor( const Color& rColor ) { CopyData(); - mpData->maWindowTextColor = rColor; + mxData->maWindowTextColor = rColor; } const Color& StyleSettings::GetWindowTextColor() const { - return mpData->maWindowTextColor; + return mxData->maWindowTextColor; } void StyleSettings::SetDialogColor( const Color& rColor ) { CopyData(); - mpData->maDialogColor = rColor; + mxData->maDialogColor = rColor; } const Color& StyleSettings::GetDialogColor() const { - return mpData->maDialogColor; + return mxData->maDialogColor; } void StyleSettings::SetDialogTextColor( const Color& rColor ) { CopyData(); - mpData->maDialogTextColor = rColor; + mxData->maDialogTextColor = rColor; } const Color& StyleSettings::GetDialogTextColor() const { - return mpData->maDialogTextColor; + return mxData->maDialogTextColor; } void StyleSettings::SetWorkspaceColor( const Color& rColor ) { CopyData(); - mpData->maWorkspaceColor = rColor; + mxData->maWorkspaceColor = rColor; } const Color& StyleSettings::GetWorkspaceColor() const { - return mpData->maWorkspaceColor; + return mxData->maWorkspaceColor; } void StyleSettings::SetFieldColor( const Color& rColor ) { CopyData(); - mpData->maFieldColor = rColor; + mxData->maFieldColor = rColor; } const Color& StyleSettings::GetFieldColor() const { - return mpData->maFieldColor; + return mxData->maFieldColor; } void StyleSettings::SetFieldTextColor( const Color& rColor ) { CopyData(); - mpData->maFieldTextColor = rColor; + mxData->maFieldTextColor = rColor; } const Color& StyleSettings::GetFieldTextColor() const { - return mpData->maFieldTextColor; + return mxData->maFieldTextColor; } void StyleSettings::SetFieldRolloverTextColor( const Color& rColor ) { CopyData(); - mpData->maFieldRolloverTextColor = rColor; + mxData->maFieldRolloverTextColor = rColor; } const Color& StyleSettings::GetFieldRolloverTextColor() const { - return mpData->maFieldRolloverTextColor; + return mxData->maFieldRolloverTextColor; } void StyleSettings::SetActiveColor( const Color& rColor ) { CopyData(); - mpData->maActiveColor = rColor; + mxData->maActiveColor = rColor; } const Color& StyleSettings::GetActiveColor() const { - return mpData->maActiveColor; + return mxData->maActiveColor; } void StyleSettings::SetActiveTextColor( const Color& rColor ) { CopyData(); - mpData->maActiveTextColor = rColor; + mxData->maActiveTextColor = rColor; } const Color& StyleSettings::GetActiveTextColor() const { - return mpData->maActiveTextColor; + return mxData->maActiveTextColor; } void StyleSettings::SetActiveBorderColor( const Color& rColor ) { CopyData(); - mpData->maActiveBorderColor = rColor; + mxData->maActiveBorderColor = rColor; } const Color& StyleSettings::GetActiveBorderColor() const { - return mpData->maActiveBorderColor; + return mxData->maActiveBorderColor; } void StyleSettings::SetDeactiveColor( const Color& rColor ) { CopyData(); - mpData->maDeactiveColor = rColor; + mxData->maDeactiveColor = rColor; } const Color& StyleSettings::GetDeactiveColor() const { - return mpData->maDeactiveColor; + return mxData->maDeactiveColor; } void StyleSettings::SetDeactiveTextColor( const Color& rColor ) { CopyData(); - mpData->maDeactiveTextColor = rColor; + mxData->maDeactiveTextColor = rColor; } const Color& StyleSettings::GetDeactiveTextColor() const { - return mpData->maDeactiveTextColor; + return mxData->maDeactiveTextColor; } void StyleSettings::SetDeactiveBorderColor( const Color& rColor ) { CopyData(); - mpData->maDeactiveBorderColor = rColor; + mxData->maDeactiveBorderColor = rColor; } const Color& StyleSettings::GetDeactiveBorderColor() const { - return mpData->maDeactiveBorderColor; + return mxData->maDeactiveBorderColor; } void StyleSettings::SetHighlightColor( const Color& rColor ) { CopyData(); - mpData->maHighlightColor = rColor; + mxData->maHighlightColor = rColor; } const Color& StyleSettings::GetHighlightColor() const { - return mpData->maHighlightColor; + return mxData->maHighlightColor; } void StyleSettings::SetHighlightTextColor( const Color& rColor ) { CopyData(); - mpData->maHighlightTextColor = rColor; + mxData->maHighlightTextColor = rColor; } const Color& StyleSettings::GetHighlightTextColor() const { - return mpData->maHighlightTextColor; + return mxData->maHighlightTextColor; } void StyleSettings::SetDisableColor( const Color& rColor ) { CopyData(); - mpData->maDisableColor = rColor; + mxData->maDisableColor = rColor; } const Color& StyleSettings::GetDisableColor() const { - return mpData->maDisableColor; + return mxData->maDisableColor; } void StyleSettings::SetHelpColor( const Color& rColor ) { CopyData(); - mpData->maHelpColor = rColor; + mxData->maHelpColor = rColor; } const Color& StyleSettings::GetHelpColor() const { - return mpData->maHelpColor; + return mxData->maHelpColor; } void StyleSettings::SetHelpTextColor( const Color& rColor ) { CopyData(); - mpData->maHelpTextColor = rColor; + mxData->maHelpTextColor = rColor; } const Color& StyleSettings::GetHelpTextColor() const { - return mpData->maHelpTextColor; + return mxData->maHelpTextColor; } void StyleSettings::SetMenuColor( const Color& rColor ) { CopyData(); - mpData->maMenuColor = rColor; + mxData->maMenuColor = rColor; } const Color& StyleSettings::GetMenuColor() const { - return mpData->maMenuColor; + return mxData->maMenuColor; } void StyleSettings::SetMenuBarColor( const Color& rColor ) { CopyData(); - mpData->maMenuBarColor = rColor; + mxData->maMenuBarColor = rColor; } const Color& StyleSettings::GetMenuBarColor() const { - return mpData->maMenuBarColor; + return mxData->maMenuBarColor; } void StyleSettings::SetMenuBarRolloverColor( const Color& rColor ) { CopyData(); - mpData->maMenuBarRolloverColor = rColor; + mxData->maMenuBarRolloverColor = rColor; } const Color& StyleSettings::GetMenuBarRolloverColor() const { - return mpData->maMenuBarRolloverColor; + return mxData->maMenuBarRolloverColor; } void StyleSettings::SetMenuBorderColor( const Color& rColor ) { CopyData(); - mpData->maMenuBorderColor = rColor; + mxData->maMenuBorderColor = rColor; } const Color& StyleSettings::GetMenuBorderColor() const { - return mpData->maMenuBorderColor; + return mxData->maMenuBorderColor; } void StyleSettings::SetMenuTextColor( const Color& rColor ) { CopyData(); - mpData->maMenuTextColor = rColor; + mxData->maMenuTextColor = rColor; } const Color& StyleSettings::GetMenuTextColor() const { - return mpData->maMenuTextColor; + return mxData->maMenuTextColor; } void StyleSettings::SetMenuBarTextColor( const Color& rColor ) { CopyData(); - mpData->maMenuBarTextColor = rColor; + mxData->maMenuBarTextColor = rColor; } const Color& StyleSettings::GetMenuBarTextColor() const { - return mpData->maMenuBarTextColor; + return mxData->maMenuBarTextColor; } void StyleSettings::SetMenuBarRolloverTextColor( const Color& rColor ) { CopyData(); - mpData->maMenuBarRolloverTextColor = rColor; + mxData->maMenuBarRolloverTextColor = rColor; } const Color& StyleSettings::GetMenuBarRolloverTextColor() const { - return mpData->maMenuBarRolloverTextColor; + return mxData->maMenuBarRolloverTextColor; } void StyleSettings::SetMenuHighlightColor( const Color& rColor ) { CopyData(); - mpData->maMenuHighlightColor = rColor; + mxData->maMenuHighlightColor = rColor; } const Color& StyleSettings::GetMenuHighlightColor() const { - return mpData->maMenuHighlightColor; + return mxData->maMenuHighlightColor; } void StyleSettings::SetMenuHighlightTextColor( const Color& rColor ) { CopyData(); - mpData->maMenuHighlightTextColor = rColor; + mxData->maMenuHighlightTextColor = rColor; } const Color& StyleSettings::GetMenuHighlightTextColor() const { - return mpData->maMenuHighlightTextColor; + return mxData->maMenuHighlightTextColor; } void StyleSettings::SetLinkColor( const Color& rColor ) { CopyData(); - mpData->maLinkColor = rColor; + mxData->maLinkColor = rColor; } const Color& StyleSettings::GetLinkColor() const { - return mpData->maLinkColor; + return mxData->maLinkColor; } void StyleSettings::SetVisitedLinkColor( const Color& rColor ) { CopyData(); - mpData->maVisitedLinkColor = rColor; + mxData->maVisitedLinkColor = rColor; } const Color& StyleSettings::GetVisitedLinkColor() const { - return mpData->maVisitedLinkColor; + return mxData->maVisitedLinkColor; } const Color& StyleSettings::GetHighlightLinkColor() const { - return mpData->maHighlightLinkColor; + return mxData->maHighlightLinkColor; } void StyleSettings::SetMonoColor( const Color& rColor ) { CopyData(); - mpData->maMonoColor = rColor; + mxData->maMonoColor = rColor; } const Color& StyleSettings::GetMonoColor() const { - return mpData->maMonoColor; + return mxData->maMonoColor; } void StyleSettings::SetActiveTabColor( const Color& rColor ) { CopyData(); - mpData->maActiveTabColor = rColor; + mxData->maActiveTabColor = rColor; } const Color& StyleSettings::GetActiveTabColor() const { - return mpData->maActiveTabColor; + return mxData->maActiveTabColor; } void StyleSettings::SetInactiveTabColor( const Color& rColor ) { CopyData(); - mpData->maInactiveTabColor = rColor; + mxData->maInactiveTabColor = rColor; } const Color& StyleSettings::GetInactiveTabColor() const { - return mpData->maInactiveTabColor; + return mxData->maInactiveTabColor; } void StyleSettings::SetAlternatingRowColor( const Color& rColor ) { CopyData(); - mpData->maAlternatingRowColor = rColor; + mxData->maAlternatingRowColor = rColor; } const Color& StyleSettings::GetAlternatingRowColor() const { - return mpData->maAlternatingRowColor; + return mxData->maAlternatingRowColor; } void StyleSettings::SetUseSystemUIFonts( bool bUseSystemUIFonts ) { CopyData(); - mpData->mbUseSystemUIFonts = bUseSystemUIFonts; + mxData->mbUseSystemUIFonts = bUseSystemUIFonts; } bool StyleSettings::GetUseSystemUIFonts() const { - return mpData->mbUseSystemUIFonts; + return mxData->mbUseSystemUIFonts; } void StyleSettings::SetUseFlatBorders( bool bUseFlatBorders ) { CopyData(); - mpData->mnUseFlatBorders = bUseFlatBorders; + mxData->mnUseFlatBorders = bUseFlatBorders; } bool StyleSettings::GetUseFlatBorders() const { - return (bool) mpData->mnUseFlatBorders; + return (bool) mxData->mnUseFlatBorders; } void StyleSettings::SetUseFlatMenus( bool bUseFlatMenus ) { CopyData(); - mpData->mnUseFlatMenus = bUseFlatMenus; + mxData->mnUseFlatMenus = bUseFlatMenus; } bool StyleSettings::GetUseFlatMenus() const { - return (bool) mpData->mnUseFlatMenus; + return (bool) mxData->mnUseFlatMenus; } void StyleSettings::SetUseImagesInMenus( TriState eUseImagesInMenus ) { CopyData(); - mpData->meUseImagesInMenus = eUseImagesInMenus; + mxData->meUseImagesInMenus = eUseImagesInMenus; } void StyleSettings::SetPreferredUseImagesInMenus( bool bPreferredUseImagesInMenus ) { CopyData(); - mpData->mbPreferredUseImagesInMenus = bPreferredUseImagesInMenus; + mxData->mbPreferredUseImagesInMenus = bPreferredUseImagesInMenus; } bool StyleSettings::GetPreferredUseImagesInMenus() const { - return mpData->mbPreferredUseImagesInMenus; + return mxData->mbPreferredUseImagesInMenus; } void StyleSettings::SetSkipDisabledInMenus( bool bSkipDisabledInMenus ) { CopyData(); - mpData->mbSkipDisabledInMenus = bSkipDisabledInMenus; + mxData->mbSkipDisabledInMenus = bSkipDisabledInMenus; } bool StyleSettings::GetSkipDisabledInMenus() const { - return mpData->mbSkipDisabledInMenus; + return mxData->mbSkipDisabledInMenus; } void StyleSettings::SetHideDisabledMenuItems( bool bHideDisabledMenuItems ) { CopyData(); - mpData->mbHideDisabledMenuItems = bHideDisabledMenuItems; + mxData->mbHideDisabledMenuItems = bHideDisabledMenuItems; } bool StyleSettings::GetHideDisabledMenuItems() const { - return mpData->mbHideDisabledMenuItems; + return mxData->mbHideDisabledMenuItems; } void StyleSettings::SetAcceleratorsInContextMenus( bool bAcceleratorsInContextMenus ) { CopyData(); - mpData->mbAcceleratorsInContextMenus = bAcceleratorsInContextMenus; + mxData->mbAcceleratorsInContextMenus = bAcceleratorsInContextMenus; } bool StyleSettings::GetAcceleratorsInContextMenus() const { - return mpData->mbAcceleratorsInContextMenus; + return mxData->mbAcceleratorsInContextMenus; } void StyleSettings::SetPrimaryButtonWarpsSlider( bool bPrimaryButtonWarpsSlider ) { CopyData(); - mpData->mbPrimaryButtonWarpsSlider = bPrimaryButtonWarpsSlider; + mxData->mbPrimaryButtonWarpsSlider = bPrimaryButtonWarpsSlider; } bool StyleSettings::GetPrimaryButtonWarpsSlider() const { - return mpData->mbPrimaryButtonWarpsSlider; + return mxData->mbPrimaryButtonWarpsSlider; } void StyleSettings::SetCairoFontOptions( const void *pOptions ) { CopyData(); - mpData->mpFontOptions = pOptions; + mxData->mpFontOptions = pOptions; } const void* StyleSettings::GetCairoFontOptions() const { - return mpData->mpFontOptions; + return mxData->mpFontOptions; } void StyleSettings::SetAppFont( const vcl::Font& rFont ) { CopyData(); - mpData->maAppFont = rFont; + mxData->maAppFont = rFont; } const vcl::Font& StyleSettings::GetAppFont() const { - return mpData->maAppFont; + return mxData->maAppFont; } void StyleSettings::SetHelpFont( const vcl::Font& rFont ) { CopyData(); - mpData->maHelpFont = rFont; + mxData->maHelpFont = rFont; } const vcl::Font& StyleSettings::GetHelpFont() const { - return mpData->maHelpFont; + return mxData->maHelpFont; } void StyleSettings::SetTitleFont( const vcl::Font& rFont ) { CopyData(); - mpData->maTitleFont = rFont; + mxData->maTitleFont = rFont; } const vcl::Font& StyleSettings::GetTitleFont() const { - return mpData->maTitleFont; + return mxData->maTitleFont; } void StyleSettings::SetFloatTitleFont( const vcl::Font& rFont ) { CopyData(); - mpData->maFloatTitleFont = rFont; + mxData->maFloatTitleFont = rFont; } const vcl::Font& StyleSettings::GetFloatTitleFont() const { - return mpData->maFloatTitleFont; + return mxData->maFloatTitleFont; } void StyleSettings::SetMenuFont( const vcl::Font& rFont ) { CopyData(); - mpData->maMenuFont = rFont; + mxData->maMenuFont = rFont; } const vcl::Font& StyleSettings::GetMenuFont() const { - return mpData->maMenuFont; + return mxData->maMenuFont; } void StyleSettings::SetToolFont( const vcl::Font& rFont ) { CopyData(); - mpData->maToolFont = rFont; + mxData->maToolFont = rFont; } const vcl::Font& StyleSettings::GetToolFont() const { - return mpData->maToolFont; + return mxData->maToolFont; } void StyleSettings::SetGroupFont( const vcl::Font& rFont ) { CopyData(); - mpData->maGroupFont = rFont; + mxData->maGroupFont = rFont; } const vcl::Font& StyleSettings::GetGroupFont() const { - return mpData->maGroupFont; + return mxData->maGroupFont; } void StyleSettings::SetLabelFont( const vcl::Font& rFont ) { CopyData(); - mpData->maLabelFont = rFont; + mxData->maLabelFont = rFont; } const vcl::Font& StyleSettings::GetLabelFont() const { - return mpData->maLabelFont; + return mxData->maLabelFont; } void StyleSettings::SetInfoFont( const vcl::Font& rFont ) { CopyData(); - mpData->maInfoFont = rFont; + mxData->maInfoFont = rFont; } const vcl::Font& StyleSettings::GetInfoFont() const { - return mpData->maInfoFont; + return mxData->maInfoFont; } void StyleSettings::SetRadioCheckFont( const vcl::Font& rFont ) { CopyData(); - mpData->maRadioCheckFont = rFont; + mxData->maRadioCheckFont = rFont; } const vcl::Font& StyleSettings::GetRadioCheckFont() const { - return mpData->maRadioCheckFont; + return mxData->maRadioCheckFont; } void StyleSettings::SetPushButtonFont( const vcl::Font& rFont ) { CopyData(); - mpData->maPushButtonFont = rFont; + mxData->maPushButtonFont = rFont; } const vcl::Font& StyleSettings::GetPushButtonFont() const { - return mpData->maPushButtonFont; + return mxData->maPushButtonFont; } void StyleSettings::SetFieldFont( const vcl::Font& rFont ) { CopyData(); - mpData->maFieldFont = rFont; + mxData->maFieldFont = rFont; } const vcl::Font& StyleSettings::GetFieldFont() const { - return mpData->maFieldFont; + return mxData->maFieldFont; } void StyleSettings::SetIconFont( const vcl::Font& rFont ) { CopyData(); - mpData->maIconFont = rFont; + mxData->maIconFont = rFont; } const vcl::Font& StyleSettings::GetIconFont() const { - return mpData->maIconFont; + return mxData->maIconFont; } long StyleSettings::GetBorderSize() const { - return mpData->mnBorderSize; + return mxData->mnBorderSize; } void StyleSettings::SetTitleHeight( long nSize ) { CopyData(); - mpData->mnTitleHeight = nSize; + mxData->mnTitleHeight = nSize; } long StyleSettings::GetTitleHeight() const { - return mpData->mnTitleHeight; + return mxData->mnTitleHeight; } void StyleSettings::SetFloatTitleHeight( long nSize ) { CopyData(); - mpData->mnFloatTitleHeight = nSize; + mxData->mnFloatTitleHeight = nSize; } long StyleSettings::GetFloatTitleHeight() const { - return mpData->mnFloatTitleHeight; + return mxData->mnFloatTitleHeight; } long StyleSettings::GetTearOffTitleHeight() const { - return mpData->mnTearOffTitleHeight; + return mxData->mnTearOffTitleHeight; } void StyleSettings::SetScrollBarSize( long nSize ) { CopyData(); - mpData->mnScrollBarSize = nSize; + mxData->mnScrollBarSize = nSize; } long StyleSettings::GetScrollBarSize() const { - return mpData->mnScrollBarSize; + return mxData->mnScrollBarSize; } void StyleSettings::SetMinThumbSize( long nSize ) { CopyData(); - mpData->mnMinThumbSize = nSize; + mxData->mnMinThumbSize = nSize; } long StyleSettings::GetMinThumbSize() const { - return mpData->mnMinThumbSize; + return mxData->mnMinThumbSize; } void StyleSettings::SetSpinSize( long nSize ) { CopyData(); - mpData->mnSpinSize = nSize; + mxData->mnSpinSize = nSize; } long StyleSettings::GetSpinSize() const { - return mpData->mnSpinSize; + return mxData->mnSpinSize; } long StyleSettings::GetSplitSize() const { - return mpData->mnSplitSize; + return mxData->mnSplitSize; } void StyleSettings::SetCursorSize( long nSize ) { CopyData(); - mpData->mnCursorSize = nSize; + mxData->mnCursorSize = nSize; } long StyleSettings::GetCursorSize() const { - return mpData->mnCursorSize; + return mxData->mnCursorSize; } void StyleSettings::SetCursorBlinkTime( long nBlinkTime ) { CopyData(); - mpData->mnCursorBlinkTime = nBlinkTime; + mxData->mnCursorBlinkTime = nBlinkTime; } long StyleSettings::GetCursorBlinkTime() const { - return (long) mpData->mnCursorBlinkTime; + return (long) mxData->mnCursorBlinkTime; } void StyleSettings::SetScreenZoom( sal_uInt16 nPercent ) { CopyData(); - mpData->mnScreenZoom = nPercent; + mxData->mnScreenZoom = nPercent; } sal_uInt16 StyleSettings::GetScreenZoom() const { - return mpData->mnScreenZoom; + return mxData->mnScreenZoom; } void StyleSettings::SetScreenFontZoom( sal_uInt16 nPercent ) { CopyData(); - mpData->mnScreenFontZoom = nPercent; + mxData->mnScreenFontZoom = nPercent; } sal_uInt16 StyleSettings::GetScreenFontZoom() const { - return mpData->mnScreenFontZoom; + return mxData->mnScreenFontZoom; } void StyleSettings::SetDragFullOptions( sal_uLong nOptions ) { CopyData(); - mpData->mnDragFullOptions = nOptions; + mxData->mnDragFullOptions = nOptions; } sal_uLong StyleSettings::GetDragFullOptions() const { - return mpData->mnDragFullOptions; + return mxData->mnDragFullOptions; } void StyleSettings::SetSelectionOptions( sal_uLong nOptions ) { CopyData(); - mpData->mnSelectionOptions = nOptions; + mxData->mnSelectionOptions = nOptions; } sal_uLong StyleSettings::GetSelectionOptions() const { - return mpData->mnSelectionOptions; + return mxData->mnSelectionOptions; } void StyleSettings::SetDisplayOptions( sal_uLong nOptions ) { CopyData(); - mpData->mnDisplayOptions = nOptions; + mxData->mnDisplayOptions = nOptions; } sal_uLong StyleSettings::GetDisplayOptions() const { - return mpData->mnDisplayOptions; + return mxData->mnDisplayOptions; } void StyleSettings::SetAntialiasingMinPixelHeight( long nMinPixel ) { CopyData(); - mpData->mnAntialiasedMin = nMinPixel; + mxData->mnAntialiasedMin = nMinPixel; } sal_uLong StyleSettings::GetAntialiasingMinPixelHeight() const { - return mpData->mnAntialiasedMin; + return mxData->mnAntialiasedMin; } void StyleSettings::SetOptions( sal_uLong nOptions ) { CopyData(); - mpData->mnOptions = nOptions; + mxData->mnOptions = nOptions; } void StyleSettings::SetAutoMnemonic( bool bAutoMnemonic ) { CopyData(); - mpData->mbAutoMnemonic = bAutoMnemonic; + mxData->mbAutoMnemonic = bAutoMnemonic; } bool StyleSettings::GetAutoMnemonic() const { - return mpData->mbAutoMnemonic; + return mxData->mbAutoMnemonic; } void StyleSettings::SetFontColor( const Color& rColor ) { CopyData(); - mpData->maFontColor = rColor; + mxData->maFontColor = rColor; } const Color& StyleSettings::GetFontColor() const { - return mpData->maFontColor; + return mxData->maFontColor; } void StyleSettings::SetToolbarIconSize( sal_uLong nSize ) { CopyData(); - mpData->mnToolbarIconSize = nSize; + mxData->mnToolbarIconSize = nSize; } sal_uLong StyleSettings::GetToolbarIconSize() const { - return mpData->mnToolbarIconSize; + return mxData->mnToolbarIconSize; } const DialogStyle& StyleSettings::GetDialogStyle() const { - return mpData->maDialogStyle; + return mxData->maDialogStyle; } void StyleSettings::SetDialogStyle( const DialogStyle& rStyle ) { CopyData(); - mpData->maDialogStyle = rStyle; + mxData->maDialogStyle = rStyle; } const FrameStyle& StyleSettings::GetFrameStyle() const { - return mpData->maFrameStyle; + return mxData->maFrameStyle; } void StyleSettings::SetFrameStyle( const FrameStyle& rStyle ) { CopyData(); - mpData->maFrameStyle = rStyle; + mxData->maFrameStyle = rStyle; } void StyleSettings::SetEdgeBlending(sal_uInt16 nCount) { CopyData(); - mpData->mnEdgeBlending = nCount; + mxData->mnEdgeBlending = nCount; } sal_uInt16 StyleSettings::GetEdgeBlending() const { - return mpData->mnEdgeBlending; + return mxData->mnEdgeBlending; } const Color& StyleSettings::GetEdgeBlendingTopLeftColor() const { - return mpData->maEdgeBlendingTopLeftColor; + return mxData->maEdgeBlendingTopLeftColor; } const Color& StyleSettings::GetEdgeBlendingBottomRightColor() const { - return mpData->maEdgeBlendingBottomRightColor; + return mxData->maEdgeBlendingBottomRightColor; } void StyleSettings::SetListBoxMaximumLineCount(sal_uInt16 nCount) { CopyData(); - mpData->mnListBoxMaximumLineCount = nCount; + mxData->mnListBoxMaximumLineCount = nCount; } sal_uInt16 StyleSettings::GetListBoxMaximumLineCount() const { - return mpData->mnListBoxMaximumLineCount; + return mxData->mnListBoxMaximumLineCount; } void StyleSettings::SetColorValueSetColumnCount(sal_uInt16 nCount) { CopyData(); - mpData->mnColorValueSetColumnCount = nCount; + mxData->mnColorValueSetColumnCount = nCount; } sal_uInt16 StyleSettings::GetColorValueSetColumnCount() const { - return mpData->mnColorValueSetColumnCount; + return mxData->mnColorValueSetColumnCount; } sal_uInt16 StyleSettings::GetColorValueSetMaximumRowCount() const { - return mpData->mnColorValueSetMaximumRowCount; + return mxData->mnColorValueSetMaximumRowCount; } sal_uInt16 StyleSettings::GetListBoxPreviewDefaultLineWidth() const { - return mpData->mnListBoxPreviewDefaultLineWidth; + return mxData->mnListBoxPreviewDefaultLineWidth; } void StyleSettings::SetPreviewUsesCheckeredBackground(bool bNew) { CopyData(); - mpData->mbPreviewUsesCheckeredBackground = bNew; + mxData->mbPreviewUsesCheckeredBackground = bNew; } bool StyleSettings::GetPreviewUsesCheckeredBackground() const { - return mpData->mbPreviewUsesCheckeredBackground; + return mxData->mbPreviewUsesCheckeredBackground; } bool @@ -2006,43 +2004,43 @@ StyleSettings::operator !=( const StyleSettings& rSet ) const const Size& StyleSettings::GetListBoxPreviewDefaultPixelSize() const { - if(0 == mpData->maListBoxPreviewDefaultPixelSize.Width() || 0 == mpData->maListBoxPreviewDefaultPixelSize.Height()) + if(0 == mxData->maListBoxPreviewDefaultPixelSize.Width() || 0 == mxData->maListBoxPreviewDefaultPixelSize.Height()) { - const_cast< StyleSettings* >(this)->mpData->maListBoxPreviewDefaultPixelSize = - Application::GetDefaultDevice()->LogicToPixel(mpData->maListBoxPreviewDefaultLogicSize, MAP_APPFONT); + const_cast< StyleSettings* >(this)->mxData->maListBoxPreviewDefaultPixelSize = + Application::GetDefaultDevice()->LogicToPixel(mxData->maListBoxPreviewDefaultLogicSize, MAP_APPFONT); } - return mpData->maListBoxPreviewDefaultPixelSize; + return mxData->maListBoxPreviewDefaultPixelSize; } void StyleSettings::Set3DColors( const Color& rColor ) { CopyData(); - mpData->maFaceColor = rColor; - mpData->maLightBorderColor = rColor; - mpData->maMenuBorderColor = rColor; - mpData->maDarkShadowColor = Color( COL_BLACK ); + mxData->maFaceColor = rColor; + mxData->maLightBorderColor = rColor; + mxData->maMenuBorderColor = rColor; + mxData->maDarkShadowColor = Color( COL_BLACK ); if ( rColor != Color( COL_LIGHTGRAY ) ) { - mpData->maLightColor = rColor; - mpData->maShadowColor = rColor; - mpData->maDarkShadowColor=rColor; - mpData->maLightColor.IncreaseLuminance( 64 ); - mpData->maShadowColor.DecreaseLuminance( 64 ); - mpData->maDarkShadowColor.DecreaseLuminance( 100 ); - sal_uLong nRed = mpData->maLightColor.GetRed(); - sal_uLong nGreen = mpData->maLightColor.GetGreen(); - sal_uLong nBlue = mpData->maLightColor.GetBlue(); - nRed += (sal_uLong)(mpData->maShadowColor.GetRed()); - nGreen += (sal_uLong)(mpData->maShadowColor.GetGreen()); - nBlue += (sal_uLong)(mpData->maShadowColor.GetBlue()); - mpData->maCheckedColor = Color( (sal_uInt8)(nRed/2), (sal_uInt8)(nGreen/2), (sal_uInt8)(nBlue/2) ); + mxData->maLightColor = rColor; + mxData->maShadowColor = rColor; + mxData->maDarkShadowColor=rColor; + mxData->maLightColor.IncreaseLuminance( 64 ); + mxData->maShadowColor.DecreaseLuminance( 64 ); + mxData->maDarkShadowColor.DecreaseLuminance( 100 ); + sal_uLong nRed = mxData->maLightColor.GetRed(); + sal_uLong nGreen = mxData->maLightColor.GetGreen(); + sal_uLong nBlue = mxData->maLightColor.GetBlue(); + nRed += (sal_uLong)(mxData->maShadowColor.GetRed()); + nGreen += (sal_uLong)(mxData->maShadowColor.GetGreen()); + nBlue += (sal_uLong)(mxData->maShadowColor.GetBlue()); + mxData->maCheckedColor = Color( (sal_uInt8)(nRed/2), (sal_uInt8)(nGreen/2), (sal_uInt8)(nBlue/2) ); } else { - mpData->maCheckedColor = Color( 0x99, 0x99, 0x99 ); - mpData->maLightColor = Color( COL_WHITE ); - mpData->maShadowColor = Color( COL_GRAY ); + mxData->maCheckedColor = Color( 0x99, 0x99, 0x99 ); + mxData->maLightColor = Color( COL_WHITE ); + mxData->maShadowColor = Color( COL_GRAY ); } } @@ -2051,20 +2049,20 @@ void StyleSettings::SetCheckedColorSpecialCase( ) CopyData(); // Light gray checked color special case if ( GetFaceColor() == COL_LIGHTGRAY ) - mpData->maCheckedColor = Color( 0xCC, 0xCC, 0xCC ); + mxData->maCheckedColor = Color( 0xCC, 0xCC, 0xCC ); else { - sal_uInt8 nRed = (sal_uInt8)(((sal_uInt16)mpData->maFaceColor.GetRed() + (sal_uInt16)mpData->maLightColor.GetRed())/2); - sal_uInt8 nGreen = (sal_uInt8)(((sal_uInt16)mpData->maFaceColor.GetGreen() + (sal_uInt16)mpData->maLightColor.GetGreen())/2); - sal_uInt8 nBlue = (sal_uInt8)(((sal_uInt16)mpData->maFaceColor.GetBlue() + (sal_uInt16)mpData->maLightColor.GetBlue())/2); - mpData->maCheckedColor = Color( nRed, nGreen, nBlue ); + sal_uInt8 nRed = (sal_uInt8)(((sal_uInt16)mxData->maFaceColor.GetRed() + (sal_uInt16)mxData->maLightColor.GetRed())/2); + sal_uInt8 nGreen = (sal_uInt8)(((sal_uInt16)mxData->maFaceColor.GetGreen() + (sal_uInt16)mxData->maLightColor.GetGreen())/2); + sal_uInt8 nBlue = (sal_uInt8)(((sal_uInt16)mxData->maFaceColor.GetBlue() + (sal_uInt16)mxData->maLightColor.GetBlue())/2); + mxData->maCheckedColor = Color( nRed, nGreen, nBlue ); } } bool StyleSettings::GetUseImagesInMenus() const { // icon mode selected in Tools -> Options... -> OpenOffice.org -> View - switch (mpData->meUseImagesInMenus) { + switch (mxData->meUseImagesInMenus) { case TRISTATE_FALSE: return false; case TRISTATE_TRUE: @@ -2161,7 +2159,7 @@ static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFoot if( rHeaderFooterBitmap.IsEmpty() ) { - boost::shared_ptr< comphelper::ConfigurationChanges > batch( comphelper::ConfigurationChanges::create() ); + std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); officecfg::Office::Common::Misc::Persona::set( "no", batch ); officecfg::Office::Common::Misc::PersonaSettings::set( "", batch ); batch->commit(); @@ -2170,26 +2168,26 @@ static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFoot const BitmapEx StyleSettings::GetPersonaHeader() const { - setupPersonaHeaderFooter( PERSONA_HEADER, mpData->maPersonaHeaderFooter, mpData->maPersonaHeaderBitmap, mpData->maPersonaMenuBarTextColor ); - return mpData->maPersonaHeaderBitmap; + setupPersonaHeaderFooter( PERSONA_HEADER, mxData->maPersonaHeaderFooter, mxData->maPersonaHeaderBitmap, mxData->maPersonaMenuBarTextColor ); + return mxData->maPersonaHeaderBitmap; } const BitmapEx StyleSettings::GetPersonaFooter() const { - setupPersonaHeaderFooter( PERSONA_FOOTER, mpData->maPersonaHeaderFooter, mpData->maPersonaFooterBitmap, mpData->maPersonaMenuBarTextColor ); - return mpData->maPersonaFooterBitmap; + setupPersonaHeaderFooter( PERSONA_FOOTER, mxData->maPersonaHeaderFooter, mxData->maPersonaFooterBitmap, mxData->maPersonaMenuBarTextColor ); + return mxData->maPersonaFooterBitmap; } const boost::optional<Color>& StyleSettings::GetPersonaMenuBarTextColor() const { GetPersonaHeader(); - return mpData->maPersonaMenuBarTextColor; + return mxData->maPersonaMenuBarTextColor; } void StyleSettings::SetStandardStyles() { CopyData(); - mpData->SetStandardStyles(); + mxData->SetStandardStyles(); } Color StyleSettings::GetFaceGradientColor() const @@ -2217,120 +2215,120 @@ Color StyleSettings::GetSeparatorColor() const void StyleSettings::CopyData() { // copy if other references exist - if ( ! mpData.unique() ) { - mpData = boost::make_shared<ImplStyleData>(*mpData); + if ( ! mxData.unique() ) { + mxData = std::make_shared<ImplStyleData>(*mxData); } } bool StyleSettings::operator ==( const StyleSettings& rSet ) const { - if ( mpData == rSet.mpData ) + if ( mxData == rSet.mxData ) return true; - if (mpData->mIconTheme != rSet.mpData->mIconTheme) { + if (mxData->mIconTheme != rSet.mxData->mIconTheme) { return false; } - if (*mpData->mIconThemeSelector != *rSet.mpData->mIconThemeSelector) { + if (*mxData->mIconThemeSelector != *rSet.mxData->mIconThemeSelector) { return false; } - if ( (mpData->mnOptions == rSet.mpData->mnOptions) && - (mpData->mbAutoMnemonic == rSet.mpData->mbAutoMnemonic) && - (mpData->mnDragFullOptions == rSet.mpData->mnDragFullOptions) && - (mpData->mnSelectionOptions == rSet.mpData->mnSelectionOptions) && - (mpData->mnDisplayOptions == rSet.mpData->mnDisplayOptions) && - (mpData->mnCursorSize == rSet.mpData->mnCursorSize) && - (mpData->mnCursorBlinkTime == rSet.mpData->mnCursorBlinkTime) && - (mpData->mnBorderSize == rSet.mpData->mnBorderSize) && - (mpData->mnTitleHeight == rSet.mpData->mnTitleHeight) && - (mpData->mnFloatTitleHeight == rSet.mpData->mnFloatTitleHeight) && - (mpData->mnTearOffTitleHeight == rSet.mpData->mnTearOffTitleHeight) && - (mpData->mnScrollBarSize == rSet.mpData->mnScrollBarSize) && - (mpData->mnMinThumbSize == rSet.mpData->mnMinThumbSize) && - (mpData->mnSplitSize == rSet.mpData->mnSplitSize) && - (mpData->mnSpinSize == rSet.mpData->mnSpinSize) && - (mpData->mnAntialiasedMin == rSet.mpData->mnAntialiasedMin) && - (mpData->mnScreenZoom == rSet.mpData->mnScreenZoom) && - (mpData->mnScreenFontZoom == rSet.mpData->mnScreenFontZoom) && - (mpData->mbHighContrast == rSet.mpData->mbHighContrast) && - (mpData->mbUseSystemUIFonts == rSet.mpData->mbUseSystemUIFonts) && - (mpData->mnUseFlatBorders == rSet.mpData->mnUseFlatBorders) && - (mpData->mnUseFlatMenus == rSet.mpData->mnUseFlatMenus) && - (mpData->maFaceColor == rSet.mpData->maFaceColor) && - (mpData->maCheckedColor == rSet.mpData->maCheckedColor) && - (mpData->maLightColor == rSet.mpData->maLightColor) && - (mpData->maLightBorderColor == rSet.mpData->maLightBorderColor) && - (mpData->maShadowColor == rSet.mpData->maShadowColor) && - (mpData->maDarkShadowColor == rSet.mpData->maDarkShadowColor) && - (mpData->maButtonTextColor == rSet.mpData->maButtonTextColor) && - (mpData->maRadioCheckTextColor == rSet.mpData->maRadioCheckTextColor) && - (mpData->maGroupTextColor == rSet.mpData->maGroupTextColor) && - (mpData->maLabelTextColor == rSet.mpData->maLabelTextColor) && - (mpData->maInfoTextColor == rSet.mpData->maInfoTextColor) && - (mpData->maWindowColor == rSet.mpData->maWindowColor) && - (mpData->maWindowTextColor == rSet.mpData->maWindowTextColor) && - (mpData->maDialogColor == rSet.mpData->maDialogColor) && - (mpData->maDialogTextColor == rSet.mpData->maDialogTextColor) && - (mpData->maWorkspaceColor == rSet.mpData->maWorkspaceColor) && - (mpData->maMonoColor == rSet.mpData->maMonoColor) && - (mpData->maFieldColor == rSet.mpData->maFieldColor) && - (mpData->maFieldTextColor == rSet.mpData->maFieldTextColor) && - (mpData->maActiveColor == rSet.mpData->maActiveColor) && - (mpData->maActiveTextColor == rSet.mpData->maActiveTextColor) && - (mpData->maActiveBorderColor == rSet.mpData->maActiveBorderColor) && - (mpData->maDeactiveColor == rSet.mpData->maDeactiveColor) && - (mpData->maDeactiveTextColor == rSet.mpData->maDeactiveTextColor) && - (mpData->maDeactiveBorderColor == rSet.mpData->maDeactiveBorderColor) && - (mpData->maMenuColor == rSet.mpData->maMenuColor) && - (mpData->maMenuBarColor == rSet.mpData->maMenuBarColor) && - (mpData->maMenuBarRolloverColor == rSet.mpData->maMenuBarRolloverColor) && - (mpData->maMenuBorderColor == rSet.mpData->maMenuBorderColor) && - (mpData->maMenuTextColor == rSet.mpData->maMenuTextColor) && - (mpData->maMenuBarTextColor == rSet.mpData->maMenuBarTextColor) && - (mpData->maMenuBarRolloverTextColor == rSet.mpData->maMenuBarRolloverTextColor) && - (mpData->maMenuHighlightColor == rSet.mpData->maMenuHighlightColor) && - (mpData->maMenuHighlightTextColor == rSet.mpData->maMenuHighlightTextColor) && - (mpData->maHighlightColor == rSet.mpData->maHighlightColor) && - (mpData->maHighlightTextColor == rSet.mpData->maHighlightTextColor) && - (mpData->maActiveTabColor == rSet.mpData->maActiveTabColor) && - (mpData->maInactiveTabColor == rSet.mpData->maInactiveTabColor) && - (mpData->maDisableColor == rSet.mpData->maDisableColor) && - (mpData->maHelpColor == rSet.mpData->maHelpColor) && - (mpData->maHelpTextColor == rSet.mpData->maHelpTextColor) && - (mpData->maLinkColor == rSet.mpData->maLinkColor) && - (mpData->maVisitedLinkColor == rSet.mpData->maVisitedLinkColor) && - (mpData->maHighlightLinkColor == rSet.mpData->maHighlightLinkColor) && - (mpData->maAppFont == rSet.mpData->maAppFont) && - (mpData->maHelpFont == rSet.mpData->maHelpFont) && - (mpData->maTitleFont == rSet.mpData->maTitleFont) && - (mpData->maFloatTitleFont == rSet.mpData->maFloatTitleFont) && - (mpData->maMenuFont == rSet.mpData->maMenuFont) && - (mpData->maToolFont == rSet.mpData->maToolFont) && - (mpData->maGroupFont == rSet.mpData->maGroupFont) && - (mpData->maLabelFont == rSet.mpData->maLabelFont) && - (mpData->maInfoFont == rSet.mpData->maInfoFont) && - (mpData->maRadioCheckFont == rSet.mpData->maRadioCheckFont) && - (mpData->maPushButtonFont == rSet.mpData->maPushButtonFont) && - (mpData->maFieldFont == rSet.mpData->maFieldFont) && - (mpData->maIconFont == rSet.mpData->maIconFont) && - (mpData->meUseImagesInMenus == rSet.mpData->meUseImagesInMenus) && - (mpData->mbPreferredUseImagesInMenus == rSet.mpData->mbPreferredUseImagesInMenus) && - (mpData->mbSkipDisabledInMenus == rSet.mpData->mbSkipDisabledInMenus) && - (mpData->mbHideDisabledMenuItems == rSet.mpData->mbHideDisabledMenuItems) && - (mpData->mbAcceleratorsInContextMenus == rSet.mpData->mbAcceleratorsInContextMenus)&& - (mpData->mbPrimaryButtonWarpsSlider == rSet.mpData->mbPrimaryButtonWarpsSlider) && - (mpData->maFontColor == rSet.mpData->maFontColor) && - (mpData->mnEdgeBlending == rSet.mpData->mnEdgeBlending) && - (mpData->maEdgeBlendingTopLeftColor == rSet.mpData->maEdgeBlendingTopLeftColor) && - (mpData->maEdgeBlendingBottomRightColor == rSet.mpData->maEdgeBlendingBottomRightColor) && - (mpData->mnListBoxMaximumLineCount == rSet.mpData->mnListBoxMaximumLineCount) && - (mpData->mnColorValueSetColumnCount == rSet.mpData->mnColorValueSetColumnCount) && - (mpData->mnColorValueSetMaximumRowCount == rSet.mpData->mnColorValueSetMaximumRowCount) && - (mpData->maListBoxPreviewDefaultLogicSize == rSet.mpData->maListBoxPreviewDefaultLogicSize) && - (mpData->maListBoxPreviewDefaultPixelSize == rSet.mpData->maListBoxPreviewDefaultPixelSize) && - (mpData->mnListBoxPreviewDefaultLineWidth == rSet.mpData->mnListBoxPreviewDefaultLineWidth) && - (mpData->mbPreviewUsesCheckeredBackground == rSet.mpData->mbPreviewUsesCheckeredBackground)) + if ( (mxData->mnOptions == rSet.mxData->mnOptions) && + (mxData->mbAutoMnemonic == rSet.mxData->mbAutoMnemonic) && + (mxData->mnDragFullOptions == rSet.mxData->mnDragFullOptions) && + (mxData->mnSelectionOptions == rSet.mxData->mnSelectionOptions) && + (mxData->mnDisplayOptions == rSet.mxData->mnDisplayOptions) && + (mxData->mnCursorSize == rSet.mxData->mnCursorSize) && + (mxData->mnCursorBlinkTime == rSet.mxData->mnCursorBlinkTime) && + (mxData->mnBorderSize == rSet.mxData->mnBorderSize) && + (mxData->mnTitleHeight == rSet.mxData->mnTitleHeight) && + (mxData->mnFloatTitleHeight == rSet.mxData->mnFloatTitleHeight) && + (mxData->mnTearOffTitleHeight == rSet.mxData->mnTearOffTitleHeight) && + (mxData->mnScrollBarSize == rSet.mxData->mnScrollBarSize) && + (mxData->mnMinThumbSize == rSet.mxData->mnMinThumbSize) && + (mxData->mnSplitSize == rSet.mxData->mnSplitSize) && + (mxData->mnSpinSize == rSet.mxData->mnSpinSize) && + (mxData->mnAntialiasedMin == rSet.mxData->mnAntialiasedMin) && + (mxData->mnScreenZoom == rSet.mxData->mnScreenZoom) && + (mxData->mnScreenFontZoom == rSet.mxData->mnScreenFontZoom) && + (mxData->mbHighContrast == rSet.mxData->mbHighContrast) && + (mxData->mbUseSystemUIFonts == rSet.mxData->mbUseSystemUIFonts) && + (mxData->mnUseFlatBorders == rSet.mxData->mnUseFlatBorders) && + (mxData->mnUseFlatMenus == rSet.mxData->mnUseFlatMenus) && + (mxData->maFaceColor == rSet.mxData->maFaceColor) && + (mxData->maCheckedColor == rSet.mxData->maCheckedColor) && + (mxData->maLightColor == rSet.mxData->maLightColor) && + (mxData->maLightBorderColor == rSet.mxData->maLightBorderColor) && + (mxData->maShadowColor == rSet.mxData->maShadowColor) && + (mxData->maDarkShadowColor == rSet.mxData->maDarkShadowColor) && + (mxData->maButtonTextColor == rSet.mxData->maButtonTextColor) && + (mxData->maRadioCheckTextColor == rSet.mxData->maRadioCheckTextColor) && + (mxData->maGroupTextColor == rSet.mxData->maGroupTextColor) && + (mxData->maLabelTextColor == rSet.mxData->maLabelTextColor) && + (mxData->maInfoTextColor == rSet.mxData->maInfoTextColor) && + (mxData->maWindowColor == rSet.mxData->maWindowColor) && + (mxData->maWindowTextColor == rSet.mxData->maWindowTextColor) && + (mxData->maDialogColor == rSet.mxData->maDialogColor) && + (mxData->maDialogTextColor == rSet.mxData->maDialogTextColor) && + (mxData->maWorkspaceColor == rSet.mxData->maWorkspaceColor) && + (mxData->maMonoColor == rSet.mxData->maMonoColor) && + (mxData->maFieldColor == rSet.mxData->maFieldColor) && + (mxData->maFieldTextColor == rSet.mxData->maFieldTextColor) && + (mxData->maActiveColor == rSet.mxData->maActiveColor) && + (mxData->maActiveTextColor == rSet.mxData->maActiveTextColor) && + (mxData->maActiveBorderColor == rSet.mxData->maActiveBorderColor) && + (mxData->maDeactiveColor == rSet.mxData->maDeactiveColor) && + (mxData->maDeactiveTextColor == rSet.mxData->maDeactiveTextColor) && + (mxData->maDeactiveBorderColor == rSet.mxData->maDeactiveBorderColor) && + (mxData->maMenuColor == rSet.mxData->maMenuColor) && + (mxData->maMenuBarColor == rSet.mxData->maMenuBarColor) && + (mxData->maMenuBarRolloverColor == rSet.mxData->maMenuBarRolloverColor) && + (mxData->maMenuBorderColor == rSet.mxData->maMenuBorderColor) && + (mxData->maMenuTextColor == rSet.mxData->maMenuTextColor) && + (mxData->maMenuBarTextColor == rSet.mxData->maMenuBarTextColor) && + (mxData->maMenuBarRolloverTextColor == rSet.mxData->maMenuBarRolloverTextColor) && + (mxData->maMenuHighlightColor == rSet.mxData->maMenuHighlightColor) && + (mxData->maMenuHighlightTextColor == rSet.mxData->maMenuHighlightTextColor) && + (mxData->maHighlightColor == rSet.mxData->maHighlightColor) && + (mxData->maHighlightTextColor == rSet.mxData->maHighlightTextColor) && + (mxData->maActiveTabColor == rSet.mxData->maActiveTabColor) && + (mxData->maInactiveTabColor == rSet.mxData->maInactiveTabColor) && + (mxData->maDisableColor == rSet.mxData->maDisableColor) && + (mxData->maHelpColor == rSet.mxData->maHelpColor) && + (mxData->maHelpTextColor == rSet.mxData->maHelpTextColor) && + (mxData->maLinkColor == rSet.mxData->maLinkColor) && + (mxData->maVisitedLinkColor == rSet.mxData->maVisitedLinkColor) && + (mxData->maHighlightLinkColor == rSet.mxData->maHighlightLinkColor) && + (mxData->maAppFont == rSet.mxData->maAppFont) && + (mxData->maHelpFont == rSet.mxData->maHelpFont) && + (mxData->maTitleFont == rSet.mxData->maTitleFont) && + (mxData->maFloatTitleFont == rSet.mxData->maFloatTitleFont) && + (mxData->maMenuFont == rSet.mxData->maMenuFont) && + (mxData->maToolFont == rSet.mxData->maToolFont) && + (mxData->maGroupFont == rSet.mxData->maGroupFont) && + (mxData->maLabelFont == rSet.mxData->maLabelFont) && + (mxData->maInfoFont == rSet.mxData->maInfoFont) && + (mxData->maRadioCheckFont == rSet.mxData->maRadioCheckFont) && + (mxData->maPushButtonFont == rSet.mxData->maPushButtonFont) && + (mxData->maFieldFont == rSet.mxData->maFieldFont) && + (mxData->maIconFont == rSet.mxData->maIconFont) && + (mxData->meUseImagesInMenus == rSet.mxData->meUseImagesInMenus) && + (mxData->mbPreferredUseImagesInMenus == rSet.mxData->mbPreferredUseImagesInMenus) && + (mxData->mbSkipDisabledInMenus == rSet.mxData->mbSkipDisabledInMenus) && + (mxData->mbHideDisabledMenuItems == rSet.mxData->mbHideDisabledMenuItems) && + (mxData->mbAcceleratorsInContextMenus == rSet.mxData->mbAcceleratorsInContextMenus)&& + (mxData->mbPrimaryButtonWarpsSlider == rSet.mxData->mbPrimaryButtonWarpsSlider) && + (mxData->maFontColor == rSet.mxData->maFontColor) && + (mxData->mnEdgeBlending == rSet.mxData->mnEdgeBlending) && + (mxData->maEdgeBlendingTopLeftColor == rSet.mxData->maEdgeBlendingTopLeftColor) && + (mxData->maEdgeBlendingBottomRightColor == rSet.mxData->maEdgeBlendingBottomRightColor) && + (mxData->mnListBoxMaximumLineCount == rSet.mxData->mnListBoxMaximumLineCount) && + (mxData->mnColorValueSetColumnCount == rSet.mxData->mnColorValueSetColumnCount) && + (mxData->mnColorValueSetMaximumRowCount == rSet.mxData->mnColorValueSetMaximumRowCount) && + (mxData->maListBoxPreviewDefaultLogicSize == rSet.mxData->maListBoxPreviewDefaultLogicSize) && + (mxData->maListBoxPreviewDefaultPixelSize == rSet.mxData->maListBoxPreviewDefaultPixelSize) && + (mxData->mnListBoxPreviewDefaultLineWidth == rSet.mxData->mnListBoxPreviewDefaultLineWidth) && + (mxData->mbPreviewUsesCheckeredBackground == rSet.mxData->mbPreviewUsesCheckeredBackground)) return true; else return false; @@ -2355,7 +2353,7 @@ ImplMiscData::ImplMiscData( const ImplMiscData& rData ) } MiscSettings::MiscSettings() -: mpData(boost::make_shared<ImplMiscData>()) + : mxData(std::make_shared<ImplMiscData>()) { } @@ -2366,19 +2364,19 @@ MiscSettings::~MiscSettings() void MiscSettings::CopyData() { // copy if other references exist - if ( ! mpData.unique() ) { - mpData = boost::make_shared<ImplMiscData>(*mpData); + if ( ! mxData.unique() ) { + mxData = std::make_shared<ImplMiscData>(*mxData); } } bool MiscSettings::operator ==( const MiscSettings& rSet ) const { - if ( mpData == rSet.mpData ) + if ( mxData == rSet.mxData ) return true; - if ( (mpData->mnEnableATT == rSet.mpData->mnEnableATT ) && - (mpData->mnDisablePrinting == rSet.mpData->mnDisablePrinting ) && - (mpData->mbEnableLocalizedDecimalSep == rSet.mpData->mbEnableLocalizedDecimalSep ) ) + if ( (mxData->mnEnableATT == rSet.mxData->mnEnableATT ) && + (mxData->mnDisablePrinting == rSet.mxData->mnDisablePrinting ) && + (mxData->mbEnableLocalizedDecimalSep == rSet.mxData->mbEnableLocalizedDecimalSep ) ) return true; else return false; @@ -2392,23 +2390,23 @@ MiscSettings::operator !=( const MiscSettings& rSet ) const bool MiscSettings::GetDisablePrinting() const { - if( mpData->mnDisablePrinting == TRISTATE_INDET ) + if( mxData->mnDisablePrinting == TRISTATE_INDET ) { OUString aEnable = vcl::SettingsConfigItem::get()-> getValue( OUString( "DesktopManagement" ), OUString( "DisablePrinting" ) ); - mpData->mnDisablePrinting = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE; + mxData->mnDisablePrinting = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE; } - return mpData->mnDisablePrinting != TRISTATE_FALSE; + return mxData->mnDisablePrinting != TRISTATE_FALSE; } bool MiscSettings::GetEnableATToolSupport() const { #ifdef WNT - if( mpData->mnEnableATT == TRISTATE_INDET ) + if( mxData->mnEnableATT == TRISTATE_INDET ) { // Check in the Windows registry if an AT tool wants Accessibility support to // be activated .. @@ -2428,18 +2426,18 @@ bool MiscSettings::GetEnableATToolSupport() const switch (dwType) { case REG_SZ: - mpData->mnEnableATT = ((0 == stricmp((const char *) Data, "1")) || (0 == stricmp((const char *) Data, "true"))) ? TRISTATE_TRUE : TRISTATE_FALSE; + mxData->mnEnableATT = ((0 == stricmp((const char *) Data, "1")) || (0 == stricmp((const char *) Data, "true"))) ? TRISTATE_TRUE : TRISTATE_FALSE; break; case REG_DWORD: switch (((DWORD *) Data)[0]) { case 0: - mpData->mnEnableATT = TRISTATE_FALSE; + mxData->mnEnableATT = TRISTATE_FALSE; break; case 1: - mpData->mnEnableATT = TRISTATE_TRUE; + mxData->mnEnableATT = TRISTATE_TRUE; break; default: - mpData->mnEnableATT = TRISTATE_INDET; + mxData->mnEnableATT = TRISTATE_INDET; //TODO: or TRISTATE_TRUE? break; } @@ -2455,7 +2453,7 @@ bool MiscSettings::GetEnableATToolSupport() const } #endif - if( mpData->mnEnableATT == TRISTATE_INDET ) + if( mxData->mnEnableATT == TRISTATE_INDET ) { static const char* pEnv = getenv("SAL_ACCESSIBILITY_ENABLED" ); if( !pEnv || !*pEnv ) @@ -2464,21 +2462,21 @@ bool MiscSettings::GetEnableATToolSupport() const vcl::SettingsConfigItem::get()-> getValue( OUString( "Accessibility" ), OUString( "EnableATToolSupport" ) ); - mpData->mnEnableATT = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE; + mxData->mnEnableATT = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE; } else { - mpData->mnEnableATT = TRISTATE_TRUE; + mxData->mnEnableATT = TRISTATE_TRUE; } } - return mpData->mnEnableATT != TRISTATE_FALSE; + return mxData->mnEnableATT != TRISTATE_FALSE; } #ifdef WNT void MiscSettings::SetEnableATToolSupport( bool bEnable ) { - if ( (bEnable ? TRISTATE_TRUE : TRISTATE_FALSE) != mpData->mnEnableATT ) + if ( (bEnable ? TRISTATE_TRUE : TRISTATE_FALSE) != mxData->mnEnableATT ) { if( bEnable && !ImplInitAccessBridge() ) return; @@ -2523,7 +2521,7 @@ void MiscSettings::SetEnableATToolSupport( bool bEnable ) setValue( OUString( "Accessibility" ), OUString( "EnableATToolSupport" ), bEnable ? OUString("true") : OUString("false" ) ); - mpData->mnEnableATT = bEnable ? TRISTATE_TRUE : TRISTATE_FALSE; + mxData->mnEnableATT = bEnable ? TRISTATE_TRUE : TRISTATE_FALSE; } } #endif @@ -2531,17 +2529,17 @@ void MiscSettings::SetEnableATToolSupport( bool bEnable ) void MiscSettings::SetEnableLocalizedDecimalSep( bool bEnable ) { CopyData(); - mpData->mbEnableLocalizedDecimalSep = bEnable; + mxData->mbEnableLocalizedDecimalSep = bEnable; } bool MiscSettings::GetEnableLocalizedDecimalSep() const { - return mpData->mbEnableLocalizedDecimalSep; + return mxData->mbEnableLocalizedDecimalSep; } bool MiscSettings::GetPseudoHeadless() const { - return mpData->mbPseudoHeadless; + return mxData->mbPseudoHeadless; } ImplHelpData::ImplHelpData() @@ -2559,7 +2557,7 @@ ImplHelpData::ImplHelpData( const ImplHelpData& rData ) } HelpSettings::HelpSettings() -: mpData(boost::make_shared<ImplHelpData>()) + : mxData(std::make_shared<ImplHelpData>()) { } @@ -2570,19 +2568,19 @@ HelpSettings::~HelpSettings() void HelpSettings::CopyData() { // copy if other references exist - if ( ! mpData.unique() ) { - mpData = boost::make_shared<ImplHelpData>(*mpData); + if ( ! mxData.unique() ) { + mxData = std::make_shared<ImplHelpData>(*mxData); } } bool HelpSettings::operator ==( const HelpSettings& rSet ) const { - if ( mpData == rSet.mpData ) + if ( mxData == rSet.mxData ) return true; - if ( (mpData->mnTipDelay == rSet.mpData->mnTipDelay ) && - (mpData->mnTipTimeout == rSet.mpData->mnTipTimeout ) && - (mpData->mnBalloonDelay == rSet.mpData->mnBalloonDelay ) ) + if ( (mxData->mnTipDelay == rSet.mxData->mnTipDelay ) && + (mxData->mnTipTimeout == rSet.mxData->mnTipTimeout ) && + (mxData->mnBalloonDelay == rSet.mxData->mnBalloonDelay ) ) return true; else return false; @@ -2591,26 +2589,26 @@ bool HelpSettings::operator ==( const HelpSettings& rSet ) const sal_uLong HelpSettings::GetTipDelay() const { - return mpData->mnTipDelay; + return mxData->mnTipDelay; } void HelpSettings::SetTipTimeout( sal_uLong nTipTimeout ) { CopyData(); - mpData->mnTipTimeout = nTipTimeout; + mxData->mnTipTimeout = nTipTimeout; } sal_uLong HelpSettings::GetTipTimeout() const { - return mpData->mnTipTimeout; + return mxData->mnTipTimeout; } sal_uLong HelpSettings::GetBalloonDelay() const { - return mpData->mnBalloonDelay; + return mxData->mnBalloonDelay; } bool @@ -2654,20 +2652,18 @@ ImplAllSettingsData::~ImplAllSettingsData() { delete mpLocaleDataWrapper; delete mpUILocaleDataWrapper; - if ( mpI18nHelper ) - delete mpI18nHelper; - if ( mpUII18nHelper ) - delete mpUII18nHelper; + delete mpI18nHelper; + delete mpUII18nHelper; } AllSettings::AllSettings() -: mpData(boost::make_shared<ImplAllSettingsData>()) + : mxData(std::make_shared<ImplAllSettingsData>()) { } AllSettings::AllSettings( const AllSettings& rSet ) { - mpData = rSet.mpData; + mxData = rSet.mxData; } AllSettings::~AllSettings() @@ -2677,8 +2673,8 @@ AllSettings::~AllSettings() void AllSettings::CopyData() { // copy if other references exist - if ( ! mpData.unique() ) { - mpData = boost::make_shared<ImplAllSettingsData>(*mpData); + if ( ! mxData.unique() ) { + mxData = std::make_shared<ImplAllSettingsData>(*mxData); } } @@ -2690,29 +2686,29 @@ AllSettingsFlags AllSettings::Update( AllSettingsFlags nFlags, const AllSettings if ( nFlags & AllSettingsFlags::STYLE ) { - if ( mpData->maStyleSettings != rSet.mpData->maStyleSettings ) + if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings ) { CopyData(); - mpData->maStyleSettings = rSet.mpData->maStyleSettings; + mxData->maStyleSettings = rSet.mxData->maStyleSettings; nChangeFlags |= AllSettingsFlags::STYLE; } } if ( nFlags & AllSettingsFlags::MISC ) { - if ( mpData->maMiscSettings != rSet.mpData->maMiscSettings ) + if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings ) { CopyData(); - mpData->maMiscSettings = rSet.mpData->maMiscSettings; + mxData->maMiscSettings = rSet.mxData->maMiscSettings; nChangeFlags |= AllSettingsFlags::MISC; } } if ( nFlags & AllSettingsFlags::LOCALE ) { - if ( mpData->maLocale != rSet.mpData->maLocale ) + if ( mxData->maLocale != rSet.mxData->maLocale ) { - SetLanguageTag( rSet.mpData->maLocale ); + SetLanguageTag( rSet.mxData->maLocale ); nChangeFlags |= AllSettingsFlags::LOCALE; } } @@ -2725,13 +2721,13 @@ AllSettingsFlags AllSettings::GetChangeFlags( const AllSettings& rSet ) const AllSettingsFlags nChangeFlags = AllSettingsFlags::NONE; - if ( mpData->maStyleSettings != rSet.mpData->maStyleSettings ) + if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings ) nChangeFlags |= AllSettingsFlags::STYLE; - if ( mpData->maMiscSettings != rSet.mpData->maMiscSettings ) + if ( mxData->maMiscSettings != rSet.mxData->maMiscSettings ) nChangeFlags |= AllSettingsFlags::MISC; - if ( mpData->maLocale != rSet.mpData->maLocale ) + if ( mxData->maLocale != rSet.mxData->maLocale ) nChangeFlags |= AllSettingsFlags::LOCALE; return nChangeFlags; @@ -2739,40 +2735,39 @@ AllSettingsFlags AllSettings::GetChangeFlags( const AllSettings& rSet ) const bool AllSettings::operator ==( const AllSettings& rSet ) const { - - if ( mpData == rSet.mpData ) + if ( mxData == rSet.mxData ) return true; - if ( (mpData->maMouseSettings == rSet.mpData->maMouseSettings) && - (mpData->maStyleSettings == rSet.mpData->maStyleSettings) && - (mpData->maMiscSettings == rSet.mpData->maMiscSettings) && - (mpData->maHelpSettings == rSet.mpData->maHelpSettings) && - (mpData->maLocale == rSet.mpData->maLocale) && - (mpData->mnWindowUpdate == rSet.mpData->mnWindowUpdate) ) + if ( (mxData->maMouseSettings == rSet.mxData->maMouseSettings) && + (mxData->maStyleSettings == rSet.mxData->maStyleSettings) && + (mxData->maMiscSettings == rSet.mxData->maMiscSettings) && + (mxData->maHelpSettings == rSet.mxData->maHelpSettings) && + (mxData->maLocale == rSet.mxData->maLocale) && + (mxData->mnWindowUpdate == rSet.mxData->mnWindowUpdate) ) { return true; } - else - return false; + + return false; } void AllSettings::SetLanguageTag( const LanguageTag& rLanguageTag ) { - if (mpData->maLocale != rLanguageTag) + if (mxData->maLocale != rLanguageTag) { CopyData(); - mpData->maLocale = rLanguageTag; + mxData->maLocale = rLanguageTag; - if ( mpData->mpLocaleDataWrapper ) + if ( mxData->mpLocaleDataWrapper ) { - delete mpData->mpLocaleDataWrapper; - mpData->mpLocaleDataWrapper = NULL; + delete mxData->mpLocaleDataWrapper; + mxData->mpLocaleDataWrapper = NULL; } - if ( mpData->mpI18nHelper ) + if ( mxData->mpI18nHelper ) { - delete mpData->mpI18nHelper; - mpData->mpI18nHelper = NULL; + delete mxData->mpI18nHelper; + mxData->mpI18nHelper = NULL; } } } @@ -2844,53 +2839,53 @@ bool AllSettings::GetMathLayoutRTL() const const LanguageTag& AllSettings::GetLanguageTag() const { // SYSTEM locale means: use settings from SvtSysLocale that is resolved - if ( mpData->maLocale.isSystemLocale() ) - mpData->maLocale = mpData->maSysLocale.GetLanguageTag(); + if ( mxData->maLocale.isSystemLocale() ) + mxData->maLocale = mxData->maSysLocale.GetLanguageTag(); - return mpData->maLocale; + return mxData->maLocale; } const LanguageTag& AllSettings::GetUILanguageTag() const { // the UILocale is never changed - if ( mpData->maUILocale.isSystemLocale() ) - mpData->maUILocale = mpData->maSysLocale.GetUILanguageTag(); + if ( mxData->maUILocale.isSystemLocale() ) + mxData->maUILocale = mxData->maSysLocale.GetUILanguageTag(); - return mpData->maUILocale; + return mxData->maUILocale; } const LocaleDataWrapper& AllSettings::GetLocaleDataWrapper() const { - if ( !mpData->mpLocaleDataWrapper ) - ((AllSettings*)this)->mpData->mpLocaleDataWrapper = new LocaleDataWrapper( + if ( !mxData->mpLocaleDataWrapper ) + ((AllSettings*)this)->mxData->mpLocaleDataWrapper = new LocaleDataWrapper( comphelper::getProcessComponentContext(), GetLanguageTag() ); - return *mpData->mpLocaleDataWrapper; + return *mxData->mpLocaleDataWrapper; } const LocaleDataWrapper& AllSettings::GetUILocaleDataWrapper() const { - if ( !mpData->mpUILocaleDataWrapper ) - ((AllSettings*)this)->mpData->mpUILocaleDataWrapper = new LocaleDataWrapper( + if ( !mxData->mpUILocaleDataWrapper ) + ((AllSettings*)this)->mxData->mpUILocaleDataWrapper = new LocaleDataWrapper( comphelper::getProcessComponentContext(), GetUILanguageTag() ); - return *mpData->mpUILocaleDataWrapper; + return *mxData->mpUILocaleDataWrapper; } const vcl::I18nHelper& AllSettings::GetLocaleI18nHelper() const { - if ( !mpData->mpI18nHelper ) { - ((AllSettings*)this)->mpData->mpI18nHelper = new vcl::I18nHelper( + if ( !mxData->mpI18nHelper ) { + ((AllSettings*)this)->mxData->mpI18nHelper = new vcl::I18nHelper( comphelper::getProcessComponentContext(), GetLanguageTag() ); } - return *mpData->mpI18nHelper; + return *mxData->mpI18nHelper; } const vcl::I18nHelper& AllSettings::GetUILocaleI18nHelper() const { - if ( !mpData->mpUII18nHelper ) { - ((AllSettings*)this)->mpData->mpUII18nHelper = new vcl::I18nHelper( + if ( !mxData->mpUII18nHelper ) { + ((AllSettings*)this)->mxData->mpUII18nHelper = new vcl::I18nHelper( comphelper::getProcessComponentContext(), GetUILanguageTag() ); } - return *mpData->mpUII18nHelper; + return *mxData->mpUII18nHelper; } void AllSettings::LocaleSettingsChanged( sal_uInt32 nHint ) @@ -2899,7 +2894,7 @@ void AllSettings::LocaleSettingsChanged( sal_uInt32 nHint ) if ( nHint & SYSLOCALEOPTIONS_HINT_DECSEP ) { MiscSettings aMiscSettings = aAllSettings.GetMiscSettings(); - bool bIsDecSepAsLocale = aAllSettings.mpData->maSysLocale.GetOptions().IsDecimalSeparatorAsLocale(); + bool bIsDecSepAsLocale = aAllSettings.mxData->maSysLocale.GetOptions().IsDecimalSeparatorAsLocale(); if ( aMiscSettings.GetEnableLocalizedDecimalSep() != bIsDecSepAsLocale ) { aMiscSettings.SetEnableLocalizedDecimalSep( bIsDecSepAsLocale ); @@ -2908,7 +2903,7 @@ void AllSettings::LocaleSettingsChanged( sal_uInt32 nHint ) } if ( (nHint & SYSLOCALEOPTIONS_HINT_LOCALE) ) - aAllSettings.SetLanguageTag( aAllSettings.mpData->maSysLocale.GetOptions().GetLanguageTag() ); + aAllSettings.SetLanguageTag( aAllSettings.mxData->maSysLocale.GetOptions().GetLanguageTag() ); Application::SetSettings( aAllSettings ); } @@ -2916,27 +2911,27 @@ void AllSettings::LocaleSettingsChanged( sal_uInt32 nHint ) const StyleSettings& AllSettings::GetStyleSettings() const { - return mpData->maStyleSettings; + return mxData->maStyleSettings; } sal_uLong StyleSettings::GetOptions() const { - return mpData->mnOptions; + return mxData->mnOptions; } std::vector<vcl::IconThemeInfo> StyleSettings::GetInstalledIconThemes() const { - return mpData->mIconThemeScanner->GetFoundIconThemes(); + return mxData->mIconThemeScanner->GetFoundIconThemes(); } /*static*/ OUString StyleSettings::GetAutomaticallyChosenIconTheme() const { OUString desktopEnvironment = Application::GetDesktopEnvironment(); - OUString themeName = mpData->mIconThemeSelector->SelectIconThemeForDesktopEnvironment( - mpData->mIconThemeScanner->GetFoundIconThemes(), + OUString themeName = mxData->mIconThemeSelector->SelectIconThemeForDesktopEnvironment( + mxData->mIconThemeScanner->GetFoundIconThemes(), desktopEnvironment ); return themeName; @@ -2946,15 +2941,15 @@ void StyleSettings::SetIconTheme(const OUString& theme) { CopyData(); - mpData->mIconTheme = theme; + mxData->mIconTheme = theme; } OUString StyleSettings::DetermineIconTheme() const { - OUString r = mpData->mIconThemeSelector->SelectIconTheme( - mpData->mIconThemeScanner->GetFoundIconThemes(), - mpData->mIconTheme + OUString r = mxData->mIconThemeSelector->SelectIconTheme( + mxData->mIconThemeScanner->GetFoundIconThemes(), + mxData->mIconTheme ); return r; } @@ -2962,77 +2957,77 @@ StyleSettings::DetermineIconTheme() const void StyleSettings::SetHighContrastMode(bool bHighContrast ) { - if (mpData->mbHighContrast == bHighContrast) { + if (mxData->mbHighContrast == bHighContrast) { return; } CopyData(); - mpData->mbHighContrast = bHighContrast; - mpData->mIconThemeSelector->SetUseHighContrastTheme(bHighContrast); + mxData->mbHighContrast = bHighContrast; + mxData->mIconThemeSelector->SetUseHighContrastTheme(bHighContrast); } bool StyleSettings::GetHighContrastMode() const { - return mpData->mbHighContrast; + return mxData->mbHighContrast; } void StyleSettings::SetPreferredIconTheme(const OUString& theme) { - mpData->mIconThemeSelector->SetPreferredIconTheme(theme); + mxData->mIconThemeSelector->SetPreferredIconTheme(theme); } void AllSettings::SetMouseSettings( const MouseSettings& rSet ) { CopyData(); - mpData->maMouseSettings = rSet; + mxData->maMouseSettings = rSet; } const MouseSettings& AllSettings::GetMouseSettings() const { - return mpData->maMouseSettings; + return mxData->maMouseSettings; } void AllSettings::SetStyleSettings( const StyleSettings& rSet ) { CopyData(); - mpData->maStyleSettings = rSet; + mxData->maStyleSettings = rSet; } void AllSettings::SetMiscSettings( const MiscSettings& rSet ) { CopyData(); - mpData->maMiscSettings = rSet; + mxData->maMiscSettings = rSet; } const MiscSettings& AllSettings::GetMiscSettings() const { - return mpData->maMiscSettings; + return mxData->maMiscSettings; } void AllSettings::SetHelpSettings( const HelpSettings& rSet ) { CopyData(); - mpData->maHelpSettings = rSet; + mxData->maHelpSettings = rSet; } const HelpSettings& AllSettings::GetHelpSettings() const { - return mpData->maHelpSettings; + return mxData->maHelpSettings; } AllSettingsFlags AllSettings::GetWindowUpdate() const { - return mpData->mnWindowUpdate; + return mxData->mnWindowUpdate; } bool @@ -3044,7 +3039,7 @@ AllSettings::operator !=( const AllSettings& rSet ) const SvtSysLocale& AllSettings::GetSysLocale() { - return mpData->maSysLocale; + return mxData->maSysLocale; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx index aca1962fc54d..576bb8c60ce9 100644 --- a/vcl/source/gdi/impimagetree.cxx +++ b/vcl/source/gdi/impimagetree.cxx @@ -21,8 +21,6 @@ #include "sal/config.h" -#include <boost/shared_ptr.hpp> - #include "com/sun/star/container/XNameAccess.hpp" #include "com/sun/star/io/XInputStream.hpp" #include "com/sun/star/lang/Locale.hpp" @@ -56,14 +54,14 @@ static OUString createPath(OUString const & name, sal_Int32 pos, OUString const return name.copy(0, pos + 1) + locale + name.copy(pos); } -static boost::shared_ptr< SvStream > wrapStream(css::uno::Reference< css::io::XInputStream > const & stream) +static std::shared_ptr<SvStream> wrapStream(css::uno::Reference< css::io::XInputStream > const & stream) { // This could use SvInputStream instead if that did not have a broken // SeekPos implementation for an XInputStream that is not also XSeekable // (cf. "@@@" at tags/DEV300_m37/svtools/source/misc1/strmadpt.cxx@264807 // l. 593): OSL_ASSERT(stream.is()); - boost::shared_ptr< SvStream > s(new SvMemoryStream); + std::shared_ptr<SvStream> s(std::make_shared<SvMemoryStream>()); for (;;) { sal_Int32 const size = 2048; @@ -77,17 +75,17 @@ static boost::shared_ptr< SvStream > wrapStream(css::uno::Reference< css::io::XI return s; } -static void loadImageFromStream(boost::shared_ptr< SvStream > pStream, OUString const & rPath, BitmapEx & rBitmap) +static void loadImageFromStream(std::shared_ptr<SvStream> xStream, OUString const & rPath, BitmapEx & rBitmap) { if (rPath.endsWith(".png")) { - vcl::PNGReader aPNGReader( *pStream ); + vcl::PNGReader aPNGReader(*xStream); aPNGReader.SetIgnoreGammaChunk( true ); rBitmap = aPNGReader.Read(); } else { - ReadDIBBitmapEx(rBitmap, *pStream); + ReadDIBBitmapEx(rBitmap, *xStream); } } @@ -288,12 +286,12 @@ void ImplImageTree::loadImageLinks() } } -void ImplImageTree::parseLinkFile(boost::shared_ptr< SvStream > pStream) +void ImplImageTree::parseLinkFile(std::shared_ptr<SvStream> xStream) { OString aLine; OUString aLink, aOriginal; int nLineNo = 0; - while ( pStream->ReadLine( aLine ) ) + while (xStream->ReadLine(aLine)) { ++nLineNo; if ( aLine.isEmpty() ) diff --git a/vcl/source/gdi/oldprintadaptor.cxx b/vcl/source/gdi/oldprintadaptor.cxx index 3270f75bcdfe..b1485a945f00 100644 --- a/vcl/source/gdi/oldprintadaptor.cxx +++ b/vcl/source/gdi/oldprintadaptor.cxx @@ -44,8 +44,8 @@ using namespace com::sun::star; using namespace com::sun::star::uno; using namespace com::sun::star::beans; -OldStylePrintAdaptor::OldStylePrintAdaptor( const boost::shared_ptr< Printer >& i_pPrinter ) - : PrinterController( i_pPrinter ) +OldStylePrintAdaptor::OldStylePrintAdaptor(const std::shared_ptr< Printer >& i_xPrinter) + : PrinterController(i_xPrinter) , mpData( new ImplOldStyleAdaptorData() ) { } @@ -64,12 +64,12 @@ void OldStylePrintAdaptor::StartPage() getPrinter()->SetConnectMetaFile( &mpData->maPages.back().maPage ); // copy state into metafile - boost::shared_ptr<Printer> pPrinter( getPrinter() ); - pPrinter->SetMapMode( pPrinter->GetMapMode() ); - pPrinter->SetFont( pPrinter->GetFont() ); - pPrinter->SetDrawMode( pPrinter->GetDrawMode() ); - pPrinter->SetLineColor( pPrinter->GetLineColor() ); - pPrinter->SetFillColor( pPrinter->GetFillColor() ); + std::shared_ptr<Printer> xPrinter(getPrinter()); + xPrinter->SetMapMode(xPrinter->GetMapMode()); + xPrinter->SetFont(xPrinter->GetFont()); + xPrinter->SetDrawMode(xPrinter->GetDrawMode()); + xPrinter->SetLineColor(xPrinter->GetLineColor()); + xPrinter->SetFillColor(xPrinter->GetFillColor()); } void OldStylePrintAdaptor::EndPage() diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 16caf5262b8a..bfabad1374d5 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -140,7 +140,7 @@ public: typedef std::unordered_map< OUString, ControlDependency, OUStringHash > ControlDependencyMap; typedef std::unordered_map< OUString, Sequence< sal_Bool >, OUStringHash > ChoiceDisableMap; - boost::shared_ptr<Printer> mpPrinter; + std::shared_ptr<Printer> mxPrinter; Sequence< PropertyValue > maUIOptions; std::vector< PropertyValue > maUIProperties; std::vector< bool > maUIPropertyEnabled; @@ -207,10 +207,10 @@ public: void resetPaperToLastConfigured(); }; -PrinterController::PrinterController( const boost::shared_ptr<Printer>& i_pPrinter ) +PrinterController::PrinterController(const std::shared_ptr<Printer>& i_xPrinter) : mpImplData( new ImplPrinterControllerData ) { - mpImplData->mpPrinter = i_pPrinter; + mpImplData->mxPrinter = i_xPrinter; } static OUString queryFile( Printer* pPrinter ) @@ -259,13 +259,12 @@ static OUString queryFile( Printer* pPrinter ) struct PrintJobAsync { - boost::shared_ptr<PrinterController> mpController; + std::shared_ptr<PrinterController> mxController; JobSetup maInitSetup; - PrintJobAsync( const boost::shared_ptr<PrinterController>& i_pController, - const JobSetup& i_rInitSetup - ) - : mpController( i_pController ), maInitSetup( i_rInitSetup ) + PrintJobAsync(const std::shared_ptr<PrinterController>& i_xController, + const JobSetup& i_rInitSetup) + : mxController( i_xController ), maInitSetup( i_rInitSetup ) {} DECL_LINK( ExecJob, void* ); @@ -273,7 +272,7 @@ struct PrintJobAsync IMPL_LINK_NOARG(PrintJobAsync, ExecJob) { - Printer::ImplPrintJob( mpController, maInitSetup ); + Printer::ImplPrintJob(mxController, maInitSetup); // clean up, do not access members after this delete this; @@ -281,42 +280,38 @@ IMPL_LINK_NOARG(PrintJobAsync, ExecJob) return 0; } -void Printer::PrintJob( const boost::shared_ptr<PrinterController>& i_pController, - const JobSetup& i_rInitSetup - ) +void Printer::PrintJob(const std::shared_ptr<PrinterController>& i_xController, + const JobSetup& i_rInitSetup) { bool bSynchronous = false; - PropertyValue* pVal = i_pController->getValue( OUString( "Wait" ) ); + PropertyValue* pVal = i_xController->getValue( OUString( "Wait" ) ); if( pVal ) pVal->Value >>= bSynchronous; if( bSynchronous ) - ImplPrintJob( i_pController, i_rInitSetup ); + ImplPrintJob(i_xController, i_rInitSetup); else { - PrintJobAsync* pAsync = new PrintJobAsync( i_pController, i_rInitSetup ); + PrintJobAsync* pAsync = new PrintJobAsync(i_xController, i_rInitSetup); Application::PostUserEvent( LINK( pAsync, PrintJobAsync, ExecJob ) ); } } -void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pController, - const JobSetup& i_rInitSetup - ) +void Printer::ImplPrintJob(const std::shared_ptr<PrinterController>& i_xController, + const JobSetup& i_rInitSetup) { - boost::shared_ptr<PrinterController> pController( i_pController ); + std::shared_ptr<PrinterController> xController(i_xController); // check if there is a default printer; if not, show an error box (if appropriate) if( GetDefaultPrinterName().isEmpty() ) { - if( pController->isShowDialogs() - // && ! pController->isDirectPrint() - ) + if (xController->isShowDialogs()) { MessageDialog aBox(NULL, "ErrorNoPrinterDialog", "vcl/ui/errornoprinterdialog.ui"); aBox.Execute(); } - pController->setValue( OUString( "IsDirect" ), + xController->setValue( OUString( "IsDirect" ), makeAny( false ) ); } @@ -324,16 +319,16 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr // #i114306# changed behavior back from persistence // if no specific printer is already set, create the default printer - if( ! pController->getPrinter() ) + if (!xController->getPrinter()) { OUString aPrinterName( i_rInitSetup.GetPrinterName() ); - boost::shared_ptr<Printer> pPrinter( new Printer( aPrinterName ) ); - pPrinter->SetJobSetup( i_rInitSetup ); - pController->setPrinter( pPrinter ); + std::shared_ptr<Printer> xPrinter(std::make_shared<Printer>(aPrinterName)); + xPrinter->SetJobSetup(i_rInitSetup); + xController->setPrinter(xPrinter); } // reset last page property - i_pController->setLastPage( false ); + i_xController->setLastPage(false); // update "PageRange" property inferring from other properties: // case 1: "Pages" set from UNO API -> @@ -345,12 +340,12 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr // "Pages" attribute from API is now equivalent to "PageRange" // AND "PrintContent" = 1 except calc where it is "PrintRange" = 1 // Argh ! That sure needs cleaning up - PropertyValue* pContentVal = i_pController->getValue( OUString( "PrintRange" ) ); + PropertyValue* pContentVal = i_xController->getValue(OUString("PrintRange")); if( ! pContentVal ) - pContentVal = i_pController->getValue( OUString( "PrintContent" ) ); + pContentVal = i_xController->getValue(OUString("PrintContent")); // case 1: UNO API has set "Pages" - PropertyValue* pPagesVal = i_pController->getValue( OUString( "Pages" ) ); + PropertyValue* pPagesVal = i_xController->getValue(OUString("Pages")); if( pPagesVal ) { OUString aPagesVal; @@ -363,7 +358,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr if( pContentVal ) { pContentVal->Value = makeAny( sal_Int32( 1 ) ); - i_pController->setValue( OUString( "PageRange" ), pPagesVal->Value ); + i_xController->setValue(OUString("PageRange"), pPagesVal->Value); } } } @@ -376,13 +371,13 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr if( nContent == 0 ) { // do not overwrite PageRange if it is already set - PropertyValue* pRangeVal = i_pController->getValue( OUString( "PageRange" ) ); + PropertyValue* pRangeVal = i_xController->getValue(OUString("PageRange")); OUString aRange; if( pRangeVal ) pRangeVal->Value >>= aRange; if( aRange.isEmpty() ) { - sal_Int32 nPages = i_pController->getPageCount(); + sal_Int32 nPages = i_xController->getPageCount(); if( nPages > 0 ) { OUStringBuffer aBuf( 32 ); @@ -392,59 +387,59 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr aBuf.appendAscii( "-" ); aBuf.append( nPages ); } - i_pController->setValue( OUString( "PageRange" ), makeAny( aBuf.makeStringAndClear() ) ); + i_xController->setValue(OUString("PageRange"), makeAny(aBuf.makeStringAndClear())); } } } } } - PropertyValue* pReverseVal = i_pController->getValue( OUString( "PrintReverse" ) ); + PropertyValue* pReverseVal = i_xController->getValue(OUString("PrintReverse")); if( pReverseVal ) { bool bReverse = false; pReverseVal->Value >>= bReverse; - pController->setReversePrint( bReverse ); + xController->setReversePrint( bReverse ); } - PropertyValue* pPapersizeFromSetupVal = i_pController->getValue( OUString( "PapersizeFromSetup" ) ); + PropertyValue* pPapersizeFromSetupVal = i_xController->getValue(OUString("PapersizeFromSetup")); if( pPapersizeFromSetupVal ) { bool bPapersizeFromSetup = false; pPapersizeFromSetupVal->Value >>= bPapersizeFromSetup; - pController->setPapersizeFromSetup( bPapersizeFromSetup ); + xController->setPapersizeFromSetup(bPapersizeFromSetup); } // setup NUp printing from properties - sal_Int32 nRows = i_pController->getIntProperty( OUString( "NUpRows" ), 1 ); - sal_Int32 nCols = i_pController->getIntProperty( OUString( "NUpColumns" ), 1 ); + sal_Int32 nRows = i_xController->getIntProperty(OUString("NUpRows"), 1); + sal_Int32 nCols = i_xController->getIntProperty(OUString("NUpColumns"), 1); if( nRows > 1 || nCols > 1 ) { PrinterController::MultiPageSetup aMPS; aMPS.nRows = nRows > 1 ? nRows : 1; aMPS.nColumns = nCols > 1 ? nCols : 1; - sal_Int32 nValue = i_pController->getIntProperty( OUString( "NUpPageMarginLeft" ), aMPS.nLeftMargin ); + sal_Int32 nValue = i_xController->getIntProperty(OUString("NUpPageMarginLeft"), aMPS.nLeftMargin); if( nValue >= 0 ) aMPS.nLeftMargin = nValue; - nValue = i_pController->getIntProperty( OUString( "NUpPageMarginRight" ), aMPS.nRightMargin ); + nValue = i_xController->getIntProperty(OUString("NUpPageMarginRight"), aMPS.nRightMargin); if( nValue >= 0 ) aMPS.nRightMargin = nValue; - nValue = i_pController->getIntProperty( OUString( "NUpPageMarginTop" ), aMPS.nTopMargin ); + nValue = i_xController->getIntProperty( OUString( "NUpPageMarginTop" ), aMPS.nTopMargin ); if( nValue >= 0 ) aMPS.nTopMargin = nValue; - nValue = i_pController->getIntProperty( OUString( "NUpPageMarginBottom" ), aMPS.nBottomMargin ); + nValue = i_xController->getIntProperty( OUString( "NUpPageMarginBottom" ), aMPS.nBottomMargin ); if( nValue >= 0 ) aMPS.nBottomMargin = nValue; - nValue = i_pController->getIntProperty( OUString( "NUpHorizontalSpacing" ), aMPS.nHorizontalSpacing ); + nValue = i_xController->getIntProperty( OUString( "NUpHorizontalSpacing" ), aMPS.nHorizontalSpacing ); if( nValue >= 0 ) aMPS.nHorizontalSpacing = nValue; - nValue = i_pController->getIntProperty( OUString( "NUpVerticalSpacing" ), aMPS.nVerticalSpacing ); + nValue = i_xController->getIntProperty( OUString( "NUpVerticalSpacing" ), aMPS.nVerticalSpacing ); if( nValue >= 0 ) aMPS.nVerticalSpacing = nValue; - aMPS.bDrawBorder = i_pController->getBoolProperty( OUString( "NUpDrawBorder" ), aMPS.bDrawBorder ); - aMPS.nOrder = static_cast<PrinterController::NupOrderType>(i_pController->getIntProperty( OUString( "NUpSubPageOrder" ), aMPS.nOrder )); - aMPS.aPaperSize = i_pController->getPrinter()->PixelToLogic( i_pController->getPrinter()->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ); - PropertyValue* pPgSizeVal = i_pController->getValue( OUString( "NUpPaperSize" ) ); + aMPS.bDrawBorder = i_xController->getBoolProperty( OUString( "NUpDrawBorder" ), aMPS.bDrawBorder ); + aMPS.nOrder = static_cast<PrinterController::NupOrderType>(i_xController->getIntProperty( OUString( "NUpSubPageOrder" ), aMPS.nOrder )); + aMPS.aPaperSize = i_xController->getPrinter()->PixelToLogic( i_xController->getPrinter()->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ); + PropertyValue* pPgSizeVal = i_xController->getValue( OUString( "NUpPaperSize" ) ); awt::Size aSizeVal; if( pPgSizeVal && (pPgSizeVal->Value >>= aSizeVal) ) { @@ -452,14 +447,14 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr aMPS.aPaperSize.Height() = aSizeVal.Height; } - i_pController->setMultipage( aMPS ); + i_xController->setMultipage( aMPS ); } // in direct print case check whether there is anything to print. // if not, show an errorbox (if appropriate) - if( pController->isShowDialogs() && pController->isDirectPrint() ) + if( xController->isShowDialogs() && xController->isDirectPrint() ) { - if( pController->getFilteredPageCount() == 0 ) + if( xController->getFilteredPageCount() == 0 ) { MessageDialog aBox(NULL, "ErrorNoContentDialog", "vcl/ui/errornocontentdialog.ui"); @@ -470,33 +465,33 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr // check if the printer brings up its own dialog // in that case leave the work to that dialog - if( ! pController->getPrinter()->GetCapabilities( PRINTER_CAPABILITIES_EXTERNALDIALOG ) && - ! pController->isDirectPrint() && - pController->isShowDialogs() + if( ! xController->getPrinter()->GetCapabilities( PRINTER_CAPABILITIES_EXTERNALDIALOG ) && + ! xController->isDirectPrint() && + xController->isShowDialogs() ) { try { - PrintDialog aDlg( NULL, i_pController ); + PrintDialog aDlg( NULL, i_xController ); if( ! aDlg.Execute() ) { - i_pController->abortJob(); + i_xController->abortJob(); return; } if( aDlg.isPrintToFile() ) { - OUString aFile = queryFile( pController->getPrinter().get() ); + OUString aFile = queryFile( xController->getPrinter().get() ); if( aFile.isEmpty() ) { - i_pController->abortJob(); + i_xController->abortJob(); return; } - pController->setValue( OUString( "LocalFileName" ), + xController->setValue( OUString( "LocalFileName" ), makeAny( aFile ) ); } else if( aDlg.isSingleJobs() ) { - pController->setValue( OUString( "PrintCollateAsSingleJobs" ), + xController->setValue( OUString( "PrintCollateAsSingleJobs" ), makeAny( true ) ); } } @@ -505,21 +500,21 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr } } - pController->pushPropertiesToPrinter(); + xController->pushPropertiesToPrinter(); OUString aJobName; - PropertyValue* pJobNameVal = pController->getValue( OUString( "JobName" ) ); + PropertyValue* pJobNameVal = xController->getValue( OUString( "JobName" ) ); if( pJobNameVal ) pJobNameVal->Value >>= aJobName; - pController->getPrinter()->StartJob( aJobName, pController ); + xController->getPrinter()->StartJob( aJobName, xController ); - pController->resetPaperToLastConfigured(); + xController->resetPaperToLastConfigured(); - pController->jobFinished( pController->getJobState() ); + xController->jobFinished( xController->getJobState() ); } -bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::PrinterController>& i_pController ) +bool Printer::StartJob( const OUString& i_rJobName, std::shared_ptr<vcl::PrinterController>& i_xController) { mnError = PRINTER_OK; @@ -556,17 +551,17 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print ImplSVData* pSVData = ImplGetSVData(); mpPrinter = pSVData->mpDefInst->CreatePrinter( mpInfoPrinter ); - if ( !mpPrinter ) + if (!mpPrinter) return false; bool bSinglePrintJobs = false; - PropertyValue* pSingleValue = i_pController->getValue( OUString( "PrintCollateAsSingleJobs" ) ); + PropertyValue* pSingleValue = i_xController->getValue(OUString("PrintCollateAsSingleJobs")); if( pSingleValue ) { pSingleValue->Value >>= bSinglePrintJobs; } - PropertyValue* pFileValue = i_pController->getValue( OUString( "LocalFileName" ) ); + PropertyValue* pFileValue = i_xController->getValue(OUString("LocalFileName")); if( pFileValue ) { OUString aFile; @@ -599,13 +594,13 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print i_rJobName, Application::GetDisplayName(), maJobSetup.ImplGetConstData(), - *i_pController ) ) + *i_xController) ) { EndJob(); } else { - mnError = ImplSalPrinterErrorCodeToVCL( mpPrinter->GetErrorCode() ); + mnError = ImplSalPrinterErrorCodeToVCL(mpPrinter->GetErrorCode()); if ( !mnError ) mnError = PRINTER_GENERALERROR; pSVData->mpDefInst->DestroyPrinter( mpPrinter ); @@ -616,8 +611,8 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print mbJobActive = false; GDIMetaFile aDummyFile; - i_pController->setLastPage(true); - i_pController->getFilteredPageFile(0, aDummyFile); + i_xController->setLastPage(true); + i_xController->getFilteredPageFile(0, aDummyFile); return false; } @@ -626,8 +621,8 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print { // possibly a dialog has been shown // now the real job starts - i_pController->setJobState( view::PrintableState_JOB_STARTED ); - i_pController->jobStarted(); + i_xController->setJobState( view::PrintableState_JOB_STARTED ); + i_xController->jobStarted(); int nJobs = 1; int nOuterRepeatCount = 1; @@ -654,16 +649,16 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print Application::GetDisplayName(), nCopies, bCollateCopy, - i_pController->isDirectPrint(), + i_xController->isDirectPrint(), maJobSetup.ImplGetConstData() ) ) { mbJobActive = true; - i_pController->createProgressDialog(); - const int nPages = i_pController->getFilteredPageCount(); + i_xController->createProgressDialog(); + const int nPages = i_xController->getFilteredPageCount(); // abort job, if no pages will be printed. if ( nPages == 0 ) { - i_pController->abortJob(); + i_xController->abortJob(); bAborted = true; } for( int nOuterIteration = 0; nOuterIteration < nOuterRepeatCount && ! bAborted; nOuterIteration++ ) @@ -677,14 +672,14 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print nInnerIteration == nInnerRepeatCount-1 && nJobIteration == nJobs-1 ) { - i_pController->setLastPage( true ); + i_xController->setLastPage(true); } - i_pController->printFilteredPage( nPage ); - if( i_pController->isProgressCanceled() ) + i_xController->printFilteredPage(nPage); + if (i_xController->isProgressCanceled()) { - i_pController->abortJob(); + i_xController->abortJob(); } - if (i_pController->getJobState() == + if (i_xController->getJobState() == view::PrintableState_JOB_ABORTED) { bAborted = true; @@ -718,7 +713,7 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print mnError = mpPrinter ? ImplSalPrinterErrorCodeToVCL(mpPrinter->GetErrorCode()) : 0; if ( !mnError ) mnError = PRINTER_GENERALERROR; - i_pController->setJobState( mnError == PRINTER_ABORT + i_xController->setJobState( mnError == PRINTER_ABORT ? view::PrintableState_JOB_ABORTED : view::PrintableState_JOB_FAILED ); if( mpPrinter ) @@ -732,12 +727,12 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print } } - if( i_pController->getJobState() == view::PrintableState_JOB_STARTED ) - i_pController->setJobState( view::PrintableState_JOB_SPOOLED ); + if (i_xController->getJobState() == view::PrintableState_JOB_STARTED) + i_xController->setJobState(view::PrintableState_JOB_SPOOLED); } // make last used printer persistent for UI jobs - if( i_pController->isShowDialogs() && ! i_pController->isDirectPrint() ) + if (i_xController->isShowDialogs() && !i_xController->isDirectPrint()) { SettingsConfigItem* pItem = SettingsConfigItem::get(); pItem->setValue( OUString( "PrintDialog" ), @@ -764,21 +759,21 @@ void PrinterController::setJobState( view::PrintableState i_eState ) mpImplData->meJobState = i_eState; } -const boost::shared_ptr<Printer>& PrinterController::getPrinter() const +const std::shared_ptr<Printer>& PrinterController::getPrinter() const { - return mpImplData->mpPrinter; + return mpImplData->mxPrinter; } -void PrinterController::setPrinter( const boost::shared_ptr<Printer>& i_rPrinter ) +void PrinterController::setPrinter(const std::shared_ptr<Printer>& i_rPrinter) { - mpImplData->mpPrinter = i_rPrinter; + mpImplData->mxPrinter = i_rPrinter; setValue( OUString( "Name" ), makeAny( OUString( i_rPrinter->GetName() ) ) ); - mpImplData->mnDefaultPaperBin = mpImplData->mpPrinter->GetPaperBin(); - mpImplData->mpPrinter->Push(); - mpImplData->mpPrinter->SetMapMode(MapMode(MAP_100TH_MM)); - mpImplData->maDefaultPageSize = mpImplData->mpPrinter->GetPaperSize(); - mpImplData->mpPrinter->Pop(); + mpImplData->mnDefaultPaperBin = mpImplData->mxPrinter->GetPaperBin(); + mpImplData->mxPrinter->Push(); + mpImplData->mxPrinter->SetMapMode(MapMode(MAP_100TH_MM)); + mpImplData->maDefaultPageSize = mpImplData->mxPrinter->GetPaperSize(); + mpImplData->mxPrinter->Pop(); mpImplData->mnFixedPaperBin = -1; } @@ -786,28 +781,28 @@ void PrinterController::resetPrinterOptions( bool i_bFileOutput ) { PrinterOptions aOpt; aOpt.ReadFromConfig( i_bFileOutput ); - mpImplData->mpPrinter->SetPrinterOptions( aOpt ); + mpImplData->mxPrinter->SetPrinterOptions( aOpt ); } bool PrinterController::setupPrinter( vcl::Window* i_pParent ) { bool bRet = false; - if( mpImplData->mpPrinter.get() ) + if( mpImplData->mxPrinter.get() ) { - mpImplData->mpPrinter->Push(); - mpImplData->mpPrinter->SetMapMode(MapMode(MAP_100TH_MM)); + mpImplData->mxPrinter->Push(); + mpImplData->mxPrinter->SetMapMode(MapMode(MAP_100TH_MM)); // get current data - Size aPaperSize(mpImplData->mpPrinter->GetPaperSize()); - sal_uInt16 nPaperBin = mpImplData->mpPrinter->GetPaperBin(); + Size aPaperSize(mpImplData->mxPrinter->GetPaperSize()); + sal_uInt16 nPaperBin = mpImplData->mxPrinter->GetPaperBin(); // reset paper size back to last configured size, not // whatever happens to be the current page resetPaperToLastConfigured(); // call driver setup - bRet = mpImplData->mpPrinter->Setup( i_pParent ); - Size aNewPaperSize(mpImplData->mpPrinter->GetPaperSize()); + bRet = mpImplData->mxPrinter->Setup( i_pParent ); + Size aNewPaperSize(mpImplData->mxPrinter->GetPaperSize()); if (bRet) { bool bInvalidateCache = false; @@ -821,7 +816,7 @@ bool PrinterController::setupPrinter( vcl::Window* i_pParent ) } // was bin overridden ? if so we need to take action - sal_uInt16 nNewPaperBin = mpImplData->mpPrinter->GetPaperBin(); + sal_uInt16 nNewPaperBin = mpImplData->mxPrinter->GetPaperBin(); if (nNewPaperBin != nPaperBin) { mpImplData->mnFixedPaperBin = nNewPaperBin; @@ -837,9 +832,9 @@ bool PrinterController::setupPrinter( vcl::Window* i_pParent ) { //restore to whatever it was before we entered this method if (aPaperSize != aNewPaperSize) - mpImplData->mpPrinter->SetPaperSizeUser(aPaperSize, !mpImplData->isFixedPageSize()); + mpImplData->mxPrinter->SetPaperSizeUser(aPaperSize, !mpImplData->isFixedPageSize()); } - mpImplData->mpPrinter->Pop(); + mpImplData->mxPrinter->Pop(); } return bRet; } @@ -847,7 +842,7 @@ bool PrinterController::setupPrinter( vcl::Window* i_pParent ) PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( const Sequence< PropertyValue >& i_rProps, bool bNoNUP ) { PrinterController::PageSize aPageSize; - aPageSize.aSize = mpPrinter->GetPaperSize(); + aPageSize.aSize = mxPrinter->GetPaperSize(); awt::Size aSetSize, aIsSize; sal_Int32 nPaperBin = mnDefaultPaperBin; for( sal_Int32 nProperty = 0, nPropertyCount = i_rProps.getLength(); nProperty < nPropertyCount; ++nProperty ) @@ -870,12 +865,12 @@ PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( cons { sal_Int32 nBin = -1; i_rProps[ nProperty ].Value >>= nBin; - if( nBin >= 0 && nBin < mpPrinter->GetPaperBinCount() ) + if( nBin >= 0 && nBin < mxPrinter->GetPaperBinCount() ) nPaperBin = nBin; } } - Size aCurSize( mpPrinter->GetPaperSize() ); + Size aCurSize( mxPrinter->GetPaperSize() ); if( aSetSize.Width && aSetSize.Height ) { Size aSetPaperSize( aSetSize.Width, aSetSize.Height ); @@ -891,7 +886,7 @@ PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( cons Size aRealPaperSize( getRealPaperSize( aPageSize.aSize, bNoNUP ) ); if( aRealPaperSize != aCurSize ) - mpPrinter->SetPaperSizeUser( aRealPaperSize, ! isFixedPageSize() ); + mxPrinter->SetPaperSizeUser( aRealPaperSize, ! isFixedPageSize() ); } // paper bin set from properties in print dialog overrides @@ -899,8 +894,8 @@ PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( cons if ( mnFixedPaperBin != -1 ) nPaperBin = mnFixedPaperBin; - if( nPaperBin != -1 && nPaperBin != mpPrinter->GetPaperBin() ) - mpPrinter->SetPaperBin( nPaperBin ); + if( nPaperBin != -1 && nPaperBin != mxPrinter->GetPaperBin() ) + mxPrinter->SetPaperBin( nPaperBin ); return aPageSize; } @@ -916,22 +911,22 @@ PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( cons //print dialog void vcl::ImplPrinterControllerData::resetPaperToLastConfigured() { - mpPrinter->Push(); - mpPrinter->SetMapMode(MapMode(MAP_100TH_MM)); - Size aCurSize(mpPrinter->GetPaperSize()); + mxPrinter->Push(); + mxPrinter->SetMapMode(MapMode(MAP_100TH_MM)); + Size aCurSize(mxPrinter->GetPaperSize()); if (aCurSize != maDefaultPageSize) - mpPrinter->SetPaperSizeUser(maDefaultPageSize, !isFixedPageSize()); - mpPrinter->Pop(); + mxPrinter->SetPaperSizeUser(maDefaultPageSize, !isFixedPageSize()); + mxPrinter->Pop(); } int PrinterController::getPageCountProtected() const { const MapMode aMapMode( MAP_100TH_MM ); - mpImplData->mpPrinter->Push(); - mpImplData->mpPrinter->SetMapMode( aMapMode ); + mpImplData->mxPrinter->Push(); + mpImplData->mxPrinter->SetMapMode( aMapMode ); int nPages = getPageCount(); - mpImplData->mpPrinter->Pop(); + mpImplData->mxPrinter->Pop(); return nPages; } @@ -939,10 +934,10 @@ Sequence< PropertyValue > PrinterController::getPageParametersProtected( int i_n { const MapMode aMapMode( MAP_100TH_MM ); - mpImplData->mpPrinter->Push(); - mpImplData->mpPrinter->SetMapMode( aMapMode ); + mpImplData->mxPrinter->Push(); + mpImplData->mxPrinter->SetMapMode( aMapMode ); Sequence< PropertyValue > aResult( getPageParameters( i_nPage ) ); - mpImplData->mpPrinter->Pop(); + mpImplData->mxPrinter->Pop(); return aResult; } @@ -975,8 +970,8 @@ PrinterController::PageSize PrinterController::getPageFile( int i_nUnfilteredPag Sequence< PropertyValue > aPageParm( getPageParametersProtected( i_nUnfilteredPage ) ); const MapMode aMapMode( MAP_100TH_MM ); - mpImplData->mpPrinter->Push(); - mpImplData->mpPrinter->SetMapMode( aMapMode ); + mpImplData->mxPrinter->Push(); + mpImplData->mxPrinter->SetMapMode( aMapMode ); // modify job setup if necessary PrinterController::PageSize aPageSize = mpImplData->modifyJobSetup( aPageParm, true ); @@ -984,15 +979,15 @@ PrinterController::PageSize PrinterController::getPageFile( int i_nUnfilteredPag o_rMtf.SetPrefSize( aPageSize.aSize ); o_rMtf.SetPrefMapMode( aMapMode ); - mpImplData->mpPrinter->EnableOutput( false ); + mpImplData->mxPrinter->EnableOutput( false ); - o_rMtf.Record( mpImplData->mpPrinter.get() ); + o_rMtf.Record( mpImplData->mxPrinter.get() ); printPage( i_nUnfilteredPage ); o_rMtf.Stop(); o_rMtf.WindStart(); - mpImplData->mpPrinter->Pop(); + mpImplData->mxPrinter->Pop(); if( i_bMayUseCache ) mpImplData->maPageCache.insert( i_nUnfilteredPage, o_rMtf, aPageSize ); @@ -1066,15 +1061,15 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte return PrinterController::PageSize(); } Size aPaperSize = mpImplData->getRealPaperSize( aPageSize.aSize, true ); - mpImplData->mpPrinter->SetMapMode( MapMode( MAP_100TH_MM ) ); - mpImplData->mpPrinter->SetPaperSizeUser( aPaperSize, ! mpImplData->isFixedPageSize() ); + mpImplData->mxPrinter->SetMapMode( MapMode( MAP_100TH_MM ) ); + mpImplData->mxPrinter->SetPaperSizeUser( aPaperSize, ! mpImplData->isFixedPageSize() ); if( aPaperSize != aPageSize.aSize ) { // user overridden page size, center Metafile o_rMtf.WindStart(); long nDX = (aPaperSize.Width() - aPageSize.aSize.Width()) / 2; long nDY = (aPaperSize.Height() - aPageSize.aSize.Height()) / 2; - o_rMtf.Move( nDX, nDY, mpImplData->mpPrinter->GetDPIX(), mpImplData->mpPrinter->GetDPIY() ); + o_rMtf.Move( nDX, nDY, mpImplData->mxPrinter->GetDPIX(), mpImplData->mxPrinter->GetDPIY() ); o_rMtf.WindStart(); o_rMtf.SetPrefSize( aPaperSize ); aPageSize.aSize = aPaperSize; @@ -1161,7 +1156,7 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte long nOffY = (aSubPageSize.Height() - long(double(aPageSize.aSize.Height()) * fScale)) / 2; long nX = rMPS.nLeftMargin + nOffX + nAdvX * nCellX; long nY = rMPS.nTopMargin + nOffY + nAdvY * nCellY; - aPageFile.Move( nX, nY, mpImplData->mpPrinter->GetDPIX(), mpImplData->mpPrinter->GetDPIY() ); + aPageFile.Move( nX, nY, mpImplData->mxPrinter->GetDPIX(), mpImplData->mxPrinter->GetDPIY() ); aPageFile.WindStart(); // calculate border rectangle Rectangle aSubPageRect( Point( nX, nY ), @@ -1176,8 +1171,8 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte o_rMtf.WindStart(); // subsequent getPageFile calls have changed the paper, reset it to current value - mpImplData->mpPrinter->SetMapMode( MapMode( MAP_100TH_MM ) ); - mpImplData->mpPrinter->SetPaperSizeUser( aPaperSize, ! mpImplData->isFixedPageSize() ); + mpImplData->mxPrinter->SetMapMode( MapMode( MAP_100TH_MM ) ); + mpImplData->mxPrinter->SetPaperSizeUser( aPaperSize, ! mpImplData->isFixedPageSize() ); return PrinterController::PageSize( aPaperSize, true ); } @@ -1192,11 +1187,11 @@ int PrinterController::getFilteredPageCount() sal_uLong PrinterController::removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile& o_rOut ) { - sal_uLong nRestoreDrawMode = mpImplData->mpPrinter->GetDrawMode(); - sal_Int32 nMaxBmpDPIX = mpImplData->mpPrinter->GetDPIX(); - sal_Int32 nMaxBmpDPIY = mpImplData->mpPrinter->GetDPIY(); + sal_uLong nRestoreDrawMode = mpImplData->mxPrinter->GetDrawMode(); + sal_Int32 nMaxBmpDPIX = mpImplData->mxPrinter->GetDPIX(); + sal_Int32 nMaxBmpDPIY = mpImplData->mxPrinter->GetDPIY(); - const PrinterOptions& rPrinterOptions = mpImplData->mpPrinter->GetPrinterOptions(); + const PrinterOptions& rPrinterOptions = mpImplData->mxPrinter->GetPrinterOptions(); static const sal_Int32 OPTIMAL_BMP_RESOLUTION = 300; static const sal_Int32 NORMAL_BMP_RESOLUTION = 200; @@ -1224,7 +1219,7 @@ sal_uLong PrinterController::removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFi // convert to greysacles if( rPrinterOptions.IsConvertToGreyscales() ) { - mpImplData->mpPrinter->SetDrawMode( mpImplData->mpPrinter->GetDrawMode() | + mpImplData->mxPrinter->SetDrawMode( mpImplData->mxPrinter->GetDrawMode() | ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT | DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT ) ); } @@ -1232,7 +1227,7 @@ sal_uLong PrinterController::removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFi // disable transparency output if( rPrinterOptions.IsReduceTransparency() && ( PRINTER_TRANSPARENCY_NONE == rPrinterOptions.GetReducedTransparencyMode() ) ) { - mpImplData->mpPrinter->SetDrawMode( mpImplData->mpPrinter->GetDrawMode() | DRAWMODE_NOTRANSPARENCY ); + mpImplData->mxPrinter->SetDrawMode( mpImplData->mxPrinter->GetDrawMode() | DRAWMODE_NOTRANSPARENCY ); } Color aBg( COL_TRANSPARENT ); // default: let RemoveTransparenciesFromMetaFile do its own background logic @@ -1243,7 +1238,7 @@ sal_uLong PrinterController::removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFi // so let's go for white, which will kill 99.9% of the real cases aBg = Color( COL_WHITE ); } - mpImplData->mpPrinter->RemoveTransparenciesFromMetaFile( i_rIn, o_rOut, nMaxBmpDPIX, nMaxBmpDPIY, + mpImplData->mxPrinter->RemoveTransparenciesFromMetaFile( i_rIn, o_rOut, nMaxBmpDPIX, nMaxBmpDPIY, rPrinterOptions.IsReduceTransparency(), rPrinterOptions.GetReducedTransparencyMode() == PRINTER_TRANSPARENCY_AUTO, rPrinterOptions.IsReduceBitmaps() && rPrinterOptions.IsReducedBitmapIncludesTransparency(), @@ -1276,39 +1271,39 @@ void PrinterController::printFilteredPage( int i_nPage ) } // in N-Up printing set the correct page size - mpImplData->mpPrinter->SetMapMode( MAP_100TH_MM ); + mpImplData->mxPrinter->SetMapMode( MAP_100TH_MM ); // aPageSize was filtered through mpImplData->getRealPaperSize already by getFilteredPageFile() - mpImplData->mpPrinter->SetPaperSizeUser( aPageSize.aSize, ! mpImplData->isFixedPageSize() ); + mpImplData->mxPrinter->SetPaperSizeUser( aPageSize.aSize, ! mpImplData->isFixedPageSize() ); if( mpImplData->mnFixedPaperBin != -1 && - mpImplData->mpPrinter->GetPaperBin() != mpImplData->mnFixedPaperBin ) + mpImplData->mxPrinter->GetPaperBin() != mpImplData->mnFixedPaperBin ) { - mpImplData->mpPrinter->SetPaperBin( mpImplData->mnFixedPaperBin ); + mpImplData->mxPrinter->SetPaperBin( mpImplData->mnFixedPaperBin ); } // if full paper is meant to be used, move the output to accommodate for pageoffset if( aPageSize.bFullPaper ) { - Point aPageOffset( mpImplData->mpPrinter->GetPageOffset() ); + Point aPageOffset( mpImplData->mxPrinter->GetPageOffset() ); aPageFile.WindStart(); - aPageFile.Move( -aPageOffset.X(), -aPageOffset.Y(), mpImplData->mpPrinter->GetDPIX(), mpImplData->mpPrinter->GetDPIY() ); + aPageFile.Move( -aPageOffset.X(), -aPageOffset.Y(), mpImplData->mxPrinter->GetDPIX(), mpImplData->mxPrinter->GetDPIY() ); } GDIMetaFile aCleanedFile; sal_uLong nRestoreDrawMode = removeTransparencies( aPageFile, aCleanedFile ); - mpImplData->mpPrinter->EnableOutput( true ); + mpImplData->mxPrinter->EnableOutput( true ); // actually print the page - mpImplData->mpPrinter->ImplStartPage(); + mpImplData->mxPrinter->ImplStartPage(); - mpImplData->mpPrinter->Push(); + mpImplData->mxPrinter->Push(); aCleanedFile.WindStart(); - aCleanedFile.Play( mpImplData->mpPrinter.get() ); - mpImplData->mpPrinter->Pop(); + aCleanedFile.Play( mpImplData->mxPrinter.get() ); + mpImplData->mxPrinter->Pop(); - mpImplData->mpPrinter->ImplEndPage(); + mpImplData->mxPrinter->ImplEndPage(); - mpImplData->mpPrinter->SetDrawMode( nRestoreDrawMode ); + mpImplData->mxPrinter->SetDrawMode( nRestoreDrawMode ); } void PrinterController::jobStarted() @@ -1692,7 +1687,7 @@ void PrinterController::pushPropertiesToPrinter() pVal = getValue( OUString( "Collate" ) ); if( pVal ) pVal->Value >>= bCollate; - mpImplData->mpPrinter->SetCopyCount( static_cast<sal_uInt16>(nCopyCount), bCollate ); + mpImplData->mxPrinter->SetCopyCount( static_cast<sal_uInt16>(nCopyCount), bCollate ); // duplex mode pVal = getValue( OUString( "DuplexMode" ) ); @@ -1702,9 +1697,9 @@ void PrinterController::pushPropertiesToPrinter() pVal->Value >>= nDuplex; switch( nDuplex ) { - case view::DuplexMode::OFF: mpImplData->mpPrinter->SetDuplexMode( DUPLEX_OFF ); break; - case view::DuplexMode::LONGEDGE: mpImplData->mpPrinter->SetDuplexMode( DUPLEX_LONGEDGE ); break; - case view::DuplexMode::SHORTEDGE: mpImplData->mpPrinter->SetDuplexMode( DUPLEX_SHORTEDGE ); break; + case view::DuplexMode::OFF: mpImplData->mxPrinter->SetDuplexMode( DUPLEX_OFF ); break; + case view::DuplexMode::LONGEDGE: mpImplData->mxPrinter->SetDuplexMode( DUPLEX_LONGEDGE ); break; + case view::DuplexMode::SHORTEDGE: mpImplData->mxPrinter->SetDuplexMode( DUPLEX_SHORTEDGE ); break; } } } diff --git a/vcl/source/outdev/nativecontrols.cxx b/vcl/source/outdev/nativecontrols.cxx index 38ec9ccbe573..bfb0447a1953 100644 --- a/vcl/source/outdev/nativecontrols.cxx +++ b/vcl/source/outdev/nativecontrols.cxx @@ -186,9 +186,9 @@ bool OutputDevice::HitTestNativeControl( ControlType nType, rIsInside, this ) ); } -static boost::shared_ptr< ImplControlValue > TransformControlValue( const ImplControlValue& rVal, const OutputDevice& rDev ) +static std::shared_ptr< ImplControlValue > TransformControlValue( const ImplControlValue& rVal, const OutputDevice& rDev ) { - boost::shared_ptr< ImplControlValue > aResult; + std::shared_ptr< ImplControlValue > aResult; switch( rVal.getType() ) { case CTRL_SLIDER: @@ -291,7 +291,7 @@ bool OutputDevice::DrawNativeControl( ControlType nType, // Convert the coordinates from relative to Window-absolute, so we draw // in the correct place in platform code - boost::shared_ptr< ImplControlValue > aScreenCtrlValue( TransformControlValue( aValue, *this ) ); + std::shared_ptr< ImplControlValue > aScreenCtrlValue( TransformControlValue( aValue, *this ) ); Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) ); vcl::Region aTestRegion( GetActiveClipRegion() ); @@ -322,7 +322,7 @@ bool OutputDevice::GetNativeControlRegion( ControlType nType, // Convert the coordinates from relative to Window-absolute, so we draw // in the correct place in platform code - boost::shared_ptr< ImplControlValue > aScreenCtrlValue( TransformControlValue( aValue, *this ) ); + std::shared_ptr< ImplControlValue > aScreenCtrlValue( TransformControlValue( aValue, *this ) ); Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) ); bool bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, *aScreenCtrlValue, diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 29f4ca57cb56..80e147801048 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -338,7 +338,7 @@ VclBuilder::VclBuilder(vcl::Window *pParent, const OUString& sUIDir, const OUStr for (std::vector<SizeGroup>::iterator aI = m_pParserState->m_aSizeGroups.begin(), aEnd = m_pParserState->m_aSizeGroups.end(); aI != aEnd; ++aI) { - boost::shared_ptr< VclSizeGroup > xGroup(new VclSizeGroup); + std::shared_ptr<VclSizeGroup> xGroup(std::make_shared<VclSizeGroup>()); for (stringmap::iterator aP = aI->m_aProperties.begin(), aEndP = aI->m_aProperties.end(); aP != aEndP; ++aP) diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 0633409347d6..5cbe58569334 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -568,7 +568,7 @@ void PrintDialog::OutputOptPage::storeToSettings() OUString("false") ); } -PrintDialog::PrintDialog( vcl::Window* i_pParent, const boost::shared_ptr<PrinterController>& i_rController ) +PrintDialog::PrintDialog( vcl::Window* i_pParent, const std::shared_ptr<PrinterController>& i_rController ) : ModalDialog(i_pParent, "PrintDialog", "vcl/ui/printdialog.ui") , mpCustomOptionsUIBuilder(NULL) , maPController( i_rController ) @@ -627,13 +627,13 @@ PrintDialog::PrintDialog( vcl::Window* i_pParent, const boost::shared_ptr<Printe if( maJobPage.mpPrinters->GetEntryPos( aValue ) != LISTBOX_ENTRY_NOTFOUND ) { maJobPage.mpPrinters->SelectEntry( aValue ); - maPController->setPrinter( boost::shared_ptr<Printer>( new Printer( aValue ) ) ); + maPController->setPrinter(std::make_shared<Printer>(aValue)); } else { // fall back to default printer maJobPage.mpPrinters->SelectEntry( Printer::GetDefaultPrinterName() ); - maPController->setPrinter( boost::shared_ptr<Printer>( new Printer( Printer::GetDefaultPrinterName() ) ) ); + maPController->setPrinter(std::make_shared<Printer>(Printer::GetDefaultPrinterName())); } } // not printing to file @@ -1318,7 +1318,7 @@ void PrintDialog::preparePreview( bool i_bNewPage, bool i_bMayUseCache ) { const MapMode aMapMode( MAP_100TH_MM ); GDIMetaFile aMtf; - boost::shared_ptr<Printer> aPrt( maPController->getPrinter() ); + std::shared_ptr<Printer> aPrt(maPController->getPrinter()); if( nPages > 0 ) { PrinterController::PageSize aPageSize = @@ -1511,7 +1511,7 @@ IMPL_LINK( PrintDialog, SelectHdl, ListBox*, pBox ) { OUString aNewPrinter( pBox->GetSelectEntry() ); // set new printer - maPController->setPrinter( boost::shared_ptr<Printer>( new Printer( aNewPrinter ) ) ); + maPController->setPrinter(std::make_shared<Printer>(aNewPrinter)); maPController->resetPrinterOptions( maOptionsPage.mpToFileBox->IsChecked() ); // update text fields updatePrinterText(); diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 4c39be227d0a..691b92cd2ebc 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1997,7 +1997,7 @@ void Window::set_non_homogeneous(bool bNonHomogeneous) pWindowImpl->mbNonHomogeneous = bNonHomogeneous; } -void Window::add_to_size_group(boost::shared_ptr< VclSizeGroup > xGroup) +void Window::add_to_size_group(std::shared_ptr<VclSizeGroup> xGroup) { WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl; //To-Do, multiple groups diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx index 4d018b495633..12fce1d281c4 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -113,11 +113,11 @@ void ImplServerFontEntry::HandleFontOptions( void ) { // get and cache the font options mbGotFontOptions = true; - mpFontOptions.reset(GetFCFontOptions( *maFontSelData.mpFontData, + mxFontOptions.reset(GetFCFontOptions( *maFontSelData.mpFontData, maFontSelData.mnHeight )); } // apply the font options - mpServerFont->SetFontOptions( mpFontOptions ); + mpServerFont->SetFontOptions(mxFontOptions); } CairoFontsCache::LRUFonts CairoFontsCache::maLRUFonts; |