Kaydet (Commit) 93a25661 authored tarafından Noel Grandin's avatar Noel Grandin

convert sfx2/source/inc/templdgi.hxx from String to OUString

Change-Id: Iabd69d07c0d6e13e969bcedddf75506123074f34
üst bde81bfa
...@@ -1119,7 +1119,7 @@ SfxStyleSheetBase *SfxCommonTemplateDialog_Impl::GetSelectedStyle() const ...@@ -1119,7 +1119,7 @@ SfxStyleSheetBase *SfxCommonTemplateDialog_Impl::GetSelectedStyle() const
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr) void SfxCommonTemplateDialog_Impl::SelectStyle(const OUString &rStr)
{ {
const SfxStyleFamilyItem* pItem = GetFamilyItem_Impl(); const SfxStyleFamilyItem* pItem = GetFamilyItem_Impl();
if ( !pItem ) if ( !pItem )
...@@ -1142,7 +1142,7 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr) ...@@ -1142,7 +1142,7 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr)
if ( pTreeBox ) if ( pTreeBox )
{ {
if ( rStr.Len() ) if ( !rStr.isEmpty() )
{ {
SvTreeListEntry* pEntry = pTreeBox->First(); SvTreeListEntry* pEntry = pTreeBox->First();
while ( pEntry ) while ( pEntry )
...@@ -1161,7 +1161,7 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr) ...@@ -1161,7 +1161,7 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr)
} }
else else
{ {
sal_Bool bSelect = ( rStr.Len() > 0 ); sal_Bool bSelect = ! rStr.isEmpty();
if ( bSelect ) if ( bSelect )
{ {
SvTreeListEntry* pEntry = (SvTreeListEntry*)aFmtLb.FirstVisible(); SvTreeListEntry* pEntry = (SvTreeListEntry*)aFmtLb.FirstVisible();
...@@ -1194,9 +1194,9 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr) ...@@ -1194,9 +1194,9 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr)
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
String SfxCommonTemplateDialog_Impl::GetSelectedEntry() const OUString SfxCommonTemplateDialog_Impl::GetSelectedEntry() const
{ {
String aRet; OUString aRet;
if ( pTreeBox ) if ( pTreeBox )
{ {
SvTreeListEntry* pEntry = pTreeBox->FirstSelected(); SvTreeListEntry* pEntry = pTreeBox->FirstSelected();
...@@ -1748,7 +1748,7 @@ void SfxCommonTemplateDialog_Impl::FilterSelect( ...@@ -1748,7 +1748,7 @@ void SfxCommonTemplateDialog_Impl::FilterSelect(
// Internal: Perform functions through the Dispatcher // Internal: Perform functions through the Dispatcher
sal_Bool SfxCommonTemplateDialog_Impl::Execute_Impl( sal_Bool SfxCommonTemplateDialog_Impl::Execute_Impl(
sal_uInt16 nId, const String &rStr, const String& rRefStr, sal_uInt16 nFamily, sal_uInt16 nId, const OUString &rStr, const OUString& rRefStr, sal_uInt16 nFamily,
sal_uInt16 nMask, sal_uInt16 *pIdx, const sal_uInt16* pModifier) sal_uInt16 nMask, sal_uInt16 *pIdx, const sal_uInt16* pModifier)
{ {
SfxDispatcher &rDispatcher = *SFX_APP()->GetDispatcher_Impl(); SfxDispatcher &rDispatcher = *SFX_APP()->GetDispatcher_Impl();
...@@ -1759,7 +1759,7 @@ sal_Bool SfxCommonTemplateDialog_Impl::Execute_Impl( ...@@ -1759,7 +1759,7 @@ sal_Bool SfxCommonTemplateDialog_Impl::Execute_Impl(
SfxStringItem aRefName( SID_STYLE_REFERENCE, rRefStr ); SfxStringItem aRefName( SID_STYLE_REFERENCE, rRefStr );
const SfxPoolItem* pItems[ 6 ]; const SfxPoolItem* pItems[ 6 ];
sal_uInt16 nCount = 0; sal_uInt16 nCount = 0;
if( rStr.Len() ) if( !rStr.isEmpty() )
pItems[ nCount++ ] = &aItem; pItems[ nCount++ ] = &aItem;
pItems[ nCount++ ] = &aFamily; pItems[ nCount++ ] = &aFamily;
if( nMask ) if( nMask )
...@@ -1772,7 +1772,7 @@ sal_Bool SfxCommonTemplateDialog_Impl::Execute_Impl( ...@@ -1772,7 +1772,7 @@ sal_Bool SfxCommonTemplateDialog_Impl::Execute_Impl(
pItems[ nCount++ ] = &aUpdName; pItems[ nCount++ ] = &aUpdName;
} }
if ( rRefStr.Len() ) if ( !rRefStr.isEmpty() )
pItems[ nCount++ ] = &aRefName; pItems[ nCount++ ] = &aRefName;
pItems[ nCount++ ] = 0; pItems[ nCount++ ] = 0;
...@@ -2283,7 +2283,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, ApplyHdl, Control *, pControl ) ...@@ -2283,7 +2283,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, ApplyHdl, Control *, pControl )
(void)pControl; //unused (void)pControl; //unused
// only if that region is allowed // only if that region is allowed
if ( IsInitialized() && 0 != pFamilyState[nActFamily-1] && if ( IsInitialized() && 0 != pFamilyState[nActFamily-1] &&
GetSelectedEntry().Len() ) !GetSelectedEntry().isEmpty() )
{ {
sal_uInt16 nModifier = aFmtLb.GetModifier(); sal_uInt16 nModifier = aFmtLb.GetModifier();
Execute_Impl(SID_STYLE_APPLY, Execute_Impl(SID_STYLE_APPLY,
......
...@@ -191,7 +191,7 @@ protected: ...@@ -191,7 +191,7 @@ protected:
void HideHdl( void* ); void HideHdl( void* );
void ShowHdl( void* ); void ShowHdl( void* );
sal_Bool Execute_Impl( sal_uInt16 nId, const String& rStr, const String& rRefStr, sal_Bool Execute_Impl( sal_uInt16 nId, const OUString& rStr, const OUString& rRefStr,
sal_uInt16 nFamily, sal_uInt16 nMask = 0, sal_uInt16 nFamily, sal_uInt16 nMask = 0,
sal_uInt16* pIdx = NULL, const sal_uInt16* pModifier = NULL ); sal_uInt16* pIdx = NULL, const sal_uInt16* pModifier = NULL );
...@@ -207,7 +207,7 @@ protected: ...@@ -207,7 +207,7 @@ protected:
void SetFamilyState( sal_uInt16 nSlotId, const SfxTemplateItem* ); void SetFamilyState( sal_uInt16 nSlotId, const SfxTemplateItem* );
void SetWaterCanState( const SfxBoolItem* pItem ); void SetWaterCanState( const SfxBoolItem* pItem );
void SelectStyle( const String& rStyle ); void SelectStyle( const OUString& rStyle );
sal_Bool HasSelectedStyle() const; sal_Bool HasSelectedStyle() const;
SfxStyleSheetBase *GetSelectedStyle() const; SfxStyleSheetBase *GetSelectedStyle() const;
void FillTreeBox(); void FillTreeBox();
...@@ -249,7 +249,7 @@ public: ...@@ -249,7 +249,7 @@ public:
void ExecuteContextMenu_Impl( const Point& rPos, Window* pWin ); void ExecuteContextMenu_Impl( const Point& rPos, Window* pWin );
void EnableExample_Impl( sal_uInt16 nId, sal_Bool bEnable ); void EnableExample_Impl( sal_uInt16 nId, sal_Bool bEnable );
SfxStyleFamily GetActualFamily() const; SfxStyleFamily GetActualFamily() const;
String GetSelectedEntry() const; OUString GetSelectedEntry() const;
SfxObjectShell* GetObjectShell() const { return pCurObjShell; } SfxObjectShell* GetObjectShell() const { return pCurObjShell; }
virtual void PrepareDeleteAction(); // disable buttons, change button text, etc. when del is going to happen virtual void PrepareDeleteAction(); // disable buttons, change button text, etc. when del is going to happen
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment