diff options
-rw-r--r-- | chart2/source/controller/dialogs/DataBrowser.cxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/standardcontrol.cxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/usercontrol.cxx | 18 | ||||
-rw-r--r-- | include/svtools/filectrl.hxx | 10 | ||||
-rw-r--r-- | include/svtools/fileview.hxx | 26 | ||||
-rw-r--r-- | include/svtools/fmtfield.hxx | 72 | ||||
-rw-r--r-- | include/svtools/fontsubstconfig.hxx | 14 | ||||
-rw-r--r-- | include/svtools/framestatuslistener.hxx | 4 | ||||
-rw-r--r-- | svtools/source/config/fontsubstconfig.cxx | 2 | ||||
-rw-r--r-- | svtools/source/contnr/fileview.cxx | 190 | ||||
-rw-r--r-- | svtools/source/contnr/templwin.cxx | 6 | ||||
-rw-r--r-- | svtools/source/control/filectrl.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/fmtfield.cxx | 133 | ||||
-rw-r--r-- | svtools/source/uno/framestatuslistener.cxx | 6 | ||||
-rw-r--r-- | svtools/source/uno/unoiface.cxx | 6 | ||||
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 4 |
16 files changed, 247 insertions, 250 deletions
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index 7abb9fa7267c..054a677454d9 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -485,7 +485,7 @@ DataBrowser::DataBrowser( Window* pParent, WinBits nStyle, bool bLiveUpdate ) : double fNan; ::rtl::math::setNan( & fNan ); m_aNumberEditField.SetDefaultValue( fNan ); - m_aNumberEditField.TreatAsNumber( sal_True ); + m_aNumberEditField.TreatAsNumber( true ); RenewTable(); SetClean(); } diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index b12261eb560d..5f59fdc3c0ba 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -256,7 +256,7 @@ namespace pcr ODateTimeControl::ODateTimeControl( Window* _pParent, WinBits _nWinStyle) :ODateTimeControl_Base( PropertyControlType::DateTimeField, _pParent, _nWinStyle ) { - getTypedControlWindow()->EnableEmptyField( sal_True ); + getTypedControlWindow()->EnableEmptyField( true ); // determine a default format LanguageType eSysLanguage = SvtSysLocale().GetLanguageTag().getLanguageType( false); diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx index 0f9f2f973958..f476f2ccb4d8 100644 --- a/extensions/source/propctrlr/usercontrol.cxx +++ b/extensions/source/propctrlr/usercontrol.cxx @@ -69,16 +69,16 @@ namespace pcr { if ( pSupplier ) { - TreatAsNumber( sal_True ); + TreatAsNumber( true ); SvNumberFormatter* pFormatter = pSupplier->GetNumberFormatter(); - SetFormatter( pFormatter, sal_True ); + SetFormatter( pFormatter, true ); SetValue( 1234.56789 ); } else { - TreatAsNumber( sal_False ); - SetFormatter( NULL, sal_True ); + TreatAsNumber( false ); + SetFormatter( NULL, true ); SetText( "" ); } } @@ -172,7 +172,7 @@ namespace pcr OFormattedNumericControl::OFormattedNumericControl( Window* pParent, WinBits nWinStyle ) :OFormattedNumericControl_Base( PropertyControlType::Unknown, pParent, nWinStyle ) { - getTypedControlWindow()->TreatAsNumber(sal_True); + getTypedControlWindow()->TreatAsNumber(true); m_nLastDecimalDigits = getTypedControlWindow()->GetDecimalDigits(); } @@ -214,11 +214,11 @@ namespace pcr if (rDesc.pSupplier) { - getTypedControlWindow()->TreatAsNumber(sal_True); + getTypedControlWindow()->TreatAsNumber(true); SvNumberFormatter* pFormatter = rDesc.pSupplier->GetNumberFormatter(); if (pFormatter != getTypedControlWindow()->GetFormatter()) - getTypedControlWindow()->SetFormatter(pFormatter, sal_True); + getTypedControlWindow()->SetFormatter(pFormatter, true); getTypedControlWindow()->SetFormatKey(rDesc.nKey); const SvNumberformat* pEntry = getTypedControlWindow()->GetFormatter()->GetEntry(getTypedControlWindow()->GetFormatKey()); @@ -250,8 +250,8 @@ namespace pcr if ( bFallback ) { - getTypedControlWindow()->TreatAsNumber(sal_False); - getTypedControlWindow()->SetFormatter(NULL, sal_True); + getTypedControlWindow()->TreatAsNumber(false); + getTypedControlWindow()->SetFormatter(NULL, true); getTypedControlWindow()->SetText(""); m_nLastDecimalDigits = 0; } diff --git a/include/svtools/filectrl.hxx b/include/svtools/filectrl.hxx index a79fb20b37c7..dd80a3f938c6 100644 --- a/include/svtools/filectrl.hxx +++ b/include/svtools/filectrl.hxx @@ -46,7 +46,7 @@ private: PushButton maButton; OUString maButtonText; - sal_Bool mbOpenDlg; + bool mbOpenDlg; Link maDialogCreatedHdl; @@ -72,8 +72,8 @@ public: void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ); - void SetOpenDialog( sal_Bool bOpen ) { mbOpenDlg = bOpen; } - sal_Bool IsOpenDialog() const { return mbOpenDlg; } + void SetOpenDialog( bool bOpen ) { mbOpenDlg = bOpen; } + bool IsOpenDialog() const { return mbOpenDlg; } void SetText( const OUString& rStr ); OUString GetText() const; @@ -82,8 +82,8 @@ public: void SetSelection( const Selection& rSelection ) { maEdit.SetSelection( rSelection ); } Selection GetSelection() const { return maEdit.GetSelection(); } - void SetReadOnly( sal_Bool bReadOnly = sal_True ) { maEdit.SetReadOnly( bReadOnly ); } - sal_Bool IsReadOnly() const { return maEdit.IsReadOnly(); } + void SetReadOnly( bool bReadOnly = true ) { maEdit.SetReadOnly( bReadOnly ); } + bool IsReadOnly() const { return maEdit.IsReadOnly(); } //use this to manipulate the dialog bevore executing it: diff --git a/include/svtools/fileview.hxx b/include/svtools/fileview.hxx index 25f3a54c839a..4d845b6527c2 100644 --- a/include/svtools/fileview.hxx +++ b/include/svtools/fileview.hxx @@ -69,7 +69,7 @@ class SVT_DLLPUBLIC SvtFileView : public Control { private: SvtFileView_Impl* mpImp; - sal_Bool bSortColumn; + bool bSortColumn; ::com::sun::star::uno::Sequence< OUString > mpBlackList; @@ -80,7 +80,7 @@ protected: virtual void GetFocus(); public: - SvtFileView( Window* pParent, const ResId& rResId, sal_Bool bOnlyFolder, sal_Bool bMultiSelection ); + SvtFileView( Window* pParent, const ResId& rResId, bool bOnlyFolder, bool bMultiSelection ); SvtFileView( Window* pParent, const ResId& rResId, sal_uInt8 nFlags ); ~SvtFileView(); @@ -88,15 +88,15 @@ public: OUString GetURL( SvTreeListEntry* pEntry ) const; OUString GetCurrentURL() const; - sal_Bool GetParentURL( OUString& _rParentURL ) const; + bool GetParentURL( OUString& _rParentURL ) const; void CreatedFolder( const OUString& rUrl, const OUString& rNewFolder ); void SetHelpId( const OString& rHelpId ); - const OString& GetHelpId( ) const; + const OString& GetHelpId( ) const; void SetSizePixel( const Size& rNewSize ); virtual void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ); - void SetSortColumn( sal_Bool bValue ) { bSortColumn = bValue; } - sal_Bool GetSortColumn() { return bSortColumn; } + void SetSortColumn( bool bValue ) { bSortColumn = bValue; } + bool GetSortColumn() { return bSortColumn; } /** initialize the view with the content of a folder given by URL, and aply an immediate filter @@ -124,11 +124,11 @@ public: This method will never return <member>eStillRunning</member>, since it will fill the view synchronously */ - sal_Bool Initialize( const ::com::sun::star::uno::Sequence< OUString >& aContents ); + bool Initialize( const ::com::sun::star::uno::Sequence< OUString >& aContents ); /** initializes the view with the content of a folder given by an UCB content */ - sal_Bool Initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent, + bool Initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent, const OUString& rFilter ); /** reads the current content of the current folder again, and applies the given filter to it @@ -182,9 +182,9 @@ public: void EnableAutoResize(); void SetFocus(); - void EnableContextMenu( sal_Bool bEnable ); - void EnableDelete( sal_Bool bEnable ); - void EnableNameReplacing( sal_Bool bEnable = sal_True ); + void EnableContextMenu( bool bEnable ); + void EnableDelete( bool bEnable ); + void EnableNameReplacing( bool bEnable = true ); // translate folder names or display doc-title instead of file name // EnableContextMenu( sal_True )/EnableDelete(sal_True) disable name replacing! @@ -202,10 +202,10 @@ protected: struct SvtContentEntry { - sal_Bool mbIsFolder; + bool mbIsFolder; OUString maURL; - SvtContentEntry( const OUString& rURL, sal_Bool bIsFolder ) : + SvtContentEntry( const OUString& rURL, bool bIsFolder ) : mbIsFolder( bIsFolder ), maURL( rURL ) {} }; diff --git a/include/svtools/fmtfield.hxx b/include/svtools/fmtfield.hxx index 9c474d8be22c..3dc58ab5e912 100644 --- a/include/svtools/fmtfield.hxx +++ b/include/svtools/fmtfield.hxx @@ -59,15 +59,15 @@ protected: double m_dMinValue; double m_dMaxValue; - sal_Bool m_bHasMin : 1; - sal_Bool m_bHasMax : 1; + bool m_bHasMin : 1; + bool m_bHasMax : 1; - sal_Bool m_bStrictFormat : 1; + bool m_bStrictFormat : 1; - sal_Bool m_bValueDirty : 1; - sal_Bool m_bEnableEmptyField : 1; - sal_Bool m_bAutoColor : 1; - sal_Bool m_bEnableNaN : 1; + bool m_bValueDirty : 1; + bool m_bEnableEmptyField : 1; + bool m_bAutoColor : 1; + bool m_bEnableNaN : 1; double m_dCurrentValue; double m_dDefaultValue; @@ -82,7 +82,7 @@ protected: // es macht einen Unterschied, ob man bei eingestellter Textformatierung beim LostFocus den aktuellen String durch // den Formatter jagt und das Ergebnis anzeigt oder erst aus dem String ein double macht, das formatiert und dann // ausgibt - sal_Bool m_bTreatAsNumber; + bool m_bTreatAsNumber; // und mit den folgenden Members koennen wir das Ganze hier auch zur formatierten Text-Ausgabe benutzen ... OUString m_sCurrentTextValue; OUString m_sDefaultText; @@ -98,13 +98,13 @@ public: virtual ~FormattedField(); // Min-/Max-Verwaltung - sal_Bool HasMinValue() const { return m_bHasMin; } - void ClearMinValue() { m_bHasMin = sal_False; } + bool HasMinValue() const { return m_bHasMin; } + void ClearMinValue() { m_bHasMin = false; } void SetMinValue(double dMin); double GetMinValue() const { return m_dMinValue; } - sal_Bool HasMaxValue() const { return m_bHasMax; } - void ClearMaxValue() { m_bHasMax = sal_False; } + bool HasMaxValue() const { return m_bHasMax; } + void ClearMaxValue() { m_bHasMax = false; } void SetMaxValue(double dMax); double GetMaxValue() const { return m_dMaxValue; } @@ -118,11 +118,11 @@ public: void SetTextValue(const OUString& rText); // der String wird in ein double umgewandelt (durch den Formatter) und anschliessen in SetValue gesteckt - sal_Bool IsEmptyFieldEnabled() const { return m_bEnableEmptyField; } - void EnableEmptyField(sal_Bool bEnable); + bool IsEmptyFieldEnabled() const { return m_bEnableEmptyField; } + void EnableEmptyField(bool bEnable); // wenn nicht enabled, wird beim Verlassen des Feldes der Text auf den letzten gueltigen zurueckgesetzt - void SetDefaultValue(double dDefault) { m_dDefaultValue = dDefault; m_bValueDirty = sal_True; } + void SetDefaultValue(double dDefault) { m_dDefaultValue = dDefault; m_bValueDirty = true; } // wenn der aktuelle String ungueltig ist, liefert GetValue() diesen Default-Wert double GetDefaultValue() const { return m_dDefaultValue; } @@ -131,13 +131,13 @@ public: void SetFormatKey(sal_uLong nFormatKey); SvNumberFormatter* GetFormatter() const { return m_pFormatter; } - void SetFormatter(SvNumberFormatter* pFormatter, sal_Bool bResetFormat = sal_True); + void SetFormatter(SvNumberFormatter* pFormatter, bool bResetFormat = true); // wenn bResetFormat sal_False ist, wird versucht, das alte eingestellte Format mit 'hinueberzuretten' (teuer, wenn es sich nicht // um eines der Standard-Formate handelt, die in allen Formattern gleich sind) // wenn sal_True, wird als neuer FormatKey 0 gesetzt - sal_Bool GetThousandsSep() const; - void SetThousandsSep(sal_Bool _bUseSeparator); + bool GetThousandsSep() const; + void SetThousandsSep(bool _bUseSeparator); // the is no check if the current format is numeric, so be cautious when calling these functions sal_uInt16 GetDecimalDigits() const; @@ -149,12 +149,12 @@ public: // Das hier gelieferte Objekt wird allerdings zwischen allen Instanzen der Klasse geteilt (aus Zeit- und Platzgruenden), // also ist etwas Vorsicht angebracht ... - OUString GetFormat(LanguageType& eLang) const; - sal_Bool SetFormat(const OUString& rFormatString, LanguageType eLang); + OUString GetFormat(LanguageType& eLang) const; + bool SetFormat(const OUString& rFormatString, LanguageType eLang); // sal_False, wenn der FormatString nicht gesetzt werden konnte (also wahrscheinlich ungueltig ist) - sal_Bool IsStrictFormat() const { return m_bStrictFormat; } - void SetStrictFormat(sal_Bool bEnable) { m_bStrictFormat = bEnable; } + bool IsStrictFormat() const { return m_bStrictFormat; } + void SetStrictFormat(bool bEnable) { m_bStrictFormat = bEnable; } // Formatueberpruefung waehrend der Eingabe ? // Spin-Handling @@ -174,8 +174,8 @@ public: void SetSpinLast(double dLast) { m_dSpinLast = dLast; } double GetSpinLast() const { return m_dSpinLast; } - sal_Bool TreatingAsNumber() const { return m_bTreatAsNumber; } - void TreatAsNumber(sal_Bool bDoSo) { m_bTreatAsNumber = bDoSo; } + bool TreatingAsNumber() const { return m_bTreatAsNumber; } + void TreatAsNumber(bool bDoSo) { m_bTreatAsNumber = bDoSo; } public: virtual void SetText( const OUString& rStr ); @@ -206,8 +206,8 @@ public: // says that it has to be painted in a special color (e.g. a format where negative numbers should be printed // red), the text is painted with that color automatically. // The color used is the same as returned by GetLastOutputColor() - void SetAutoColor(sal_Bool _bAutomatic); - sal_Bool GetAutoColor() const { return m_bAutoColor; } + void SetAutoColor(bool _bAutomatic); + bool GetAutoColor() const { return m_bAutoColor; } /** enables handling of not-a-number value. @@ -223,8 +223,8 @@ public: control, and then tabs out of it, the text "foo" will persist, and GetValue will return NaN in subsequent calls. */ - void EnableNotANumber( sal_Bool _bEnable ); - sal_Bool IsNotANumberEnabled( ) const { return m_bEnableNaN; } + void EnableNotANumber( bool _bEnable ); + bool IsNotANumberEnabled( ) const { return m_bEnableNaN; } /** When being set to true, the strings in the field are formatted using the InputLine format. That's also what you get in Calc when you edit a cell @@ -239,14 +239,14 @@ protected: virtual void Modify(); // CheckText ueberschreiben fuer Ueberpruefung zur Eingabezeit - virtual sal_Bool CheckText(const OUString&) const { return sal_True; } + virtual bool CheckText(const OUString&) const { return true; } // any aspect of the current format has changed virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat); void ImplSetTextImpl(const OUString& rNew, Selection* pNewSel); - void ImplSetValue(double dValue, sal_Bool bForce); - sal_Bool ImplGetValue(double& dNewVal); + void ImplSetValue(double dValue, bool bForce); + bool ImplGetValue(double& dNewVal); void ImplSetFormatKey(sal_uLong nFormatKey); // SetFormatKey without FormatChanged notification @@ -276,7 +276,7 @@ public: virtual ~DoubleNumericField(); protected: - virtual sal_Bool CheckText(const OUString& sText) const; + virtual bool CheckText(const OUString& sText) const; virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat); void ResetConformanceTester(); @@ -290,8 +290,8 @@ protected: class DoubleCurrencyField : public FormattedField { OUString m_sCurrencySymbol; - sal_Bool m_bPrependCurrSym; - sal_Bool m_bChangingFormat; + bool m_bPrependCurrSym; + bool m_bChangingFormat; public: DoubleCurrencyField(Window* pParent, WinBits nStyle = 0); @@ -299,8 +299,8 @@ public: OUString getCurrencySymbol() const { return m_sCurrencySymbol; } void setCurrencySymbol(const OUString& rSymbol); - sal_Bool getPrependCurrSym() const { return m_bPrependCurrSym; } - void setPrependCurrSym(sal_Bool _bPrepend); + bool getPrependCurrSym() const { return m_bPrependCurrSym; } + void setPrependCurrSym(bool _bPrepend); protected: virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat); diff --git a/include/svtools/fontsubstconfig.hxx b/include/svtools/fontsubstconfig.hxx index 053be31409b2..0ad275989cb1 100644 --- a/include/svtools/fontsubstconfig.hxx +++ b/include/svtools/fontsubstconfig.hxx @@ -29,23 +29,23 @@ struct SubstitutionStruct { OUString sFont; OUString sReplaceBy; - sal_Bool bReplaceAlways; - sal_Bool bReplaceOnScreenOnly; + bool bReplaceAlways; + bool bReplaceOnScreenOnly; }; class SVT_DLLPUBLIC SvtFontSubstConfig : public utl::ConfigItem { - sal_Bool bIsEnabled; + bool bIsEnabled; SvtFontSubstConfig_Impl* pImpl; public: SvtFontSubstConfig(); virtual ~SvtFontSubstConfig(); - virtual void Commit(); - virtual void Notify( const com::sun::star::uno::Sequence< OUString >& _rPropertyNames); + virtual void Commit(); + virtual void Notify( const com::sun::star::uno::Sequence< OUString >& _rPropertyNames); - sal_Bool IsEnabled() const {return bIsEnabled;} - void Enable(sal_Bool bSet) {bIsEnabled = bSet; SetModified();} + bool IsEnabled() const {return bIsEnabled;} + void Enable(bool bSet) {bIsEnabled = bSet; SetModified();} sal_Int32 SubstitutionCount() const; void ClearSubstitutions(); diff --git a/include/svtools/framestatuslistener.hxx b/include/svtools/framestatuslistener.hxx index deed0be000b9..fe735a20d515 100644 --- a/include/svtools/framestatuslistener.hxx +++ b/include/svtools/framestatuslistener.hxx @@ -51,7 +51,7 @@ class SVT_DLLPUBLIC FrameStatusListener : public ::com::sun::star::frame::XStatu void addStatusListener( const OUString& aCommandURL ); void bindListener(); void unbindListener(); - sal_Bool isBound() const; + bool isBound() const; // XInterface virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException, std::exception); @@ -87,7 +87,7 @@ class SVT_DLLPUBLIC FrameStatusListener : public ::com::sun::star::frame::XStatu OUStringHash, ::std::equal_to< OUString > > URLToDispatchMap; - sal_Bool m_bInitialized : 1, + bool m_bInitialized : 1, m_bDisposed : 1; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; diff --git a/svtools/source/config/fontsubstconfig.cxx b/svtools/source/config/fontsubstconfig.cxx index 4d97c9bdeaa2..57f3a2183f9e 100644 --- a/svtools/source/config/fontsubstconfig.cxx +++ b/svtools/source/config/fontsubstconfig.cxx @@ -49,7 +49,7 @@ struct SvtFontSubstConfig_Impl SvtFontSubstConfig::SvtFontSubstConfig() : ConfigItem(OUString("Office.Common/Font/Substitution")), - bIsEnabled(sal_False), + bIsEnabled(false), pImpl(new SvtFontSubstConfig_Impl) { Sequence<OUString> aNames(1); diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index be9c77ed6c4f..4986350c8a61 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -178,18 +178,18 @@ private: OUString msFolder; OUString msFile; sal_uInt32 mnSearchIndex; - sal_Bool mbResizeDisabled : 1; - sal_Bool mbAutoResize : 1; - sal_Bool mbEnableDelete : 1; - sal_Bool mbEnableRename : 1; + bool mbResizeDisabled : 1; + bool mbAutoResize : 1; + bool mbEnableDelete : 1; + bool mbEnableRename : 1; bool mbShowHeader; void DeleteEntries(); void DoQuickSearch( const sal_Unicode& rChar ); - sal_Bool Kill( const OUString& rURL ); + bool Kill( const OUString& rURL ); protected: - virtual sal_Bool DoubleClickHdl(); + virtual sal_Bool DoubleClickHdl(); virtual OUString GetAccessibleObjectDescription( ::svt::AccessibleBrowseBoxObjType _eType, sal_Int32 _nPos ) const; public: @@ -198,15 +198,15 @@ public: virtual void Resize(); virtual void KeyInput( const KeyEvent& rKEvt ); - virtual sal_Bool EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText ); + virtual sal_Bool EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText ); void ClearAll(); HeaderBar* GetHeaderBar() const { return mpHeaderBar; } - void EnableAutoResize() { mbAutoResize = sal_True; } - void EnableDelete( sal_Bool bEnable ) { mbEnableDelete = bEnable; } - void EnableRename( sal_Bool bEnable ) { mbEnableRename = bEnable; } - sal_Bool IsDeleteOrContextMenuEnabled() { return mbEnableDelete || IsContextMenuHandlingEnabled(); } + void EnableAutoResize() { mbAutoResize = true; } + void EnableDelete( bool bEnable ) { mbEnableDelete = bEnable; } + void EnableRename( bool bEnable ) { mbEnableRename = bEnable; } + bool IsDeleteOrContextMenuEnabled() { return mbEnableDelete || IsContextMenuHandlingEnabled(); } Reference< XCommandEnvironment > GetCommandEnvironment() const { return mxCmdEnv; } @@ -427,7 +427,7 @@ public: virtual ~NameTranslator_Impl(); // IContentTitleTranslation - virtual sal_Bool GetTranslation( const OUString& rOriginalName, OUString& rTranslatedName ) const; + virtual sal_Bool GetTranslation( const OUString& rOriginalName, OUString& rTranslatedName ) const; void SetActualFolder( const INetURLObject& rActualFolder ); const OUString* GetTransTableFileName() const; @@ -463,11 +463,11 @@ public: ViewTabListBox_Impl* mpView; NameTranslator_Impl* mpNameTrans; sal_uInt16 mnSortColumn; - sal_Bool mbAscending : 1; - sal_Bool mbOnlyFolder : 1; - sal_Bool mbReplaceNames : 1; // translate folder names or display doc-title instead of file name + bool mbAscending : 1; + bool mbOnlyFolder : 1; + bool mbReplaceNames : 1; // translate folder names or display doc-title instead of file name sal_Int16 mnSuspendSelectCallback : 1; - sal_Bool mbIsFirstResort : 1; + bool mbIsFirstResort : 1; IntlWrapper aIntlWrapper; @@ -480,7 +480,7 @@ public: SvtFileView_Impl( SvtFileView* pAntiImpl, Reference < XCommandEnvironment > xEnv, sal_Int16 nFlags, - sal_Bool bOnlyFolder ); + bool bOnlyFolder ); virtual ~SvtFileView_Impl(); void Clear(); @@ -512,18 +512,18 @@ public: sal_uLong GetEntryPos( const OUString& rURL ); - inline void EnableContextMenu( sal_Bool bEnable ); - inline void EnableDelete( sal_Bool bEnable ); + inline void EnableContextMenu( bool bEnable ); + inline void EnableDelete( bool bEnable ); - void Resort_Impl( sal_Int16 nColumn, sal_Bool bAscending ); - sal_Bool SearchNextEntry( sal_uInt32 &nIndex, + void Resort_Impl( sal_Int16 nColumn, bool bAscending ); + bool SearchNextEntry( sal_uInt32 &nIndex, const OUString& rTitle, - sal_Bool bWrapAround ); + bool bWrapAround ); - inline sal_Bool EnableNameReplacing( sal_Bool bEnable = sal_True ); // returns false, if action wasn't possible + inline bool EnableNameReplacing( bool bEnable = true ); // returns false, if action wasn't possible void SetActualFolder( const INetURLObject& rActualFolder ); - sal_Bool GetDocTitle( const OUString& rTargetURL, OUString& rDocTitle ) const; + bool GetDocTitle( const OUString& rTargetURL, OUString& rDocTitle ) const; void SetSelectHandler( const Link& _rHdl ); @@ -544,25 +544,25 @@ protected: virtual void onTimeout( CallbackTimer* _pInstigator ); }; -inline void SvtFileView_Impl::EnableContextMenu( sal_Bool bEnable ) +inline void SvtFileView_Impl::EnableContextMenu( bool bEnable ) { mpView->EnableContextMenuHandling( bEnable ); if( bEnable ) - mbReplaceNames = sal_False; + mbReplaceNames = false; } -inline void SvtFileView_Impl::EnableDelete( sal_Bool bEnable ) +inline void SvtFileView_Impl::EnableDelete( bool bEnable ) { mpView->EnableDelete( bEnable ); if( bEnable ) - mbReplaceNames = sal_False; + mbReplaceNames = false; } -inline sal_Bool SvtFileView_Impl::EnableNameReplacing( sal_Bool bEnable ) +inline bool SvtFileView_Impl::EnableNameReplacing( bool bEnable ) { mpView->EnableRename( bEnable ); - sal_Bool bRet; + bool bRet; if( mpView->IsDeleteOrContextMenuEnabled() ) { DBG_ASSERT( !mbReplaceNames, "SvtFileView_Impl::EnableNameReplacing(): state should be not possible!" ); @@ -571,7 +571,7 @@ inline sal_Bool SvtFileView_Impl::EnableNameReplacing( sal_Bool bEnable ) else { mbReplaceNames = bEnable; - bRet = sal_True; + bRet = true; } return bRet; @@ -643,10 +643,10 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* pParentWin, msFolder ( SVT_RESSTR(STR_SVT_ACC_DESC_FOLDER) ), msFile ( SVT_RESSTR(STR_SVT_ACC_DESC_FILE) ), mnSearchIndex ( 0 ), - mbResizeDisabled ( sal_False ), - mbAutoResize ( sal_False ), - mbEnableDelete ( sal_False ), - mbEnableRename ( sal_True ), + mbResizeDisabled ( false ), + mbAutoResize ( false ), + mbEnableDelete ( false ), + mbEnableRename ( true ), mbShowHeader ( (nFlags & FILEVIEW_SHOW_NONE) == 0 ) { Size aBoxSize = pParentWin->GetSizePixel(); @@ -739,10 +739,10 @@ void ViewTabListBox_Impl::Resize() if ( mbAutoResize ) { - mbResizeDisabled = sal_True; + mbResizeDisabled = true; SetPosSizePixel( Point( 0, aBarSize.Height() ), Size( aBoxSize.Width(), aBoxSize.Height() - aBarSize.Height() ) ); - mbResizeDisabled = sal_False; + mbResizeDisabled = false; } } @@ -969,7 +969,7 @@ void ViewTabListBox_Impl::DeleteEntries() sal_Bool ViewTabListBox_Impl::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText ) { - sal_Bool bRet = sal_False; + bool bRet = false; OUString aURL; SvtContentEntry* pData = (SvtContentEntry*)pEntry->GetUserData(); @@ -1016,7 +1016,7 @@ sal_Bool ViewTabListBox_Impl::EditedEntry( SvTreeListEntry* pEntry, pEntry->SetUserData( pData ); - bRet = sal_True; + bRet = true; } } catch( Exception const & ) @@ -1038,14 +1038,14 @@ void ViewTabListBox_Impl::DoQuickSearch( const sal_Unicode& rChar ) maQuickSearchText += OUString(rChar).toAsciiLowerCase(); - sal_Bool bFound = mpParent->SearchNextEntry( mnSearchIndex, maQuickSearchText, sal_False ); + bool bFound = mpParent->SearchNextEntry( mnSearchIndex, maQuickSearchText, false ); if ( !bFound && ( aLastText.getLength() == 1 ) && ( aLastText == OUString(rChar) ) ) { mnSearchIndex = aLastPos + 1; maQuickSearchText = aLastText; - bFound = mpParent->SearchNextEntry( mnSearchIndex, maQuickSearchText, sal_True ); + bFound = mpParent->SearchNextEntry( mnSearchIndex, maQuickSearchText, true ); } if ( bFound ) @@ -1106,9 +1106,9 @@ OUString ViewTabListBox_Impl::GetAccessibleObjectDescription( ::svt::AccessibleB } -sal_Bool ViewTabListBox_Impl::Kill( const OUString& rContent ) +bool ViewTabListBox_Impl::Kill( const OUString& rContent ) { - sal_Bool bRet = sal_True; + bool bRet = true; try { @@ -1118,12 +1118,12 @@ sal_Bool ViewTabListBox_Impl::Kill( const OUString& rContent ) catch( ::com::sun::star::ucb::CommandAbortedException const & ) { DBG_WARNING( "CommandAbortedException" ); - bRet = sal_False; + bRet = false; } catch( Exception const & ) { DBG_WARNING( "Any other exception" ); - bRet = sal_False; + bRet = false; } return bRet; @@ -1137,7 +1137,7 @@ sal_Bool ViewTabListBox_Impl::Kill( const OUString& rContent ) SvtFileView::SvtFileView( Window* pParent, const ResId& rResId, - sal_Bool bOnlyFolder, sal_Bool bMultiSelection ) : + bool bOnlyFolder, bool bMultiSelection ) : Control( pParent, rResId ) { @@ -1215,7 +1215,7 @@ void SvtFileView::CreatedFolder( const OUString& rUrl, const OUString& rNewFolde { OUString sEntry = mpImp->FolderInserted( rUrl, rNewFolder ); SvTreeListEntry* pEntry = mpImp->mpView->InsertEntry( sEntry, mpImp->maFolderImage, mpImp->maFolderImage ); - SvtContentEntry* pUserData = new SvtContentEntry( rUrl, sal_True ); + SvtContentEntry* pUserData = new SvtContentEntry( rUrl, true ); pEntry->SetUserData( pUserData ); mpImp->mpView->MakeVisible( pEntry ); } @@ -1235,9 +1235,9 @@ FileViewResult SvtFileView::PreviousLevel( const FileViewAsyncAction* pAsyncDesc -sal_Bool SvtFileView::GetParentURL( OUString& rParentURL ) const +bool SvtFileView::GetParentURL( OUString& rParentURL ) const { - sal_Bool bRet = sal_False; + bool bRet = false; try { ::ucbhelper::Content aCnt( mpImp->maViewURL, mpImp->mxCmdEnv, comphelper::getProcessComponentContext() ); @@ -1292,7 +1292,7 @@ void SvtFileView::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) } -sal_Bool SvtFileView::Initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent, const OUString& rFilter ) +bool SvtFileView::Initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent, const OUString& rFilter ) { WaitObject aWaitCursor( this ); @@ -1301,7 +1301,7 @@ sal_Bool SvtFileView::Initialize( const ::com::sun::star::uno::Reference< ::com: FileViewResult eResult = mpImp->GetFolderContent_Impl( FolderDescriptor( aContent ), NULL ); OSL_ENSURE( eResult != eStillRunning, "SvtFileView::Initialize: this was expected to be synchronous!" ); if ( eResult != eSuccess ) - return sal_False; + return false; mpImp->FilterFolderContent_Impl( rFilter ); @@ -1310,7 +1310,7 @@ sal_Bool SvtFileView::Initialize( const ::com::sun::star::uno::Reference< ::com: mpImp->OpenFolder_Impl(); mpImp->maOpenDoneLink.Call( this ); - return sal_True; + return true; } @@ -1356,7 +1356,7 @@ FileViewResult SvtFileView::Initialize( -sal_Bool SvtFileView::Initialize( const Sequence< OUString >& aContents ) +bool SvtFileView::Initialize( const Sequence< OUString >& aContents ) { WaitObject aWaitCursor( this ); @@ -1372,7 +1372,7 @@ sal_Bool SvtFileView::Initialize( const Sequence< OUString >& aContents ) mpImp->maOpenDoneLink.Call( this ); - return sal_True; + return true; } @@ -1472,18 +1472,18 @@ void SvtFileView::SetOpenDoneHdl( const Link& rHdl ) } -void SvtFileView::EnableContextMenu( sal_Bool bEnable ) +void SvtFileView::EnableContextMenu( bool bEnable ) { mpImp->EnableContextMenu( bEnable ); } -void SvtFileView::EnableDelete( sal_Bool bEnable ) +void SvtFileView::EnableDelete( bool bEnable ) { mpImp->EnableDelete( bEnable ); } -void SvtFileView::EnableNameReplacing( sal_Bool bEnable ) +void SvtFileView::EnableNameReplacing( bool bEnable ) { mpImp->EnableNameReplacing( bEnable ); } @@ -1519,7 +1519,7 @@ IMPL_LINK( SvtFileView, HeaderSelect_Impl, HeaderBar*, pBar ) nBits = pBar->GetItemBits( nItemID ); - sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); + bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); if ( bUp ) { @@ -1569,7 +1569,7 @@ OUString SvtFileView::GetConfigString() const sRet += OUString::number( mpImp->mnSortColumn ); sRet += ";"; HeaderBarItemBits nBits = pBar->GetItemBits( mpImp->mnSortColumn ); - sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); + bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); sRet += bUp ? OUString("1") : OUString("0"); sRet += ";"; @@ -1595,7 +1595,7 @@ void SvtFileView::SetConfigString( const OUString& rCfgStr ) sal_Int32 nIdx = 0; mpImp->mnSortColumn = (sal_uInt16)rCfgStr.getToken( 0, ';', nIdx ).toInt32(); - sal_Bool bUp = (sal_Bool)(sal_uInt16)rCfgStr.getToken( 0, ';', nIdx ).toInt32(); + bool bUp = (bool)(sal_uInt16)rCfgStr.getToken( 0, ';', nIdx ).toInt32(); HeaderBarItemBits nBits = pBar->GetItemBits( mpImp->mnSortColumn ); if ( bUp ) @@ -1685,7 +1685,7 @@ const OUString* NameTranslator_Impl::GetTransTableFileName() const // class SvtFileView_Impl -SvtFileView_Impl::SvtFileView_Impl( SvtFileView* pAntiImpl, Reference < XCommandEnvironment > xEnv, sal_Int16 nFlags, sal_Bool bOnlyFolder ) +SvtFileView_Impl::SvtFileView_Impl( SvtFileView* pAntiImpl, Reference < XCommandEnvironment > xEnv, sal_Int16 nFlags, bool bOnlyFolder ) :mpAntiImpl ( pAntiImpl ) ,m_eAsyncActionResult ( ::svt::ERROR ) @@ -1693,11 +1693,11 @@ SvtFileView_Impl::SvtFileView_Impl( SvtFileView* pAntiImpl, Reference < XCommand ,m_bAsyncActionCancelled ( false ) ,mpNameTrans ( NULL ) ,mnSortColumn ( COLUMN_TITLE ) - ,mbAscending ( sal_True ) + ,mbAscending ( true ) ,mbOnlyFolder ( bOnlyFolder ) - ,mbReplaceNames ( sal_False ) + ,mbReplaceNames ( false ) ,mnSuspendSelectCallback ( 0 ) - ,mbIsFirstResort ( sal_True ) + ,mbIsFirstResort ( true ) ,aIntlWrapper ( Application::GetSettings().GetLanguageTag() ) ,maFolderImage ( SvtResId( IMG_SVT_FOLDER ) ) ,mxCmdEnv ( xEnv ) @@ -1858,7 +1858,7 @@ FileViewResult SvtFileView_Impl::GetFolderContent_Impl( void SvtFileView_Impl::FilterFolderContent_Impl( const OUString &rFilter ) { - sal_Bool bHideTransFile = mbReplaceNames && mpNameTrans; + bool bHideTransFile = mbReplaceNames && mpNameTrans; OUString sHideEntry; if( bHideTransFile ) @@ -1870,7 +1870,7 @@ void SvtFileView_Impl::FilterFolderContent_Impl( const OUString &rFilter ) sHideEntry = sHideEntry.toAsciiUpperCase(); } else - bHideTransFile = sal_False; + bHideTransFile = false; } if ( !bHideTransFile && @@ -1908,10 +1908,10 @@ void SvtFileView_Impl::FilterFolderContent_Impl( const OUString &rFilter ) // normalize the content title (we always match case-insensitive) // 91872 - 11.09.2001 - frank.schoenheit@sun.com sCompareString = (*aContentLoop)->GetFileName(); // filter works on file name, not on title! - sal_Bool bDelete; + bool bDelete; if( bHideTransFile && sCompareString == sHideEntry ) - bDelete = sal_True; + bDelete = true; else { // search for the first filter which matches @@ -2247,7 +2247,7 @@ void SvtFileView_Impl::CreateVector_Impl( const Sequence < OUString > &rList ) } -void SvtFileView_Impl::Resort_Impl( sal_Int16 nColumn, sal_Bool bAscending ) +void SvtFileView_Impl::Resort_Impl( sal_Int16 nColumn, bool bAscending ) { ::osl::MutexGuard aGuard( maMutex ); @@ -2282,30 +2282,30 @@ void SvtFileView_Impl::Resort_Impl( sal_Int16 nColumn, sal_Bool bAscending ) } } else - mbIsFirstResort = sal_False; + mbIsFirstResort = false; } -static sal_Bool gbAscending = sal_True; +static bool gbAscending = true; static sal_Int16 gnColumn = COLUMN_TITLE; static const CollatorWrapper* pCollatorWrapper = NULL; /* this functions returns true, if aOne is less then aTwo */ -sal_Bool CompareSortingData_Impl( SortingData_Impl* const aOne, SortingData_Impl* const aTwo ) +bool CompareSortingData_Impl( SortingData_Impl* const aOne, SortingData_Impl* const aTwo ) { DBG_ASSERT( pCollatorWrapper, "*CompareSortingData_Impl(): Can't work this way!" ); - sal_Int32 nComp; - sal_Bool bRet = sal_False; - sal_Bool bEqual = sal_False; + sal_Int32 nComp; + bool bRet = false; + bool bEqual = false; if ( aOne->mbIsFolder != aTwo->mbIsFolder ) { if ( aOne->mbIsFolder ) - bRet = sal_True; + bRet = true; else - bRet = sal_False; + bRet = false; // !!! pb: #100376# folder always on top if ( !gbAscending ) @@ -2323,47 +2323,47 @@ sal_Bool CompareSortingData_Impl( SortingData_Impl* const aOne, SortingData_Impl nComp = pCollatorWrapper->compareString( aOne->GetTitle(), aTwo->GetTitle() ); if ( nComp < 0 ) - bRet = sal_True; + bRet = true; else if ( nComp > 0 ) - bRet = sal_False; + bRet = false; else - bEqual = sal_True; + bEqual = true; break; case COLUMN_TYPE: nComp = pCollatorWrapper->compareString( aOne->maType, aTwo->maType ); if ( nComp < 0 ) - bRet = sal_True; + bRet = true; else if ( nComp > 0 ) - bRet = sal_False; + bRet = false; else - bEqual = sal_True; + bEqual = true; break; case COLUMN_SIZE: if ( aOne->maSize < aTwo->maSize ) - bRet = sal_True; + bRet = true; else if ( aOne->maSize > aTwo->maSize ) - bRet = sal_False; + bRet = false; else - bEqual = sal_True; + bEqual = true; break; case COLUMN_DATE: if ( aOne->maModDate < aTwo->maModDate ) - bRet = sal_True; + bRet = true; else if ( aOne->maModDate > aTwo->maModDate ) - bRet = sal_False; + bRet = false; else - bEqual = sal_True; + bEqual = true; break; default: DBG_WARNING( "CompareSortingData_Impl: Compare unknown type!" ); - bRet = sal_False; + bRet = false; } } // when the two elements are equal, we must not return sal_True (which would // happen if we just return ! ( a < b ) when not sorting ascending ) if ( bEqual ) - return sal_False; + return false; return gbAscending ? bRet : !bRet; } @@ -2494,7 +2494,7 @@ sal_uLong SvtFileView_Impl::GetEntryPos( const OUString& rURL ) } -sal_Bool SvtFileView_Impl::SearchNextEntry( sal_uInt32& nIndex, const OUString& rTitle, sal_Bool bWrapAround ) +bool SvtFileView_Impl::SearchNextEntry( sal_uInt32& nIndex, const OUString& rTitle, bool bWrapAround ) { ::osl::MutexGuard aGuard( maMutex ); @@ -2504,7 +2504,7 @@ sal_Bool SvtFileView_Impl::SearchNextEntry( sal_uInt32& nIndex, const OUString& { SortingData_Impl* pData = maContent[ nIndex ]; if ( rTitle.compareTo( pData->GetLowerTitle(), rTitle.getLength() ) == 0 ) - return sal_True; + return true; nIndex += 1; } @@ -2515,12 +2515,12 @@ sal_Bool SvtFileView_Impl::SearchNextEntry( sal_uInt32& nIndex, const OUString& { SortingData_Impl* pData = maContent[ nIndex ]; if ( rTitle.compareTo( pData->GetLowerTitle(), rTitle.getLength() ) == 0 ) - return sal_True; + return true; nIndex += 1; } } - return sal_False; + return false; } diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx index 9349a3fce4e8..5032b0c5a09a 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -419,8 +419,8 @@ SvtFileViewWindow_Impl::SvtFileViewWindow_Impl( SvtTemplateWindow* pParent ) : aFileView.SetHelpId( HID_TEMPLATEDLG_FILEVIEW ); aFileView.Show(); aFileView.EnableAutoResize(); - aFileView.EnableContextMenu( sal_False ); - aFileView.EnableDelete( sal_False ); + aFileView.EnableContextMenu( false ); + aFileView.EnableDelete( false ); } SvtFileViewWindow_Impl::~SvtFileViewWindow_Impl() @@ -530,7 +530,7 @@ void SvtFileViewWindow_Impl::OpenFolder( const OUString& rURL ) if ( INetURLObject( rURL ).GetProtocol() == INET_PROT_PRIVATE ) { - aFileView.EnableNameReplacing( sal_False ); + aFileView.EnableNameReplacing( false ); aFileView.Initialize( GetNewDocContents() ); } else diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx index 8155673e5d2b..2fd68d6e04bf 100644 --- a/svtools/source/control/filectrl.cxx +++ b/svtools/source/control/filectrl.cxx @@ -43,7 +43,7 @@ FileControl::FileControl( Window* pParent, WinBits nStyle, FileControlMode nFlag mnInternalFlags( FILECTRL_ORIGINALBUTTONTEXT ) { maButton.SetClickHdl( LINK( this, FileControl, ButtonHdl ) ); - mbOpenDlg = sal_True; + mbOpenDlg = true; maButton.Show(); maEdit.Show(); diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx index 2d2d125b7e7a..e31bc1187ee4 100644 --- a/svtools/source/control/fmtfield.cxx +++ b/svtools/source/control/fmtfield.cxx @@ -82,10 +82,10 @@ namespace validation public: NumberValidator( const sal_Unicode _cThSep, const sal_Unicode _cDecSep ); - sal_Bool isValidNumericFragment( const OUString& _rText ); + bool isValidNumericFragment( const OUString& _rText ); private: - sal_Bool implValidateNormalized( const OUString& _rText ); + bool implValidateNormalized( const OUString& _rText ); }; static void lcl_insertStopTransition( StateTransitions& _rRow ) @@ -212,7 +212,7 @@ namespace validation } } - sal_Bool NumberValidator::implValidateNormalized( const OUString& _rText ) + bool NumberValidator::implValidateNormalized( const OUString& _rText ) { const sal_Unicode* pCheckPos = _rText.getStr(); State eCurrentState = START; @@ -251,11 +251,11 @@ namespace validation return ( END == eCurrentState ); } - sal_Bool NumberValidator::isValidNumericFragment( const OUString& _rText ) + bool NumberValidator::isValidNumericFragment( const OUString& _rText ) { if ( _rText.isEmpty() ) // empty strings are always allowed - return sal_True; + return true; // normalize the string OUString sNormalized( "_" ); @@ -297,31 +297,28 @@ FormattedField::StaticFormatter::~StaticFormatter() } -#define INIT_MEMBERS() \ - m_aLastSelection(0,0) \ - ,m_dMinValue(0) \ - ,m_dMaxValue(0) \ - ,m_bHasMin(sal_False) \ - ,m_bHasMax(sal_False) \ - ,m_bStrictFormat(sal_True) \ - ,m_bValueDirty(sal_True) \ - ,m_bEnableEmptyField(sal_True) \ - ,m_bAutoColor(sal_False) \ - ,m_bEnableNaN(sal_False) \ - ,m_dCurrentValue(0) \ - ,m_dDefaultValue(0) \ - ,m_nFormatKey(0) \ - ,m_pFormatter(NULL) \ - ,m_dSpinSize(1) \ - ,m_dSpinFirst(-1000000) \ - ,m_dSpinLast(1000000) \ - ,m_bTreatAsNumber(sal_True) \ - ,m_pLastOutputColor(NULL) \ - ,m_bUseInputStringForFormatting(false) - FormattedField::FormattedField(Window* pParent, WinBits nStyle, SvNumberFormatter* pInitialFormatter, sal_Int32 nFormatKey) :SpinField(pParent, nStyle) - ,INIT_MEMBERS() + ,m_aLastSelection(0,0) + ,m_dMinValue(0) + ,m_dMaxValue(0) + ,m_bHasMin(false) + ,m_bHasMax(false) + ,m_bStrictFormat(true) + ,m_bValueDirty(true) + ,m_bEnableEmptyField(true) + ,m_bAutoColor(false) + ,m_bEnableNaN(false) + ,m_dCurrentValue(0) + ,m_dDefaultValue(0) + ,m_nFormatKey(0) + ,m_pFormatter(NULL) + ,m_dSpinSize(1) + ,m_dSpinFirst(-1000000) + ,m_dSpinLast(1000000) + ,m_bTreatAsNumber(true) + ,m_pLastOutputColor(NULL) + ,m_bUseInputStringForFormatting(false) { if (pInitialFormatter) @@ -345,14 +342,14 @@ void FormattedField::SetText(const OUString& rStr) { SpinField::SetText(rStr); - m_bValueDirty = sal_True; + m_bValueDirty = true; } void FormattedField::SetText( const OUString& rStr, const Selection& rNewSelection ) { SpinField::SetText( rStr, rNewSelection ); - m_bValueDirty = sal_True; + m_bValueDirty = true; } void FormattedField::SetTextFormatted(const OUString& rStr) @@ -414,7 +411,7 @@ void FormattedField::SetTextFormatted(const OUString& rStr) else aNewSel = aSel; // don't use the justified version SpinField::SetText(sFormatted, aNewSel); - m_bValueDirty = sal_False; + m_bValueDirty = false; } OUString FormattedField::GetTextValue() const @@ -422,12 +419,12 @@ OUString FormattedField::GetTextValue() const if (m_bValueDirty) { ((FormattedField*)this)->m_sCurrentTextValue = GetText(); - ((FormattedField*)this)->m_bValueDirty = sal_False; + ((FormattedField*)this)->m_bValueDirty = false; } return m_sCurrentTextValue; } -void FormattedField::EnableNotANumber( sal_Bool _bEnable ) +void FormattedField::EnableNotANumber( bool _bEnable ) { if ( m_bEnableNaN == _bEnable ) return; @@ -435,7 +432,7 @@ void FormattedField::EnableNotANumber( sal_Bool _bEnable ) m_bEnableNaN = _bEnable; } -void FormattedField::SetAutoColor(sal_Bool _bAutomatic) +void FormattedField::SetAutoColor(bool _bAutomatic) { if (_bAutomatic == m_bAutoColor) return; @@ -456,7 +453,7 @@ void FormattedField::impl_Modify(bool makeValueDirty) if (!IsStrictFormat()) { if(makeValueDirty) - m_bValueDirty = sal_True; + m_bValueDirty = true; SpinField::Modify(); return; } @@ -467,7 +464,7 @@ void FormattedField::impl_Modify(bool makeValueDirty) m_sLastValidText = sCheck; m_aLastSelection = GetSelection(); if(makeValueDirty) - m_bValueDirty = sal_True; + m_bValueDirty = true; } else { @@ -530,7 +527,7 @@ void FormattedField::ImplSetTextImpl(const OUString& rNew, Selection* pNewSel) SpinField::SetText(rNew, aSel); } - m_bValueDirty = sal_True; // not always necessary, but better re-evaluate for safety reasons + m_bValueDirty = true; // not always necessary, but better re-evaluate for safety reasons } bool FormattedField::PreNotify(NotifyEvent& rNEvt) @@ -544,7 +541,7 @@ void FormattedField::ImplSetFormatKey(sal_uLong nFormatKey) { m_nFormatKey = nFormatKey; - sal_Bool bNeedFormatter = (m_pFormatter == NULL) && (nFormatKey != 0); + bool bNeedFormatter = (m_pFormatter == NULL) && (nFormatKey != 0); if (bNeedFormatter) { ImplGetFormatter(); // this creates a standard formatter @@ -561,12 +558,12 @@ void FormattedField::ImplSetFormatKey(sal_uLong nFormatKey) void FormattedField::SetFormatKey(sal_uLong nFormatKey) { - sal_Bool bNoFormatter = (m_pFormatter == NULL); + bool bNoFormatter = (m_pFormatter == NULL); ImplSetFormatKey(nFormatKey); FormatChanged((bNoFormatter && (m_pFormatter != NULL)) ? FCT_FORMATTER : FCT_KEYONLY); } -void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, sal_Bool bResetFormat) +void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, bool bResetFormat) { if (bResetFormat) @@ -618,7 +615,7 @@ OUString FormattedField::GetFormat(LanguageType& eLang) const return sFormatString; } -sal_Bool FormattedField::SetFormat(const OUString& rFormatString, LanguageType eLang) +bool FormattedField::SetFormat(const OUString& rFormatString, LanguageType eLang) { sal_uInt32 nNewKey = ImplGetFormatter()->TestNewString(rFormatString, eLang); if (nNewKey == NUMBERFORMAT_ENTRY_NOT_FOUND) @@ -627,16 +624,16 @@ sal_Bool FormattedField::SetFormat(const OUString& rFormatString, LanguageType e short nType; OUString rFormat(rFormatString); if (!ImplGetFormatter()->PutEntry(rFormat, nCheckPos, nType, nNewKey, eLang)) - return sal_False; + return false; DBG_ASSERT(nNewKey != NUMBERFORMAT_ENTRY_NOT_FOUND, "FormattedField::SetFormatString : PutEntry returned an invalid key !"); } if (nNewKey != m_nFormatKey) SetFormatKey(nNewKey); - return sal_True; + return true; } -sal_Bool FormattedField::GetThousandsSep() const +bool FormattedField::GetThousandsSep() const { DBG_ASSERT(!ImplGetFormatter()->IsTextFormat(m_nFormatKey), "FormattedField::GetThousandsSep : Are you sure what you are doing when setting the precision of a text format?"); @@ -648,7 +645,7 @@ sal_Bool FormattedField::GetThousandsSep() const return bThousand; } -void FormattedField::SetThousandsSep(sal_Bool _bUseSeparator) +void FormattedField::SetThousandsSep(bool _bUseSeparator) { DBG_ASSERT(!ImplGetFormatter()->IsTextFormat(m_nFormatKey), "FormattedField::SetThousandsSep : Are you sure what you are doing when setting the precision of a text format?"); @@ -756,7 +753,7 @@ void FormattedField::ReFormat() double dValue = GetValue(); if ( m_bEnableNaN && ::rtl::math::isNan( dValue ) ) return; - ImplSetValue( dValue, sal_True ); + ImplSetValue( dValue, true ); } else SetTextFormatted(GetTextValue()); @@ -810,7 +807,7 @@ bool FormattedField::Notify(NotifyEvent& rNEvt) { if (TreatingAsNumber()) { - ImplSetValue(m_dCurrentValue, sal_True); + ImplSetValue(m_dCurrentValue, true); Modify(); } else @@ -821,7 +818,7 @@ bool FormattedField::Notify(NotifyEvent& rNEvt) else SetTextFormatted(m_sDefaultText); } - m_bValueDirty = sal_False; + m_bValueDirty = false; } } else @@ -838,7 +835,7 @@ void FormattedField::SetMinValue(double dMin) DBG_ASSERT(m_bTreatAsNumber, "FormattedField::SetMinValue : only to be used in numeric mode !"); m_dMinValue = dMin; - m_bHasMin = sal_True; + m_bHasMin = true; // for checking the current value at the new border -> ImplSetValue ReFormat(); } @@ -848,7 +845,7 @@ void FormattedField::SetMaxValue(double dMax) DBG_ASSERT(m_bTreatAsNumber, "FormattedField::SetMaxValue : only to be used in numeric mode !"); m_dMaxValue = dMax; - m_bHasMax = sal_True; + m_bHasMax = true; // for checking the current value at the new border -> ImplSetValue ReFormat(); } @@ -859,17 +856,17 @@ void FormattedField::SetTextValue(const OUString& rText) ReFormat(); } -void FormattedField::EnableEmptyField(sal_Bool bEnable) +void FormattedField::EnableEmptyField(bool bEnable) { if (bEnable == m_bEnableEmptyField) return; m_bEnableEmptyField = bEnable; if (!m_bEnableEmptyField && GetText().isEmpty()) - ImplSetValue(m_dCurrentValue, sal_True); + ImplSetValue(m_dCurrentValue, true); } -void FormattedField::ImplSetValue(double dVal, sal_Bool bForce) +void FormattedField::ImplSetValue(double dVal, bool bForce) { if (m_bHasMin && (dVal<m_dMinValue)) @@ -881,7 +878,7 @@ void FormattedField::ImplSetValue(double dVal, sal_Bool bForce) DBG_ASSERT(ImplGetFormatter() != NULL, "FormattedField::ImplSetValue : can't set a value without a formatter !"); - m_bValueDirty = sal_False; + m_bValueDirty = false; m_dCurrentValue = dVal; OUString sNewText; @@ -906,21 +903,21 @@ void FormattedField::ImplSetValue(double dVal, sal_Bool bForce) } ImplSetTextImpl(sNewText, NULL); - m_bValueDirty = sal_False; + m_bValueDirty = false; DBG_ASSERT(CheckText(sNewText), "FormattedField::ImplSetValue : formatted string doesn't match the criteria !"); } -sal_Bool FormattedField::ImplGetValue(double& dNewVal) +bool FormattedField::ImplGetValue(double& dNewVal) { dNewVal = m_dCurrentValue; if (!m_bValueDirty) - return sal_True; + return true; dNewVal = m_dDefaultValue; OUString sText(GetText()); if (sText.isEmpty()) - return sal_True; + return true; DBG_ASSERT(ImplGetFormatter() != NULL, "FormattedField::ImplGetValue : can't give you a current value without a formatter !"); @@ -949,13 +946,13 @@ sal_Bool FormattedField::ImplGetValue(double& dNewVal) // which equals 300 percent. } if (!ImplGetFormatter()->IsNumberFormat(sText, nFormatKey, dNewVal)) - return sal_False; + return false; if (m_bHasMin && (dNewVal<m_dMinValue)) dNewVal = m_dMinValue; if (m_bHasMax && (dNewVal>m_dMaxValue)) dNewVal = m_dMaxValue; - return sal_True; + return true; } void FormattedField::SetValue(double dVal) @@ -974,7 +971,7 @@ double FormattedField::GetValue() m_dCurrentValue = m_dDefaultValue; } - m_bValueDirty = sal_False; + m_bValueDirty = false; return m_dCurrentValue; } @@ -1042,7 +1039,7 @@ void DoubleNumericField::FormatChanged(FORMAT_CHANGE_TYPE nWhat) FormattedField::FormatChanged(nWhat); } -sal_Bool DoubleNumericField::CheckText(const OUString& sText) const +bool DoubleNumericField::CheckText(const OUString& sText) const { // We'd like to implement this using the NumberFormatter::IsNumberFormat, but unfortunately, this doesn't // recognize fragments of numbers (like, for instance "1e", which happens during entering e.g. "1e10") @@ -1076,9 +1073,9 @@ void DoubleNumericField::ResetConformanceTester() DoubleCurrencyField::DoubleCurrencyField(Window* pParent, WinBits nStyle) :FormattedField(pParent, nStyle) - ,m_bChangingFormat(sal_False) + ,m_bChangingFormat(false) { - m_bPrependCurrSym = sal_False; + m_bPrependCurrSym = false; // initialize with a system currency format m_sCurrencySymbol = SvtSysLocale().GetLocaleData().getCurrSymbol(); @@ -1122,7 +1119,7 @@ void DoubleCurrencyField::setCurrencySymbol(const OUString& rSymbol) FormatChanged(FCT_CURRENCY_SYMBOL); } -void DoubleCurrencyField::setPrependCurrSym(sal_Bool _bPrepend) +void DoubleCurrencyField::setPrependCurrSym(bool _bPrepend) { if (m_bPrependCurrSym == _bPrepend) return; @@ -1137,7 +1134,7 @@ void DoubleCurrencyField::UpdateCurrencyFormat() // the old settings LanguageType eLanguage; GetFormat(eLanguage); - sal_Bool bThSep = GetThousandsSep(); + bool bThSep = GetThousandsSep(); sal_uInt16 nDigits = GetDecimalDigits(); // build a new format string with the base class' and my own settings @@ -1202,9 +1199,9 @@ void DoubleCurrencyField::UpdateCurrencyFormat() } // set this new basic format - m_bChangingFormat = sal_True; + m_bChangingFormat = true; SetFormat(sNewFormat.makeStringAndClear(), eLanguage); - m_bChangingFormat = sal_False; + m_bChangingFormat = false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/framestatuslistener.cxx b/svtools/source/uno/framestatuslistener.cxx index 242f212f772f..cdbcf2c56a1a 100644 --- a/svtools/source/uno/framestatuslistener.cxx +++ b/svtools/source/uno/framestatuslistener.cxx @@ -40,8 +40,8 @@ FrameStatusListener::FrameStatusListener( const Reference< XComponentContext >& rxContext, const Reference< XFrame >& xFrame ) : OWeakObject() - , m_bInitialized( sal_True ) - , m_bDisposed( sal_False ) + , m_bInitialized( true ) + , m_bDisposed( false ) , m_xFrame( xFrame ) , m_xContext( rxContext ) { @@ -111,7 +111,7 @@ throw (::com::sun::star::uno::RuntimeException, std::exception) ++pIter; } - m_bDisposed = sal_True; + m_bDisposed = true; } void SAL_CALL FrameStatusListener::addEventListener( const Reference< XEventListener >& ) diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx index d37b052387eb..675ffd5f281e 100644 --- a/svtools/source/uno/unoiface.cxx +++ b/svtools/source/uno/unoiface.cxx @@ -827,7 +827,7 @@ void SVTXFormattedField::SetWindow( Window* _pWindow ) { VCLXSpinField::SetWindow(_pWindow); if (GetFormattedField()) - GetFormattedField()->SetAutoColor(sal_True); + GetFormattedField()->SetAutoColor(true); } @@ -1191,7 +1191,7 @@ void SVTXFormattedField::SetDefaultValue(const ::com::sun::star::uno::Any& rValu } break; default: - pField->EnableEmptyField(sal_True); + pField->EnableEmptyField(true); // nur noch void erlaubt break; } @@ -1323,7 +1323,7 @@ void SVTXFormattedField::setFormatsSupplier(const ::com::sun::star::uno::Referen { // save the actual value ::com::sun::star::uno::Any aCurrent = GetValue(); - pField->SetFormatter(m_pCurrentSupplier->GetNumberFormatter(), sal_False); + pField->SetFormatter(m_pCurrentSupplier->GetNumberFormatter(), false); if (nKeyToSetDelayed != -1) { pField->SetFormatKey(nKeyToSetDelayed); diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 326f1825437a..8527e8587868 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -1303,8 +1303,8 @@ void DbFormattedField::Init( Window& rParent, const Reference< XRowSet >& xCurso implAdjustGenericFieldSetting( xUnoModel ); - static_cast< FormattedField* >( m_pWindow )->SetStrictFormat( sal_False ); - static_cast< FormattedField* >( m_pPainter )->SetStrictFormat( sal_False ); + static_cast< FormattedField* >( m_pWindow )->SetStrictFormat( false ); + static_cast< FormattedField* >( m_pPainter )->SetStrictFormat( false ); // wenn man _irgendeine_ Formatierung zulaesst, kann man da sowieso keine Eingabe-Ueberpruefung // machen (das FormattedField unterstuetzt das sowieso nicht, nur abgeleitete Klassen) |