XubString->OUString
Change-Id: I04c7da143425a9d8cc4fae155ad45a469df953c1
This commit is contained in:
parent
3e9ae4da94
commit
9dd40c656f
@ -3356,7 +3356,7 @@ void SvxCharTwoLinesPage::SetBracket( sal_Unicode cBracket, sal_Bool bStart )
|
|||||||
{
|
{
|
||||||
if ( (sal_uLong)pBox->GetEntryData(i) != CHRDLG_ENCLOSE_SPECIAL_CHAR )
|
if ( (sal_uLong)pBox->GetEntryData(i) != CHRDLG_ENCLOSE_SPECIAL_CHAR )
|
||||||
{
|
{
|
||||||
const sal_Unicode cChar = pBox->GetEntry(i).GetChar(0);
|
const sal_Unicode cChar = pBox->GetEntry(i)[0];
|
||||||
if ( cChar == cBracket )
|
if ( cChar == cBracket )
|
||||||
{
|
{
|
||||||
pBox->SelectEntryPos(i);
|
pBox->SelectEntryPos(i);
|
||||||
|
@ -419,8 +419,8 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
|
|||||||
|
|
||||||
if ( mpIMEInfos->bWasCursorOverwrite )
|
if ( mpIMEInfos->bWasCursorOverwrite )
|
||||||
{
|
{
|
||||||
sal_uInt16 nOldIMETextLen = mpIMEInfos->nLen;
|
sal_Int32 nOldIMETextLen = mpIMEInfos->nLen;
|
||||||
sal_uInt16 nNewIMETextLen = pData->GetText().Len();
|
sal_Int32 nNewIMETextLen = pData->GetText().getLength();
|
||||||
|
|
||||||
if ( ( nOldIMETextLen > nNewIMETextLen ) &&
|
if ( ( nOldIMETextLen > nNewIMETextLen ) &&
|
||||||
( nNewIMETextLen < mpIMEInfos->aOldTextAfterStartPos.Len() ) )
|
( nNewIMETextLen < mpIMEInfos->aOldTextAfterStartPos.Len() ) )
|
||||||
@ -449,13 +449,13 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
|
|||||||
}
|
}
|
||||||
if ( pData->GetTextAttr() )
|
if ( pData->GetTextAttr() )
|
||||||
{
|
{
|
||||||
mpIMEInfos->CopyAttribs( pData->GetTextAttr(), pData->GetText().Len() );
|
mpIMEInfos->CopyAttribs( pData->GetTextAttr(), pData->GetText().getLength() );
|
||||||
mpIMEInfos->bCursor = pData->IsCursorVisible();
|
mpIMEInfos->bCursor = pData->IsCursorVisible();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mpIMEInfos->DestroyAttribs();
|
mpIMEInfos->DestroyAttribs();
|
||||||
mpIMEInfos->nLen = pData->GetText().Len();
|
mpIMEInfos->nLen = pData->GetText().getLength();
|
||||||
}
|
}
|
||||||
|
|
||||||
ParaPortion* pPortion = FindParaPortion( mpIMEInfos->aPos.GetNode() );
|
ParaPortion* pPortion = FindParaPortion( mpIMEInfos->aPos.GetNode() );
|
||||||
|
@ -845,7 +845,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu )
|
|||||||
{
|
{
|
||||||
sal_uInt16 nItemId = pMenu->GetItemId( nPos );
|
sal_uInt16 nItemId = pMenu->GetItemId( nPos );
|
||||||
if (( pMenu->GetItemType( nPos ) != MENUITEM_SEPARATOR ) &&
|
if (( pMenu->GetItemType( nPos ) != MENUITEM_SEPARATOR ) &&
|
||||||
( pMenu->GetItemText( nItemId ).Len() == 0 ))
|
( pMenu->GetItemText( nItemId ).isEmpty() ))
|
||||||
{
|
{
|
||||||
String aCommand = pMenu->GetItemCommand( nItemId );
|
String aCommand = pMenu->GetItemCommand( nItemId );
|
||||||
if ( aCommand.Len() > 0 ) {
|
if ( aCommand.Len() > 0 ) {
|
||||||
@ -1252,7 +1252,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (( pMenu->IsMenuBar() || bAccessibilityEnabled ) &&
|
if (( pMenu->IsMenuBar() || bAccessibilityEnabled ) &&
|
||||||
( pMenu->GetItemText( nItemId ).Len() == 0 ))
|
( pMenu->GetItemText( nItemId ).isEmpty() ))
|
||||||
{
|
{
|
||||||
if ( !aItemCommand.isEmpty() )
|
if ( !aItemCommand.isEmpty() )
|
||||||
pMenu->SetItemText( nItemId, RetrieveLabelFromCommand( aItemCommand ));
|
pMenu->SetItemText( nItemId, RetrieveLabelFromCommand( aItemCommand ));
|
||||||
@ -1272,7 +1272,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
|
|||||||
{
|
{
|
||||||
// Retrieve module identifier from Help Command entry
|
// Retrieve module identifier from Help Command entry
|
||||||
OUString aModuleIdentifier( rModuleIdentifier );
|
OUString aModuleIdentifier( rModuleIdentifier );
|
||||||
if ( pMenu->GetHelpCommand( nItemId ).Len() > 0 )
|
if (!pMenu->GetHelpCommand(nItemId).isEmpty())
|
||||||
{
|
{
|
||||||
aModuleIdentifier = pMenu->GetHelpCommand( nItemId );
|
aModuleIdentifier = pMenu->GetHelpCommand( nItemId );
|
||||||
pMenu->SetHelpCommand( nItemId, aEmpty );
|
pMenu->SetHelpCommand( nItemId, aEmpty );
|
||||||
|
@ -177,9 +177,9 @@ public:
|
|||||||
virtual void UserDraw( const UserDrawEvent& rUDEvt );
|
virtual void UserDraw( const UserDrawEvent& rUDEvt );
|
||||||
|
|
||||||
using ListBox::InsertEntry;
|
using ListBox::InsertEntry;
|
||||||
virtual sal_uInt16 InsertEntry( const XubString& rStr,
|
virtual sal_uInt16 InsertEntry( const OUString& rStr,
|
||||||
sal_uInt16 nPos = LISTBOX_APPEND );
|
sal_uInt16 nPos = LISTBOX_APPEND );
|
||||||
virtual sal_uInt16 InsertEntry( const Color& rColor, const XubString& rStr,
|
virtual sal_uInt16 InsertEntry( const Color& rColor, const OUString& rStr,
|
||||||
sal_uInt16 nPos = LISTBOX_APPEND );
|
sal_uInt16 nPos = LISTBOX_APPEND );
|
||||||
void InsertAutomaticEntryColor(const Color &rAutoColorValue);
|
void InsertAutomaticEntryColor(const Color &rAutoColorValue);
|
||||||
bool IsAutomaticSelected() { return !GetSelectEntryPos(); }
|
bool IsAutomaticSelected() { return !GetSelectEntryPos(); }
|
||||||
@ -193,7 +193,7 @@ public:
|
|||||||
virtual Color GetEntryColor( sal_uInt16 nPos ) const;
|
virtual Color GetEntryColor( sal_uInt16 nPos ) const;
|
||||||
Size GetImageSize() const { return aImageSize; }
|
Size GetImageSize() const { return aImageSize; }
|
||||||
|
|
||||||
void SelectEntry( const XubString& rStr, sal_Bool bSelect = sal_True )
|
void SelectEntry( const OUString& rStr, sal_Bool bSelect = sal_True )
|
||||||
{ ListBox::SelectEntry( rStr, bSelect ); }
|
{ ListBox::SelectEntry( rStr, bSelect ); }
|
||||||
void SelectEntry( const Color& rColor, sal_Bool bSelect = sal_True );
|
void SelectEntry( const Color& rColor, sal_Bool bSelect = sal_True );
|
||||||
Color GetSelectEntryColor( sal_uInt16 nSelIndex = 0 ) const;
|
Color GetSelectEntryColor( sal_uInt16 nSelIndex = 0 ) const;
|
||||||
@ -297,7 +297,7 @@ class SVT_DLLPUBLIC LineListBox : public ListBox
|
|||||||
{
|
{
|
||||||
ImpLineList* pLineList;
|
ImpLineList* pLineList;
|
||||||
long m_nWidth;
|
long m_nWidth;
|
||||||
XubString m_sNone;
|
OUString m_sNone;
|
||||||
|
|
||||||
VirtualDevice aVirDev;
|
VirtualDevice aVirDev;
|
||||||
Size aTxtSize;
|
Size aTxtSize;
|
||||||
@ -324,10 +324,10 @@ public:
|
|||||||
/** Set the width in Twips */
|
/** Set the width in Twips */
|
||||||
void SetWidth( long nWidth );
|
void SetWidth( long nWidth );
|
||||||
long GetWidth() const { return m_nWidth; }
|
long GetWidth() const { return m_nWidth; }
|
||||||
void SetNone( const XubString& sNone );
|
void SetNone( const OUString& sNone );
|
||||||
|
|
||||||
using ListBox::InsertEntry;
|
using ListBox::InsertEntry;
|
||||||
virtual sal_uInt16 InsertEntry( const XubString& rStr, sal_uInt16 nPos = LISTBOX_APPEND );
|
virtual sal_uInt16 InsertEntry( const OUString& rStr, sal_uInt16 nPos = LISTBOX_APPEND );
|
||||||
/** Insert a listbox entry with all widths in Twips. */
|
/** Insert a listbox entry with all widths in Twips. */
|
||||||
void InsertEntry( BorderWidthImpl aWidthImpl,
|
void InsertEntry( BorderWidthImpl aWidthImpl,
|
||||||
sal_uInt16 nStyle, long nMinWidth = 0,
|
sal_uInt16 nStyle, long nMinWidth = 0,
|
||||||
@ -343,7 +343,7 @@ public:
|
|||||||
virtual sal_uInt16 GetEntryPos( sal_uInt16 nStyle = STYLE_SOLID ) const;
|
virtual sal_uInt16 GetEntryPos( sal_uInt16 nStyle = STYLE_SOLID ) const;
|
||||||
sal_uInt16 GetEntryStyle( sal_uInt16 nPos ) const;
|
sal_uInt16 GetEntryStyle( sal_uInt16 nPos ) const;
|
||||||
|
|
||||||
void SelectEntry( const XubString& rStr, sal_Bool bSelect = sal_True ) { ListBox::SelectEntry( rStr, bSelect ); }
|
void SelectEntry( const OUString& rStr, sal_Bool bSelect = sal_True ) { ListBox::SelectEntry( rStr, bSelect ); }
|
||||||
void SelectEntry( sal_uInt16 nStyle = STYLE_SOLID, sal_Bool bSelect = sal_True );
|
void SelectEntry( sal_uInt16 nStyle = STYLE_SOLID, sal_Bool bSelect = sal_True );
|
||||||
sal_uInt16 GetSelectEntryStyle( sal_uInt16 nSelIndex = 0 ) const;
|
sal_uInt16 GetSelectEntryStyle( sal_uInt16 nSelIndex = 0 ) const;
|
||||||
bool IsEntrySelected(const OUString& rStr) const
|
bool IsEntrySelected(const OUString& rStr) const
|
||||||
@ -401,7 +401,7 @@ inline void LineListBox::SetWidth( long nWidth )
|
|||||||
UpdateEntries( nOldWidth );
|
UpdateEntries( nOldWidth );
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void LineListBox::SetNone( const XubString& sNone )
|
inline void LineListBox::SetNone( const OUString& sNone )
|
||||||
{
|
{
|
||||||
m_sNone = sNone;
|
m_sNone = sNone;
|
||||||
}
|
}
|
||||||
@ -449,7 +449,7 @@ private:
|
|||||||
|
|
||||||
class SVT_DLLPUBLIC FontStyleBox : public ComboBox
|
class SVT_DLLPUBLIC FontStyleBox : public ComboBox
|
||||||
{
|
{
|
||||||
XubString aLastStyle;
|
OUString aLastStyle;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
using ComboBox::SetText;
|
using ComboBox::SetText;
|
||||||
@ -463,7 +463,7 @@ public:
|
|||||||
virtual void Modify();
|
virtual void Modify();
|
||||||
|
|
||||||
void SetText( const OUString& rText );
|
void SetText( const OUString& rText );
|
||||||
void Fill( const XubString& rName, const FontList* pList );
|
void Fill( const OUString& rName, const FontList* pList );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// declared as private because some compilers would generate the default functions
|
// declared as private because some compilers would generate the default functions
|
||||||
|
@ -308,7 +308,7 @@ public:
|
|||||||
virtual void Select();
|
virtual void Select();
|
||||||
virtual void DoubleClick();
|
virtual void DoubleClick();
|
||||||
|
|
||||||
void InsertItem( sal_uInt16 nItemId, const XubString& rText,
|
void InsertItem( sal_uInt16 nItemId, const OUString& rText,
|
||||||
long nSize, HeaderBarItemBits nBits = HIB_STDSTYLE,
|
long nSize, HeaderBarItemBits nBits = HIB_STDSTYLE,
|
||||||
sal_uInt16 nPos = HEADERBAR_APPEND );
|
sal_uInt16 nPos = HEADERBAR_APPEND );
|
||||||
void RemoveItem( sal_uInt16 nItemId );
|
void RemoveItem( sal_uInt16 nItemId );
|
||||||
@ -336,11 +336,11 @@ public:
|
|||||||
void SetItemBits( sal_uInt16 nItemId, HeaderBarItemBits nNewBits );
|
void SetItemBits( sal_uInt16 nItemId, HeaderBarItemBits nNewBits );
|
||||||
HeaderBarItemBits GetItemBits( sal_uInt16 nItemId ) const;
|
HeaderBarItemBits GetItemBits( sal_uInt16 nItemId ) const;
|
||||||
|
|
||||||
void SetItemText( sal_uInt16 nItemId, const XubString& rText );
|
void SetItemText( sal_uInt16 nItemId, const OUString& rText );
|
||||||
XubString GetItemText( sal_uInt16 nItemId ) const;
|
OUString GetItemText( sal_uInt16 nItemId ) const;
|
||||||
|
|
||||||
XubString GetHelpText( sal_uInt16 nItemId ) const;
|
OUString GetHelpText( sal_uInt16 nItemId ) const;
|
||||||
OString GetHelpId( sal_uInt16 nItemId ) const;
|
OString GetHelpId( sal_uInt16 nItemId ) const;
|
||||||
|
|
||||||
Size CalcWindowSizePixel() const;
|
Size CalcWindowSizePixel() const;
|
||||||
|
|
||||||
|
@ -512,14 +512,14 @@ public:
|
|||||||
|
|
||||||
void SetPageText( sal_uInt16 nPageId, const OUString& rText );
|
void SetPageText( sal_uInt16 nPageId, const OUString& rText );
|
||||||
OUString GetPageText( sal_uInt16 nPageId ) const;
|
OUString GetPageText( sal_uInt16 nPageId ) const;
|
||||||
XubString GetHelpText( sal_uInt16 nPageId ) const;
|
OUString GetHelpText( sal_uInt16 nPageId ) const;
|
||||||
OString GetHelpId( sal_uInt16 nPageId ) const;
|
OString GetHelpId( sal_uInt16 nPageId ) const;
|
||||||
|
|
||||||
long GetSplitSize() const { return mnSplitSize; }
|
long GetSplitSize() const { return mnSplitSize; }
|
||||||
|
|
||||||
void SetHelpText( const XubString& rText )
|
void SetHelpText( const OUString& rText )
|
||||||
{ Window::SetHelpText( rText ); }
|
{ Window::SetHelpText( rText ); }
|
||||||
XubString GetHelpText() const
|
OUString GetHelpText() const
|
||||||
{ return Window::GetHelpText(); };
|
{ return Window::GetHelpText(); };
|
||||||
void SetHelpId( const OString& rId )
|
void SetHelpId( const OString& rId )
|
||||||
{ Window::SetHelpId( rId ); }
|
{ Window::SetHelpId( rId ); }
|
||||||
|
@ -40,7 +40,7 @@ class VCL_DLLPUBLIC Accelerator : public Resource
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
ImplAccelData* mpData;
|
ImplAccelData* mpData;
|
||||||
XubString maHelpStr;
|
OUString maHelpStr;
|
||||||
Link maActivateHdl;
|
Link maActivateHdl;
|
||||||
Link maDeactivateHdl;
|
Link maDeactivateHdl;
|
||||||
Link maSelectHdl;
|
Link maSelectHdl;
|
||||||
@ -87,8 +87,8 @@ public:
|
|||||||
|
|
||||||
Accelerator* GetAccel( sal_uInt16 nItemId ) const;
|
Accelerator* GetAccel( sal_uInt16 nItemId ) const;
|
||||||
|
|
||||||
void SetHelpText( const XubString& rHelpText ) { maHelpStr = rHelpText; }
|
void SetHelpText( const OUString& rHelpText ) { maHelpStr = rHelpText; }
|
||||||
const XubString& GetHelpText() const { return maHelpStr; }
|
const OUString& GetHelpText() const { return maHelpStr; }
|
||||||
|
|
||||||
void SetActivateHdl( const Link& rLink ) { maActivateHdl = rLink; }
|
void SetActivateHdl( const Link& rLink ) { maActivateHdl = rLink; }
|
||||||
const Link& GetActivateHdl() const { return maActivateHdl; }
|
const Link& GetActivateHdl() const { return maActivateHdl; }
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
class VCL_DLLPUBLIC CommandExtTextInputData
|
class VCL_DLLPUBLIC CommandExtTextInputData
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
XubString maText;
|
OUString maText;
|
||||||
sal_uInt16* mpTextAttr;
|
sal_uInt16* mpTextAttr;
|
||||||
xub_StrLen mnCursorPos;
|
xub_StrLen mnCursorPos;
|
||||||
xub_StrLen mnDeltaStart;
|
xub_StrLen mnDeltaStart;
|
||||||
@ -54,7 +54,7 @@ private:
|
|||||||
sal_Bool mbOnlyCursor;
|
sal_Bool mbOnlyCursor;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CommandExtTextInputData( const XubString& rText,
|
CommandExtTextInputData( const OUString& rText,
|
||||||
const sal_uInt16* pTextAttr,
|
const sal_uInt16* pTextAttr,
|
||||||
xub_StrLen nCursorPos,
|
xub_StrLen nCursorPos,
|
||||||
sal_uInt16 nCursorFlags,
|
sal_uInt16 nCursorFlags,
|
||||||
@ -64,7 +64,7 @@ public:
|
|||||||
CommandExtTextInputData( const CommandExtTextInputData& rData );
|
CommandExtTextInputData( const CommandExtTextInputData& rData );
|
||||||
~CommandExtTextInputData();
|
~CommandExtTextInputData();
|
||||||
|
|
||||||
const XubString& GetText() const { return maText; }
|
const OUString& GetText() const { return maText; }
|
||||||
const sal_uInt16* GetTextAttr() const { return mpTextAttr; }
|
const sal_uInt16* GetTextAttr() const { return mpTextAttr; }
|
||||||
sal_uInt16 GetCharTextAttr( sal_uInt16 nIndex ) const;
|
sal_uInt16 GetCharTextAttr( sal_uInt16 nIndex ) const;
|
||||||
xub_StrLen GetCursorPos() const { return mnCursorPos; }
|
xub_StrLen GetCursorPos() const { return mnCursorPos; }
|
||||||
@ -78,7 +78,7 @@ public:
|
|||||||
|
|
||||||
inline sal_uInt16 CommandExtTextInputData::GetCharTextAttr( sal_uInt16 nIndex ) const
|
inline sal_uInt16 CommandExtTextInputData::GetCharTextAttr( sal_uInt16 nIndex ) const
|
||||||
{
|
{
|
||||||
if ( mpTextAttr && (nIndex < maText.Len()) )
|
if ( mpTextAttr && (nIndex < maText.getLength()) )
|
||||||
return mpTextAttr[nIndex];
|
return mpTextAttr[nIndex];
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -114,21 +114,21 @@ public:
|
|||||||
|
|
||||||
void EnableDDAutoWidth( sal_Bool b );
|
void EnableDDAutoWidth( sal_Bool b );
|
||||||
|
|
||||||
virtual sal_uInt16 InsertEntry( const XubString& rStr, sal_uInt16 nPos = LISTBOX_APPEND );
|
virtual sal_uInt16 InsertEntry( const OUString& rStr, sal_uInt16 nPos = LISTBOX_APPEND );
|
||||||
virtual sal_uInt16 InsertEntry( const Image& rImage, sal_uInt16 nPos = LISTBOX_APPEND );
|
virtual sal_uInt16 InsertEntry( const Image& rImage, sal_uInt16 nPos = LISTBOX_APPEND );
|
||||||
virtual sal_uInt16 InsertEntry( const XubString& rStr, const Image& rImage, sal_uInt16 nPos = LISTBOX_APPEND );
|
virtual sal_uInt16 InsertEntry( const OUString& rStr, const Image& rImage, sal_uInt16 nPos = LISTBOX_APPEND );
|
||||||
virtual void RemoveEntry( const XubString& rStr );
|
virtual void RemoveEntry( const OUString& rStr );
|
||||||
virtual void RemoveEntry( sal_uInt16 nPos );
|
virtual void RemoveEntry( sal_uInt16 nPos );
|
||||||
|
|
||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
|
|
||||||
virtual sal_uInt16 GetEntryPos( const XubString& rStr ) const;
|
virtual sal_uInt16 GetEntryPos( const OUString& rStr ) const;
|
||||||
virtual sal_uInt16 GetEntryPos( const void* pData ) const;
|
virtual sal_uInt16 GetEntryPos( const void* pData ) const;
|
||||||
Image GetEntryImage( sal_uInt16 nPos ) const;
|
Image GetEntryImage( sal_uInt16 nPos ) const;
|
||||||
virtual XubString GetEntry( sal_uInt16 nPos ) const;
|
virtual OUString GetEntry( sal_uInt16 nPos ) const;
|
||||||
virtual sal_uInt16 GetEntryCount() const;
|
virtual sal_uInt16 GetEntryCount() const;
|
||||||
|
|
||||||
virtual void SelectEntry( const XubString& rStr, sal_Bool bSelect = sal_True );
|
virtual void SelectEntry( const OUString& rStr, sal_Bool bSelect = sal_True );
|
||||||
virtual void SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect = sal_True );
|
virtual void SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect = sal_True );
|
||||||
|
|
||||||
virtual sal_uInt16 GetSelectEntryCount() const;
|
virtual sal_uInt16 GetSelectEntryCount() const;
|
||||||
|
@ -164,7 +164,7 @@ protected:
|
|||||||
SAL_DLLPRIVATE void ImplFillLayoutData() const;
|
SAL_DLLPRIVATE void ImplFillLayoutData() const;
|
||||||
SAL_DLLPRIVATE SalMenu* ImplGetSalMenu() { return mpSalMenu; }
|
SAL_DLLPRIVATE SalMenu* ImplGetSalMenu() { return mpSalMenu; }
|
||||||
SAL_DLLPRIVATE void ImplSetSalMenu( SalMenu *pMenu );
|
SAL_DLLPRIVATE void ImplSetSalMenu( SalMenu *pMenu );
|
||||||
SAL_DLLPRIVATE const XubString& ImplGetHelpText( sal_uInt16 nItemId ) const;
|
SAL_DLLPRIVATE OUString ImplGetHelpText( sal_uInt16 nItemId ) const;
|
||||||
|
|
||||||
// returns native check and option menu symbol height in rCheckHeight and rRadioHeight
|
// returns native check and option menu symbol height in rCheckHeight and rRadioHeight
|
||||||
// return value is maximum width and height of checkboxes and radiobuttons
|
// return value is maximum width and height of checkboxes and radiobuttons
|
||||||
@ -194,7 +194,7 @@ public:
|
|||||||
virtual void Select();
|
virtual void Select();
|
||||||
virtual void RequestHelp( const HelpEvent& rHEvt );
|
virtual void RequestHelp( const HelpEvent& rHEvt );
|
||||||
|
|
||||||
void InsertItem( sal_uInt16 nItemId, const XubString& rStr,
|
void InsertItem( sal_uInt16 nItemId, const OUString& rStr,
|
||||||
MenuItemBits nItemBits = 0,
|
MenuItemBits nItemBits = 0,
|
||||||
const OString &rIdent = OString(),
|
const OString &rIdent = OString(),
|
||||||
sal_uInt16 nPos = MENU_APPEND );
|
sal_uInt16 nPos = MENU_APPEND );
|
||||||
@ -203,7 +203,7 @@ public:
|
|||||||
const OString &rIdent = OString(),
|
const OString &rIdent = OString(),
|
||||||
sal_uInt16 nPos = MENU_APPEND );
|
sal_uInt16 nPos = MENU_APPEND );
|
||||||
void InsertItem( sal_uInt16 nItemId,
|
void InsertItem( sal_uInt16 nItemId,
|
||||||
const XubString& rString, const Image& rImage,
|
const OUString& rString, const Image& rImage,
|
||||||
MenuItemBits nItemBits = 0,
|
MenuItemBits nItemBits = 0,
|
||||||
const OString &rIdent = OString(),
|
const OString &rIdent = OString(),
|
||||||
sal_uInt16 nPos = MENU_APPEND );
|
sal_uInt16 nPos = MENU_APPEND );
|
||||||
@ -267,8 +267,8 @@ public:
|
|||||||
void RemoveDisabledEntries( sal_Bool bCheckPopups = sal_True, sal_Bool bRemoveEmptyPopups = sal_False );
|
void RemoveDisabledEntries( sal_Bool bCheckPopups = sal_True, sal_Bool bRemoveEmptyPopups = sal_False );
|
||||||
sal_Bool HasValidEntries( sal_Bool bCheckPopups = sal_True );
|
sal_Bool HasValidEntries( sal_Bool bCheckPopups = sal_True );
|
||||||
|
|
||||||
void SetItemText( sal_uInt16 nItemId, const XubString& rStr );
|
void SetItemText( sal_uInt16 nItemId, const OUString& rStr );
|
||||||
XubString GetItemText( sal_uInt16 nItemId ) const;
|
OUString GetItemText( sal_uInt16 nItemId ) const;
|
||||||
|
|
||||||
void SetItemImage( sal_uInt16 nItemId, const Image& rImage );
|
void SetItemImage( sal_uInt16 nItemId, const Image& rImage );
|
||||||
Image GetItemImage( sal_uInt16 nItemId ) const;
|
Image GetItemImage( sal_uInt16 nItemId ) const;
|
||||||
@ -278,19 +278,19 @@ public:
|
|||||||
sal_Bool GetItemImageMirrorMode( sal_uInt16 ) const;
|
sal_Bool GetItemImageMirrorMode( sal_uInt16 ) const;
|
||||||
|
|
||||||
void SetItemCommand( sal_uInt16 nItemId, const OUString& rCommand );
|
void SetItemCommand( sal_uInt16 nItemId, const OUString& rCommand );
|
||||||
const OUString GetItemCommand( sal_uInt16 nItemId ) const;
|
OUString GetItemCommand( sal_uInt16 nItemId ) const;
|
||||||
|
|
||||||
void SetHelpText( sal_uInt16 nItemId, const XubString& rString );
|
void SetHelpText( sal_uInt16 nItemId, const OUString& rString );
|
||||||
const XubString& GetHelpText( sal_uInt16 nItemId ) const;
|
OUString GetHelpText( sal_uInt16 nItemId ) const;
|
||||||
|
|
||||||
void SetTipHelpText( sal_uInt16 nItemId, const XubString& rString );
|
void SetTipHelpText( sal_uInt16 nItemId, const OUString& rString );
|
||||||
const XubString& GetTipHelpText( sal_uInt16 nItemId ) const;
|
OUString GetTipHelpText( sal_uInt16 nItemId ) const;
|
||||||
|
|
||||||
void SetHelpCommand( sal_uInt16 nItemId, const XubString& rString );
|
void SetHelpCommand( sal_uInt16 nItemId, const OUString& rString );
|
||||||
const XubString& GetHelpCommand( sal_uInt16 nItemId ) const;
|
OUString GetHelpCommand( sal_uInt16 nItemId ) const;
|
||||||
|
|
||||||
void SetHelpId( sal_uInt16 nItemId, const OString& rHelpId );
|
void SetHelpId( sal_uInt16 nItemId, const OString& rHelpId );
|
||||||
OString GetHelpId( sal_uInt16 nItemId ) const;
|
OString GetHelpId( sal_uInt16 nItemId ) const;
|
||||||
|
|
||||||
void SetActivateHdl( const Link& rLink ) { aActivateHdl = rLink; }
|
void SetActivateHdl( const Link& rLink ) { aActivateHdl = rLink; }
|
||||||
const Link& GetActivateHdl() const { return aActivateHdl; }
|
const Link& GetActivateHdl() const { return aActivateHdl; }
|
||||||
@ -343,8 +343,8 @@ public:
|
|||||||
|
|
||||||
Window* GetWindow() const { return pWindow; }
|
Window* GetWindow() const { return pWindow; }
|
||||||
|
|
||||||
void SetAccessibleName( sal_uInt16 nItemId, const XubString& rStr );
|
void SetAccessibleName( sal_uInt16 nItemId, const OUString& rStr );
|
||||||
XubString GetAccessibleName( sal_uInt16 nItemId ) const;
|
OUString GetAccessibleName( sal_uInt16 nItemId ) const;
|
||||||
|
|
||||||
// returns whether the item a position nItemPos is highlighted or not.
|
// returns whether the item a position nItemPos is highlighted or not.
|
||||||
bool IsHighlighted( sal_uInt16 nItemPos ) const;
|
bool IsHighlighted( sal_uInt16 nItemPos ) const;
|
||||||
|
@ -144,7 +144,7 @@ protected:
|
|||||||
void ImpRemoveText();
|
void ImpRemoveText();
|
||||||
TextPaM ImpDeleteText( const TextSelection& rSel );
|
TextPaM ImpDeleteText( const TextSelection& rSel );
|
||||||
TextPaM ImpInsertText( const TextSelection& rSel, sal_Unicode c, sal_Bool bOverwrite = sal_False );
|
TextPaM ImpInsertText( const TextSelection& rSel, sal_Unicode c, sal_Bool bOverwrite = sal_False );
|
||||||
TextPaM ImpInsertText( const TextSelection& rSel, const String& rText );
|
TextPaM ImpInsertText( const TextSelection& rSel, const OUString& rText );
|
||||||
TextPaM ImpInsertParaBreak( const TextSelection& rTextSelection, sal_Bool bKeepEndingAttribs = sal_True );
|
TextPaM ImpInsertParaBreak( const TextSelection& rTextSelection, sal_Bool bKeepEndingAttribs = sal_True );
|
||||||
TextPaM ImpInsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs = sal_True );
|
TextPaM ImpInsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs = sal_True );
|
||||||
void ImpRemoveChars( const TextPaM& rPaM, sal_uInt16 nChars, SfxUndoAction* pCurUndo = 0 );
|
void ImpRemoveChars( const TextPaM& rPaM, sal_uInt16 nChars, SfxUndoAction* pCurUndo = 0 );
|
||||||
|
@ -62,7 +62,7 @@ namespace com { namespace sun { namespace star {
|
|||||||
#define VCLEVENT_WINDOW_MOUSEMOVE 1015 // pData = MouseEvent*
|
#define VCLEVENT_WINDOW_MOUSEMOVE 1015 // pData = MouseEvent*
|
||||||
#define VCLEVENT_WINDOW_MOUSEBUTTONDOWN 1016 // pData = MouseEvent*
|
#define VCLEVENT_WINDOW_MOUSEBUTTONDOWN 1016 // pData = MouseEvent*
|
||||||
#define VCLEVENT_WINDOW_MOUSEBUTTONUP 1017 // pData = MouseEvent*
|
#define VCLEVENT_WINDOW_MOUSEBUTTONUP 1017 // pData = MouseEvent*
|
||||||
#define VCLEVENT_WINDOW_FRAMETITLECHANGED 1018 // pData = XubString* = oldTitle
|
#define VCLEVENT_WINDOW_FRAMETITLECHANGED 1018 // pData = OUString* = oldTitle
|
||||||
#define VCLEVENT_APPLICATION_DATACHANGED 1019 // pData = DataChangedEvent*
|
#define VCLEVENT_APPLICATION_DATACHANGED 1019 // pData = DataChangedEvent*
|
||||||
#define VCLEVENT_WINDOW_ENABLED 1020
|
#define VCLEVENT_WINDOW_ENABLED 1020
|
||||||
#define VCLEVENT_WINDOW_DISABLED 1021
|
#define VCLEVENT_WINDOW_DISABLED 1021
|
||||||
|
@ -180,7 +180,7 @@ String PADialog::getSelectedDevice()
|
|||||||
{
|
{
|
||||||
int nPos = m_aDevicesLB.GetSelectEntryPos();
|
int nPos = m_aDevicesLB.GetSelectEntryPos();
|
||||||
int nLen = (int)(sal_IntPtr)m_aDevicesLB.GetEntryData( nPos );
|
int nLen = (int)(sal_IntPtr)m_aDevicesLB.GetEntryData( nPos );
|
||||||
return m_aDevicesLB.GetEntry( nPos ).Copy( 0, nLen );
|
return m_aDevicesLB.GetEntry( nPos ).copy( 0, nLen );
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK( PADialog, DelPressedHdl, ListBox*, pBox )
|
IMPL_LINK( PADialog, DelPressedHdl, ListBox*, pBox )
|
||||||
@ -592,10 +592,10 @@ void PADialog::AddDevice()
|
|||||||
|
|
||||||
void PADialog::RemDevice()
|
void PADialog::RemDevice()
|
||||||
{
|
{
|
||||||
String aPrinter( getSelectedDevice() );
|
OUString aPrinter( getSelectedDevice() );
|
||||||
String aDefPrinter( m_rPIManager.getDefaultPrinter() );
|
OUString aDefPrinter( m_rPIManager.getDefaultPrinter() );
|
||||||
// do not remove the default printer
|
// do not remove the default printer
|
||||||
if( aPrinter.Equals( aDefPrinter ) )
|
if( aPrinter.equals( aDefPrinter ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( ! m_rPIManager.removePrinter( aPrinter ) )
|
if( ! m_rPIManager.removePrinter( aPrinter ) )
|
||||||
@ -609,9 +609,9 @@ void PADialog::RemDevice()
|
|||||||
m_aPrinters.remove( aPrinter );
|
m_aPrinters.remove( aPrinter );
|
||||||
|
|
||||||
m_aDevicesLB.RemoveEntry( m_aDevicesLB.GetSelectEntryPos() );
|
m_aDevicesLB.RemoveEntry( m_aDevicesLB.GetSelectEntryPos() );
|
||||||
for( int i=0; i < m_aDevicesLB.GetEntryCount(); i++ )
|
for (int i=0; i < m_aDevicesLB.GetEntryCount(); ++i)
|
||||||
{
|
{
|
||||||
if( m_aDevicesLB.GetEntry( i ).CompareTo( aDefPrinter, aDefPrinter.Len() ) == COMPARE_EQUAL )
|
if (m_aDevicesLB.GetEntry(i).equals(aDefPrinter))
|
||||||
{
|
{
|
||||||
m_aDevicesLB.SelectEntryPos( i, sal_True );
|
m_aDevicesLB.SelectEntryPos( i, sal_True );
|
||||||
UpdateText();
|
UpdateText();
|
||||||
@ -627,9 +627,9 @@ void PADialog::RemDevice()
|
|||||||
|
|
||||||
void PADialog::ConfigureDevice()
|
void PADialog::ConfigureDevice()
|
||||||
{
|
{
|
||||||
String aPrinter( getSelectedDevice() );
|
OUString aPrinter(getSelectedDevice());
|
||||||
|
|
||||||
if( ! aPrinter.Len() )
|
if (aPrinter.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PrinterInfo aInfo( m_rPIManager.getPrinterInfo( aPrinter ) );
|
PrinterInfo aInfo( m_rPIManager.getPrinterInfo( aPrinter ) );
|
||||||
|
@ -1688,23 +1688,23 @@ void Calendar::RequestHelp( const HelpEvent& rHEvt )
|
|||||||
maCalendarWrapper.setGregorianDateTime( aDate);
|
maCalendarWrapper.setGregorianDateTime( aDate);
|
||||||
sal_uInt16 nWeek = (sal_uInt16) maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR);
|
sal_uInt16 nWeek = (sal_uInt16) maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR);
|
||||||
sal_uInt16 nMonth = aDate.GetMonth();
|
sal_uInt16 nMonth = aDate.GetMonth();
|
||||||
XubString aStr( maDayText );
|
OUString aStr( maDayText );
|
||||||
aStr.AppendAscii( ": " );
|
aStr += ": ";
|
||||||
aStr.Append( OUString::number( aDate.GetDayOfYear() ) );
|
aStr += OUString::number(aDate.GetDayOfYear());
|
||||||
aStr.AppendAscii( " / " );
|
aStr += " / ";
|
||||||
aStr.Append( maWeekText );
|
aStr += maWeekText;
|
||||||
aStr.AppendAscii( ": " );
|
aStr += ": ";
|
||||||
aStr.Append( OUString::number( nWeek ) );
|
aStr += OUString::number(nWeek);
|
||||||
// Evt. noch Jahr hinzufuegen, wenn es nicht das gleiche ist
|
// Evt. noch Jahr hinzufuegen, wenn es nicht das gleiche ist
|
||||||
if ( (nMonth == 12) && (nWeek == 1) )
|
if ( (nMonth == 12) && (nWeek == 1) )
|
||||||
{
|
{
|
||||||
aStr.AppendAscii( ", " );
|
aStr += ", ";
|
||||||
aStr.Append( OUString::number( aDate.GetYear()+1 ) );
|
aStr += OUString::number(aDate.GetYear()+1);
|
||||||
}
|
}
|
||||||
else if ( (nMonth == 1) && (nWeek > 50) )
|
else if ( (nMonth == 1) && (nWeek > 50) )
|
||||||
{
|
{
|
||||||
aStr.AppendAscii( ", " );
|
aStr += ", ";
|
||||||
aStr.Append( OUString::number( aDate.GetYear()-1 ) );
|
aStr += OUString::number(aDate.GetYear()-1);
|
||||||
}
|
}
|
||||||
Help::ShowQuickHelp( this, aDateRect, aStr );
|
Help::ShowQuickHelp( this, aDateRect, aStr );
|
||||||
return;
|
return;
|
||||||
@ -2253,7 +2253,7 @@ PushButton* ImplCFieldFloatWin::EnableTodayBtn( sal_Bool bEnable )
|
|||||||
if ( !mpTodayBtn )
|
if ( !mpTodayBtn )
|
||||||
{
|
{
|
||||||
mpTodayBtn = new PushButton( this, WB_NOPOINTERFOCUS );
|
mpTodayBtn = new PushButton( this, WB_NOPOINTERFOCUS );
|
||||||
XubString aTodayText(SVT_RESSTR(STR_SVT_CALENDAR_TODAY));
|
OUString aTodayText(SVT_RESSTR(STR_SVT_CALENDAR_TODAY));
|
||||||
mpTodayBtn->SetText( aTodayText );
|
mpTodayBtn->SetText( aTodayText );
|
||||||
Size aSize;
|
Size aSize;
|
||||||
aSize.Width() = mpTodayBtn->GetCtrlTextWidth( mpTodayBtn->GetText() );
|
aSize.Width() = mpTodayBtn->GetCtrlTextWidth( mpTodayBtn->GetText() );
|
||||||
@ -2285,7 +2285,7 @@ PushButton* ImplCFieldFloatWin::EnableNoneBtn( sal_Bool bEnable )
|
|||||||
if ( !mpNoneBtn )
|
if ( !mpNoneBtn )
|
||||||
{
|
{
|
||||||
mpNoneBtn = new PushButton( this, WB_NOPOINTERFOCUS );
|
mpNoneBtn = new PushButton( this, WB_NOPOINTERFOCUS );
|
||||||
XubString aNoneText(SVT_RESSTR(STR_SVT_CALENDAR_NONE));
|
OUString aNoneText(SVT_RESSTR(STR_SVT_CALENDAR_NONE));
|
||||||
mpNoneBtn->SetText( aNoneText );
|
mpNoneBtn->SetText( aNoneText );
|
||||||
Size aSize;
|
Size aSize;
|
||||||
aSize.Width() = mpNoneBtn->GetCtrlTextWidth( mpNoneBtn->GetText() );
|
aSize.Width() = mpNoneBtn->GetCtrlTextWidth( mpNoneBtn->GetText() );
|
||||||
|
@ -136,7 +136,7 @@ ColorListBox::~ColorListBox()
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
sal_uInt16 ColorListBox::InsertEntry( const XubString& rStr, sal_uInt16 nPos )
|
sal_uInt16 ColorListBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos )
|
||||||
{
|
{
|
||||||
nPos = ListBox::InsertEntry( rStr, nPos );
|
nPos = ListBox::InsertEntry( rStr, nPos );
|
||||||
if ( nPos != LISTBOX_ERROR )
|
if ( nPos != LISTBOX_ERROR )
|
||||||
@ -159,7 +159,7 @@ sal_uInt16 ColorListBox::InsertEntry( const XubString& rStr, sal_uInt16 nPos )
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
sal_uInt16 ColorListBox::InsertEntry( const Color& rColor, const XubString& rStr,
|
sal_uInt16 ColorListBox::InsertEntry( const Color& rColor, const OUString& rStr,
|
||||||
sal_uInt16 nPos )
|
sal_uInt16 nPos )
|
||||||
{
|
{
|
||||||
nPos = ListBox::InsertEntry( rStr, nPos );
|
nPos = ListBox::InsertEntry( rStr, nPos );
|
||||||
@ -529,7 +529,7 @@ sal_uInt16 LineListBox::GetSelectEntryStyle( sal_uInt16 nSelIndex ) const
|
|||||||
sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
|
sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
|
||||||
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
|
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
|
||||||
{
|
{
|
||||||
if ( m_sNone.Len( ) > 0 )
|
if (!m_sNone.isEmpty())
|
||||||
nPos--;
|
nPos--;
|
||||||
nStyle = GetEntryStyle( nPos );
|
nStyle = GetEntryStyle( nPos );
|
||||||
}
|
}
|
||||||
@ -808,7 +808,7 @@ LineListBox::~LineListBox()
|
|||||||
sal_uInt16 LineListBox::GetStylePos( sal_uInt16 nListPos, long nWidth )
|
sal_uInt16 LineListBox::GetStylePos( sal_uInt16 nListPos, long nWidth )
|
||||||
{
|
{
|
||||||
sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
|
sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
|
||||||
if ( m_sNone.Len( ) > 0 )
|
if (!m_sNone.isEmpty())
|
||||||
nListPos--;
|
nListPos--;
|
||||||
|
|
||||||
sal_uInt16 i = 0;
|
sal_uInt16 i = 0;
|
||||||
@ -839,7 +839,7 @@ void LineListBox::SelectEntry( sal_uInt16 nStyle, sal_Bool bSelect )
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
sal_uInt16 LineListBox::InsertEntry( const XubString& rStr, sal_uInt16 nPos )
|
sal_uInt16 LineListBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos )
|
||||||
{
|
{
|
||||||
nPos = ListBox::InsertEntry( rStr, nPos );
|
nPos = ListBox::InsertEntry( rStr, nPos );
|
||||||
if ( nPos != LISTBOX_ERROR ) {
|
if ( nPos != LISTBOX_ERROR ) {
|
||||||
@ -907,7 +907,7 @@ sal_uInt16 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const
|
|||||||
if ( GetEntryStyle( i ) == nStyle )
|
if ( GetEntryStyle( i ) == nStyle )
|
||||||
{
|
{
|
||||||
size_t nPos = i;
|
size_t nPos = i;
|
||||||
if ( m_sNone.Len() > 0 )
|
if (!m_sNone.isEmpty())
|
||||||
nPos ++;
|
nPos ++;
|
||||||
return (sal_uInt16)nPos;
|
return (sal_uInt16)nPos;
|
||||||
}
|
}
|
||||||
@ -954,7 +954,7 @@ void LineListBox::UpdateEntries( long nOldWidth )
|
|||||||
ListBox::RemoveEntry( 0 );
|
ListBox::RemoveEntry( 0 );
|
||||||
|
|
||||||
// Add the new entries based on the defined width
|
// Add the new entries based on the defined width
|
||||||
if ( m_sNone.Len( ) > 0 )
|
if (!m_sNone.isEmpty())
|
||||||
ListBox::InsertEntry( m_sNone, LISTBOX_APPEND );
|
ListBox::InsertEntry( m_sNone, LISTBOX_APPEND );
|
||||||
|
|
||||||
sal_uInt16 n = 0;
|
sal_uInt16 n = 0;
|
||||||
@ -1142,9 +1142,9 @@ void FontNameBox::ImplDestroyFontList()
|
|||||||
void FontNameBox::Fill( const FontList* pList )
|
void FontNameBox::Fill( const FontList* pList )
|
||||||
{
|
{
|
||||||
// store old text and clear box
|
// store old text and clear box
|
||||||
XubString aOldText = GetText();
|
OUString aOldText = GetText();
|
||||||
XubString rEntries = GetMRUEntries();
|
OUString rEntries = GetMRUEntries();
|
||||||
sal_Bool bLoadFromFile = ! rEntries.Len();
|
bool bLoadFromFile = rEntries.isEmpty();
|
||||||
Clear();
|
Clear();
|
||||||
|
|
||||||
ImplDestroyFontList();
|
ImplDestroyFontList();
|
||||||
@ -1176,7 +1176,7 @@ void FontNameBox::Fill( const FontList* pList )
|
|||||||
ImplCalcUserItemSize();
|
ImplCalcUserItemSize();
|
||||||
|
|
||||||
// restore text
|
// restore text
|
||||||
if ( aOldText.Len() )
|
if (!aOldText.isEmpty())
|
||||||
SetText( aOldText );
|
SetText( aOldText );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1476,7 +1476,7 @@ void FontStyleBox::Modify()
|
|||||||
{
|
{
|
||||||
CharClass aChrCls( ::comphelper::getProcessComponentContext(),
|
CharClass aChrCls( ::comphelper::getProcessComponentContext(),
|
||||||
GetSettings().GetLanguageTag() );
|
GetSettings().GetLanguageTag() );
|
||||||
XubString aStr = GetText();
|
OUString aStr = GetText();
|
||||||
sal_uInt16 nEntryCount = GetEntryCount();
|
sal_uInt16 nEntryCount = GetEntryCount();
|
||||||
|
|
||||||
if ( GetEntryPos( aStr ) == COMBOBOX_ENTRY_NOTFOUND )
|
if ( GetEntryPos( aStr ) == COMBOBOX_ENTRY_NOTFOUND )
|
||||||
@ -1484,7 +1484,7 @@ void FontStyleBox::Modify()
|
|||||||
aStr = aChrCls.uppercase(aStr);
|
aStr = aChrCls.uppercase(aStr);
|
||||||
for ( sal_uInt16 i = 0; i < nEntryCount; i++ )
|
for ( sal_uInt16 i = 0; i < nEntryCount; i++ )
|
||||||
{
|
{
|
||||||
XubString aEntryText = aChrCls.uppercase(GetEntry(i));
|
OUString aEntryText = aChrCls.uppercase(GetEntry(i));
|
||||||
|
|
||||||
if ( aStr == aEntryText )
|
if ( aStr == aEntryText )
|
||||||
{
|
{
|
||||||
@ -1499,12 +1499,12 @@ void FontStyleBox::Modify()
|
|||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
void FontStyleBox::Fill( const XubString& rName, const FontList* pList )
|
void FontStyleBox::Fill( const OUString& rName, const FontList* pList )
|
||||||
{
|
{
|
||||||
// note: this method must call ComboBox::SetText(),
|
// note: this method must call ComboBox::SetText(),
|
||||||
// else aLastStyle will overwritten
|
// else aLastStyle will overwritten
|
||||||
// store prior selection position and clear box
|
// store prior selection position and clear box
|
||||||
XubString aOldText = GetText();
|
OUString aOldText = GetText();
|
||||||
sal_uInt16 nPos = GetEntryPos( aOldText );
|
sal_uInt16 nPos = GetEntryPos( aOldText );
|
||||||
Clear();
|
Clear();
|
||||||
|
|
||||||
@ -1608,7 +1608,7 @@ void FontStyleBox::Fill( const XubString& rName, const FontList* pList )
|
|||||||
if ( bNormal || bItalic || bBold )
|
if ( bNormal || bItalic || bBold )
|
||||||
InsertEntry( pList->GetBoldItalicStr() );
|
InsertEntry( pList->GetBoldItalicStr() );
|
||||||
}
|
}
|
||||||
if ( aOldText.Len() )
|
if (!aOldText.isEmpty())
|
||||||
{
|
{
|
||||||
if ( GetEntryPos( aLastStyle ) != LISTBOX_ENTRY_NOTFOUND )
|
if ( GetEntryPos( aLastStyle ) != LISTBOX_ENTRY_NOTFOUND )
|
||||||
ComboBox::SetText( aLastStyle );
|
ComboBox::SetText( aLastStyle );
|
||||||
@ -1628,7 +1628,7 @@ void FontStyleBox::Fill( const XubString& rName, const FontList* pList )
|
|||||||
InsertEntry( pList->GetItalicStr() );
|
InsertEntry( pList->GetItalicStr() );
|
||||||
InsertEntry( pList->GetBoldStr() );
|
InsertEntry( pList->GetBoldStr() );
|
||||||
InsertEntry( pList->GetBoldItalicStr() );
|
InsertEntry( pList->GetBoldItalicStr() );
|
||||||
if ( aOldText.Len() )
|
if (!aOldText.isEmpty())
|
||||||
{
|
{
|
||||||
if ( nPos > GetEntryCount() )
|
if ( nPos > GetEntryCount() )
|
||||||
ComboBox::SetText( GetEntry( 0 ) );
|
ComboBox::SetText( GetEntry( 0 ) );
|
||||||
@ -1711,7 +1711,7 @@ void FontSizeBox::Modify()
|
|||||||
|
|
||||||
if ( bRelativeMode )
|
if ( bRelativeMode )
|
||||||
{
|
{
|
||||||
XubString aStr = comphelper::string::stripStart(GetText(), ' ');
|
OUString aStr = comphelper::string::stripStart(GetText(), ' ');
|
||||||
|
|
||||||
sal_Bool bNewMode = bRelative;
|
sal_Bool bNewMode = bRelative;
|
||||||
sal_Bool bOldPtRelMode = bPtRelative;
|
sal_Bool bOldPtRelMode = bPtRelative;
|
||||||
@ -1719,7 +1719,7 @@ void FontSizeBox::Modify()
|
|||||||
if ( bRelative )
|
if ( bRelative )
|
||||||
{
|
{
|
||||||
bPtRelative = sal_False;
|
bPtRelative = sal_False;
|
||||||
const sal_Unicode* pStr = aStr.GetBuffer();
|
const sal_Unicode* pStr = aStr.getStr();
|
||||||
while ( *pStr )
|
while ( *pStr )
|
||||||
{
|
{
|
||||||
if ( ((*pStr < '0') || (*pStr > '9')) && (*pStr != '%') )
|
if ( ((*pStr < '0') || (*pStr > '9')) && (*pStr != '%') )
|
||||||
@ -1739,13 +1739,13 @@ void FontSizeBox::Modify()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( STRING_NOTFOUND != aStr.Search( '%' ) )
|
if ( -1 != aStr.indexOf('%') )
|
||||||
{
|
{
|
||||||
bNewMode = sal_True;
|
bNewMode = sal_True;
|
||||||
bPtRelative = sal_False;
|
bPtRelative = sal_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( '-' == aStr.GetChar( 0 ) || '+' == aStr.GetChar( 0 ) )
|
if ( '-' == aStr[0] || '+' == aStr[0] )
|
||||||
{
|
{
|
||||||
bNewMode = sal_True;
|
bNewMode = sal_True;
|
||||||
bPtRelative = sal_True;
|
bPtRelative = sal_True;
|
||||||
@ -1795,7 +1795,7 @@ void FontSizeBox::Fill( const FontInfo* pInfo, const FontList* pList )
|
|||||||
bStdSize = sal_False;
|
bStdSize = sal_False;
|
||||||
|
|
||||||
Selection aSelection = GetSelection();
|
Selection aSelection = GetSelection();
|
||||||
XubString aStr = GetText();
|
OUString aStr = GetText();
|
||||||
|
|
||||||
Clear();
|
Clear();
|
||||||
sal_uInt16 nPos = 0;
|
sal_uInt16 nPos = 0;
|
||||||
@ -1876,7 +1876,7 @@ void FontSizeBox::SetRelative( sal_Bool bNewRelative )
|
|||||||
if ( bRelativeMode )
|
if ( bRelativeMode )
|
||||||
{
|
{
|
||||||
Selection aSelection = GetSelection();
|
Selection aSelection = GetSelection();
|
||||||
XubString aStr = comphelper::string::stripStart(GetText(), ' ');
|
OUString aStr = comphelper::string::stripStart(GetText(), ' ');
|
||||||
|
|
||||||
if ( bNewRelative )
|
if ( bNewRelative )
|
||||||
{
|
{
|
||||||
|
@ -34,11 +34,11 @@ public:
|
|||||||
sal_uInt16 mnId;
|
sal_uInt16 mnId;
|
||||||
HeaderBarItemBits mnBits;
|
HeaderBarItemBits mnBits;
|
||||||
long mnSize;
|
long mnSize;
|
||||||
OString maHelpId;
|
OString maHelpId;
|
||||||
Image maImage;
|
Image maImage;
|
||||||
XubString maOutText;
|
OUString maOutText;
|
||||||
XubString maText;
|
OUString maText;
|
||||||
XubString maHelpText;
|
OUString maHelpText;
|
||||||
};
|
};
|
||||||
|
|
||||||
// =======================================================================
|
// =======================================================================
|
||||||
@ -404,7 +404,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
|
|||||||
pItem->maOutText = pItem->maText;
|
pItem->maOutText = pItem->maText;
|
||||||
Size aImageSize = pItem->maImage.GetSizePixel();
|
Size aImageSize = pItem->maImage.GetSizePixel();
|
||||||
Size aTxtSize( pDev->GetTextWidth( pItem->maOutText ), 0 );
|
Size aTxtSize( pDev->GetTextWidth( pItem->maOutText ), 0 );
|
||||||
if ( pItem->maOutText.Len() )
|
if (!pItem->maOutText.isEmpty())
|
||||||
aTxtSize.Height() = pDev->GetTextHeight();
|
aTxtSize.Height() = pDev->GetTextHeight();
|
||||||
long nArrowWidth = 0;
|
long nArrowWidth = 0;
|
||||||
if ( nBits & (HIB_UPARROW | HIB_DOWNARROW) )
|
if ( nBits & (HIB_UPARROW | HIB_DOWNARROW) )
|
||||||
@ -429,18 +429,19 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
|
|||||||
if ( nTxtWidth > nMaxTxtWidth )
|
if ( nTxtWidth > nMaxTxtWidth )
|
||||||
{
|
{
|
||||||
bLeftText = sal_True;
|
bLeftText = sal_True;
|
||||||
// 3 == Len of "..."
|
OUStringBuffer aBuf(pItem->maOutText);
|
||||||
pItem->maOutText.AppendAscii( "..." );
|
aBuf.append("...");
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
pItem->maOutText.Erase( pItem->maOutText.Len()-3-1, 1 );
|
aBuf.remove(aBuf.getLength()-3-1, 1);
|
||||||
nTxtWidth = pDev->GetTextWidth( pItem->maOutText );
|
nTxtWidth = pDev->GetTextWidth( aBuf.toString() );
|
||||||
}
|
}
|
||||||
while ( (nTxtWidth > nMaxTxtWidth) && (pItem->maOutText.Len() > 3) );
|
while ( (nTxtWidth > nMaxTxtWidth) && (aBuf.getLength() > 3) );
|
||||||
if ( pItem->maOutText.Len() == 3 )
|
pItem->maOutText = aBuf.makeStringAndClear();
|
||||||
|
if ( pItem->maOutText.getLength() == 3 )
|
||||||
{
|
{
|
||||||
nTxtWidth = 0;
|
nTxtWidth = 0;
|
||||||
pItem->maOutText.Erase();
|
pItem->maOutText = OUString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -481,7 +482,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
|
|||||||
|
|
||||||
// TextPosition berechnen
|
// TextPosition berechnen
|
||||||
long nTxtPosY = 0;
|
long nTxtPosY = 0;
|
||||||
if ( pItem->maOutText.Len() || (nArrowWidth && aTxtSize.Height()) )
|
if ( !pItem->maOutText.isEmpty() || (nArrowWidth && aTxtSize.Height()) )
|
||||||
{
|
{
|
||||||
if ( nBits & HIB_TOP )
|
if ( nBits & HIB_TOP )
|
||||||
{
|
{
|
||||||
@ -503,7 +504,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Text ausgebeben
|
// Text ausgebeben
|
||||||
if ( pItem->maOutText.Len() )
|
if (!pItem->maOutText.isEmpty())
|
||||||
{
|
{
|
||||||
if( aSelectionTextColor != Color( COL_TRANSPARENT ) )
|
if( aSelectionTextColor != Color( COL_TRANSPARENT ) )
|
||||||
{
|
{
|
||||||
@ -576,7 +577,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
|
|||||||
nArrowX -= nArrowWidth;
|
nArrowX -= nArrowWidth;
|
||||||
else
|
else
|
||||||
nArrowX += nTxtWidth+HEADERBAR_ARROWOFF;
|
nArrowX += nTxtWidth+HEADERBAR_ARROWOFF;
|
||||||
if ( !(nBits & (HIB_LEFTIMAGE | HIB_RIGHTIMAGE)) && !pItem->maText.Len() )
|
if ( !(nBits & (HIB_LEFTIMAGE | HIB_RIGHTIMAGE)) && pItem->maText.isEmpty() )
|
||||||
{
|
{
|
||||||
if ( nBits & HIB_RIGHT )
|
if ( nBits & HIB_RIGHT )
|
||||||
nArrowX -= aImageSize.Width();
|
nArrowX -= aImageSize.Width();
|
||||||
@ -1127,8 +1128,8 @@ void HeaderBar::RequestHelp( const HelpEvent& rHEvt )
|
|||||||
aItemRect.Right() = aPt.X();
|
aItemRect.Right() = aPt.X();
|
||||||
aItemRect.Bottom() = aPt.Y();
|
aItemRect.Bottom() = aPt.Y();
|
||||||
|
|
||||||
XubString aStr = GetHelpText( nItemId );
|
OUString aStr = GetHelpText( nItemId );
|
||||||
if ( !aStr.Len() || !(rHEvt.GetMode() & HELPMODE_BALLOON) )
|
if ( aStr.isEmpty() || !(rHEvt.GetMode() & HELPMODE_BALLOON) )
|
||||||
{
|
{
|
||||||
ImplHeadItem* pItem = (*mpItemList)[ GetItemPos( nItemId ) ];
|
ImplHeadItem* pItem = (*mpItemList)[ GetItemPos( nItemId ) ];
|
||||||
// Wir zeigen die Quick-Hilfe nur an, wenn Text nicht
|
// Wir zeigen die Quick-Hilfe nur an, wenn Text nicht
|
||||||
@ -1136,11 +1137,11 @@ void HeaderBar::RequestHelp( const HelpEvent& rHEvt )
|
|||||||
// an, wenn das Item keinen Text besitzt
|
// an, wenn das Item keinen Text besitzt
|
||||||
if ( pItem->maOutText != pItem->maText )
|
if ( pItem->maOutText != pItem->maText )
|
||||||
aStr = pItem->maText;
|
aStr = pItem->maText;
|
||||||
else if ( pItem->maText.Len() )
|
else if (!pItem->maText.isEmpty())
|
||||||
aStr.Erase();
|
aStr = OUString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( aStr.Len() )
|
if (!aStr.isEmpty())
|
||||||
{
|
{
|
||||||
if ( rHEvt.GetMode() & HELPMODE_BALLOON )
|
if ( rHEvt.GetMode() & HELPMODE_BALLOON )
|
||||||
Help::ShowBalloon( this, aItemRect.Center(), aItemRect, aStr );
|
Help::ShowBalloon( this, aItemRect.Center(), aItemRect, aStr );
|
||||||
@ -1251,7 +1252,7 @@ void HeaderBar::DoubleClick()
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
void HeaderBar::InsertItem( sal_uInt16 nItemId, const XubString& rText,
|
void HeaderBar::InsertItem( sal_uInt16 nItemId, const OUString& rText,
|
||||||
long nSize, HeaderBarItemBits nBits, sal_uInt16 nPos )
|
long nSize, HeaderBarItemBits nBits, sal_uInt16 nPos )
|
||||||
{
|
{
|
||||||
DBG_ASSERT( nItemId, "HeaderBar::InsertItem(): ItemId == 0" );
|
DBG_ASSERT( nItemId, "HeaderBar::InsertItem(): ItemId == 0" );
|
||||||
@ -1447,7 +1448,7 @@ HeaderBarItemBits HeaderBar::GetItemBits( sal_uInt16 nItemId ) const
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
void HeaderBar::SetItemText( sal_uInt16 nItemId, const XubString& rText )
|
void HeaderBar::SetItemText( sal_uInt16 nItemId, const OUString& rText )
|
||||||
{
|
{
|
||||||
sal_uInt16 nPos = GetItemPos( nItemId );
|
sal_uInt16 nPos = GetItemPos( nItemId );
|
||||||
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
|
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
|
||||||
@ -1459,24 +1460,23 @@ void HeaderBar::SetItemText( sal_uInt16 nItemId, const XubString& rText )
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
XubString HeaderBar::GetItemText( sal_uInt16 nItemId ) const
|
OUString HeaderBar::GetItemText( sal_uInt16 nItemId ) const
|
||||||
{
|
{
|
||||||
sal_uInt16 nPos = GetItemPos( nItemId );
|
sal_uInt16 nPos = GetItemPos( nItemId );
|
||||||
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
|
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
|
||||||
return (*mpItemList)[ nPos ]->maText;
|
return (*mpItemList)[ nPos ]->maText;
|
||||||
else
|
return OUString();
|
||||||
return String();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
XubString HeaderBar::GetHelpText( sal_uInt16 nItemId ) const
|
OUString HeaderBar::GetHelpText( sal_uInt16 nItemId ) const
|
||||||
{
|
{
|
||||||
sal_uInt16 nPos = GetItemPos( nItemId );
|
sal_uInt16 nPos = GetItemPos( nItemId );
|
||||||
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
|
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
|
||||||
{
|
{
|
||||||
ImplHeadItem* pItem = (*mpItemList)[ nPos ];
|
ImplHeadItem* pItem = (*mpItemList)[ nPos ];
|
||||||
if ( !pItem->maHelpText.Len() && !pItem->maHelpId.isEmpty() )
|
if ( pItem->maHelpText.isEmpty() && !pItem->maHelpId.isEmpty() )
|
||||||
{
|
{
|
||||||
Help* pHelp = Application::GetHelp();
|
Help* pHelp = Application::GetHelp();
|
||||||
if ( pHelp )
|
if ( pHelp )
|
||||||
@ -1485,8 +1485,8 @@ XubString HeaderBar::GetHelpText( sal_uInt16 nItemId ) const
|
|||||||
|
|
||||||
return pItem->maHelpText;
|
return pItem->maHelpText;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return XubString();
|
return OUString();
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
@ -1512,7 +1512,7 @@ Size HeaderBar::CalcWindowSizePixel() const
|
|||||||
ImplHeadItem* pItem = (*mpItemList)[ i ];
|
ImplHeadItem* pItem = (*mpItemList)[ i ];
|
||||||
// Image-Groessen beruecksichtigen
|
// Image-Groessen beruecksichtigen
|
||||||
long nImageHeight = pItem->maImage.GetSizePixel().Height();
|
long nImageHeight = pItem->maImage.GetSizePixel().Height();
|
||||||
if ( !(pItem->mnBits & (HIB_LEFTIMAGE | HIB_RIGHTIMAGE)) && pItem->maText.Len() )
|
if ( !(pItem->mnBits & (HIB_LEFTIMAGE | HIB_RIGHTIMAGE)) && !pItem->maText.isEmpty() )
|
||||||
nImageHeight += aSize.Height();
|
nImageHeight += aSize.Height();
|
||||||
if ( nImageHeight > nMaxImageSize )
|
if ( nImageHeight > nMaxImageSize )
|
||||||
nMaxImageSize = nImageHeight;
|
nMaxImageSize = nImageHeight;
|
||||||
|
@ -2479,7 +2479,7 @@ OUString TabBar::GetPageText( sal_uInt16 nPageId ) const
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
XubString TabBar::GetHelpText( sal_uInt16 nPageId ) const
|
OUString TabBar::GetHelpText( sal_uInt16 nPageId ) const
|
||||||
{
|
{
|
||||||
sal_uInt16 nPos = GetPagePos( nPageId );
|
sal_uInt16 nPos = GetPagePos( nPageId );
|
||||||
if ( nPos != PAGE_NOT_FOUND )
|
if ( nPos != PAGE_NOT_FOUND )
|
||||||
|
@ -588,7 +588,7 @@ ContextMenuHelper::completeMenuProperties(
|
|||||||
else
|
else
|
||||||
pMenu->SetItemImage( nId, Image() );
|
pMenu->SetItemImage( nId, Image() );
|
||||||
|
|
||||||
if ( pMenu->GetItemText( nId ).Len() == 0 )
|
if (!pMenu->GetItemText(nId).isEmpty())
|
||||||
{
|
{
|
||||||
OUString aLabel( getLabelFromCommandURL( aCmdURL ));
|
OUString aLabel( getLabelFromCommandURL( aCmdURL ));
|
||||||
pMenu->SetItemText( nId, aLabel );
|
pMenu->SetItemText( nId, aLabel );
|
||||||
|
@ -133,7 +133,7 @@ public:
|
|||||||
|
|
||||||
void SelectTheme( const String& rThemeName ) { mpThemes->SelectEntry( rThemeName ); SelectThemeHdl( NULL ); }
|
void SelectTheme( const String& rThemeName ) { mpThemes->SelectEntry( rThemeName ); SelectThemeHdl( NULL ); }
|
||||||
void SelectTheme( sal_uIntPtr nThemePos ) { mpThemes->SelectEntryPos( (sal_uInt16) nThemePos ); SelectThemeHdl( NULL ); }
|
void SelectTheme( sal_uIntPtr nThemePos ) { mpThemes->SelectEntryPos( (sal_uInt16) nThemePos ); SelectThemeHdl( NULL ); }
|
||||||
String GetSelectedTheme() { return mpThemes->GetEntryCount() ? mpThemes->GetEntry( mpThemes->GetSelectEntryPos() ) : String(); }
|
OUString GetSelectedTheme() { return mpThemes->GetEntryCount() ? mpThemes->GetEntry( mpThemes->GetSelectEntryPos() ) : OUString(); }
|
||||||
|
|
||||||
void ShowContextMenu();
|
void ShowContextMenu();
|
||||||
sal_Bool KeyInput( const KeyEvent& rKEvt, Window* pWindow );
|
sal_Bool KeyInput( const KeyEvent& rKEvt, Window* pWindow );
|
||||||
|
@ -194,7 +194,7 @@ void SwExtTextInput::SetInputData( const CommandExtTextInputData& rData )
|
|||||||
if( rData.GetTextAttr() )
|
if( rData.GetTextAttr() )
|
||||||
{
|
{
|
||||||
const sal_uInt16 *pAttrs = rData.GetTextAttr();
|
const sal_uInt16 *pAttrs = rData.GetTextAttr();
|
||||||
aAttrs.insert( aAttrs.begin(), pAttrs, pAttrs + rData.GetText().Len() );
|
aAttrs.insert( aAttrs.begin(), pAttrs, pAttrs + rData.GetText().getLength() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2227,8 +2227,8 @@ void Edit::Command( const CommandEvent& rCEvt )
|
|||||||
maText.insert( mpIMEInfos->nPos, pData->GetText() );
|
maText.insert( mpIMEInfos->nPos, pData->GetText() );
|
||||||
if ( mpIMEInfos->bWasCursorOverwrite )
|
if ( mpIMEInfos->bWasCursorOverwrite )
|
||||||
{
|
{
|
||||||
sal_uInt16 nOldIMETextLen = mpIMEInfos->nLen;
|
sal_Int32 nOldIMETextLen = mpIMEInfos->nLen;
|
||||||
sal_uInt16 nNewIMETextLen = pData->GetText().Len();
|
sal_Int32 nNewIMETextLen = pData->GetText().getLength();
|
||||||
if ( ( nOldIMETextLen > nNewIMETextLen ) &&
|
if ( ( nOldIMETextLen > nNewIMETextLen ) &&
|
||||||
( nNewIMETextLen < mpIMEInfos->aOldTextAfterStartPos.getLength() ) )
|
( nNewIMETextLen < mpIMEInfos->aOldTextAfterStartPos.getLength() ) )
|
||||||
{
|
{
|
||||||
@ -2250,7 +2250,7 @@ void Edit::Command( const CommandEvent& rCEvt )
|
|||||||
|
|
||||||
if ( pData->GetTextAttr() )
|
if ( pData->GetTextAttr() )
|
||||||
{
|
{
|
||||||
mpIMEInfos->CopyAttribs( pData->GetTextAttr(), pData->GetText().Len() );
|
mpIMEInfos->CopyAttribs( pData->GetTextAttr(), pData->GetText().getLength() );
|
||||||
mpIMEInfos->bCursor = pData->IsCursorVisible();
|
mpIMEInfos->bCursor = pData->IsCursorVisible();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -127,7 +127,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
|
|||||||
long nTop;
|
long nTop;
|
||||||
long nTextOff;
|
long nTextOff;
|
||||||
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
|
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
|
||||||
XubString aText( GetText() );
|
OUString aText( GetText() );
|
||||||
Rectangle aRect( rPos, rSize );
|
Rectangle aRect( rPos, rSize );
|
||||||
sal_uInt16 nTextStyle = TEXT_DRAW_LEFT | TEXT_DRAW_TOP | TEXT_DRAW_ENDELLIPSIS | TEXT_DRAW_MNEMONIC;
|
sal_uInt16 nTextStyle = TEXT_DRAW_LEFT | TEXT_DRAW_TOP | TEXT_DRAW_ENDELLIPSIS | TEXT_DRAW_MNEMONIC;
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
|
|||||||
nDrawFlags |= WINDOW_DRAW_MONO;
|
nDrawFlags |= WINDOW_DRAW_MONO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !aText.Len() )
|
if (aText.isEmpty())
|
||||||
{
|
{
|
||||||
nTop = rPos.Y();
|
nTop = rPos.Y();
|
||||||
nTextOff = 0;
|
nTextOff = 0;
|
||||||
@ -175,7 +175,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
|
|||||||
else
|
else
|
||||||
pDev->SetLineColor( rStyleSettings.GetShadowColor() );
|
pDev->SetLineColor( rStyleSettings.GetShadowColor() );
|
||||||
|
|
||||||
if ( !aText.Len() )
|
if (aText.isEmpty())
|
||||||
pDev->DrawLine( Point( rPos.X(), nTop ), Point( rPos.X()+rSize.Width()-2, nTop ) );
|
pDev->DrawLine( Point( rPos.X(), nTop ), Point( rPos.X()+rSize.Width()-2, nTop ) );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -193,7 +193,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
|
|||||||
if ( !bIsPrinter && !(nDrawFlags & WINDOW_DRAW_MONO) )
|
if ( !bIsPrinter && !(nDrawFlags & WINDOW_DRAW_MONO) )
|
||||||
{
|
{
|
||||||
pDev->SetLineColor( rStyleSettings.GetLightColor() );
|
pDev->SetLineColor( rStyleSettings.GetLightColor() );
|
||||||
if ( !aText.Len() )
|
if (aText.isEmpty())
|
||||||
pDev->DrawLine( Point( rPos.X()+1, nTop+1 ), Point( rPos.X()+rSize.Width()-3, nTop+1 ) );
|
pDev->DrawLine( Point( rPos.X()+1, nTop+1 ), Point( rPos.X()+rSize.Width()-3, nTop+1 ) );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -431,11 +431,11 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sa
|
|||||||
|
|
||||||
if ( IsDropDownBox() )
|
if ( IsDropDownBox() )
|
||||||
{
|
{
|
||||||
XubString aText = GetSelectEntry();
|
OUString aText = GetSelectEntry();
|
||||||
long nTextHeight = pDev->GetTextHeight();
|
long nTextHeight = pDev->GetTextHeight();
|
||||||
long nTextWidth = pDev->GetTextWidth( aText );
|
long nTextWidth = pDev->GetTextWidth( aText );
|
||||||
long nOffX = 3*nOnePixel;
|
long nOffX = 3*nOnePixel;
|
||||||
long nOffY = (aSize.Height()-nTextHeight) / 2;
|
long nOffY = (aSize.Height()-nTextHeight) / 2;
|
||||||
|
|
||||||
// Clipping?
|
// Clipping?
|
||||||
if ( (nOffY < 0) ||
|
if ( (nOffY < 0) ||
|
||||||
@ -1012,7 +1012,7 @@ void ListBox::SetNoSelection()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sal_uInt16 ListBox::InsertEntry( const XubString& rStr, sal_uInt16 nPos )
|
sal_uInt16 ListBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos )
|
||||||
{
|
{
|
||||||
sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr );
|
sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr );
|
||||||
nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
|
nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
|
||||||
@ -1030,7 +1030,7 @@ sal_uInt16 ListBox::InsertEntry( const Image& rImage, sal_uInt16 nPos )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sal_uInt16 ListBox::InsertEntry( const XubString& rStr, const Image& rImage, sal_uInt16 nPos )
|
sal_uInt16 ListBox::InsertEntry( const OUString& rStr, const Image& rImage, sal_uInt16 nPos )
|
||||||
{
|
{
|
||||||
sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr, rImage );
|
sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr, rImage );
|
||||||
nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
|
nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
|
||||||
@ -1039,7 +1039,7 @@ sal_uInt16 ListBox::InsertEntry( const XubString& rStr, const Image& rImage, sal
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ListBox::RemoveEntry( const XubString& rStr )
|
void ListBox::RemoveEntry( const OUString& rStr )
|
||||||
{
|
{
|
||||||
RemoveEntry( GetEntryPos( rStr ) );
|
RemoveEntry( GetEntryPos( rStr ) );
|
||||||
}
|
}
|
||||||
@ -1060,7 +1060,7 @@ Image ListBox::GetEntryImage( sal_uInt16 nPos ) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sal_uInt16 ListBox::GetEntryPos( const XubString& rStr ) const
|
sal_uInt16 ListBox::GetEntryPos( const OUString& rStr ) const
|
||||||
{
|
{
|
||||||
sal_uInt16 nPos = mpImplLB->GetEntryList()->FindEntry( rStr );
|
sal_uInt16 nPos = mpImplLB->GetEntryList()->FindEntry( rStr );
|
||||||
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
|
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
|
||||||
@ -1078,7 +1078,7 @@ sal_uInt16 ListBox::GetEntryPos( const void* pData ) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
XubString ListBox::GetEntry( sal_uInt16 nPos ) const
|
OUString ListBox::GetEntry( sal_uInt16 nPos ) const
|
||||||
{
|
{
|
||||||
return mpImplLB->GetEntryList()->GetEntryText( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
|
return mpImplLB->GetEntryList()->GetEntryText( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
|
||||||
}
|
}
|
||||||
@ -1127,7 +1127,7 @@ sal_Bool ListBox::IsEntryPosSelected( sal_uInt16 nPos ) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ListBox::SelectEntry( const XubString& rStr, sal_Bool bSelect )
|
void ListBox::SelectEntry( const OUString& rStr, sal_Bool bSelect )
|
||||||
{
|
{
|
||||||
SelectEntryPos( GetEntryPos( rStr ), bSelect );
|
SelectEntryPos( GetEntryPos( rStr ), bSelect );
|
||||||
}
|
}
|
||||||
|
@ -458,7 +458,7 @@ void TextDoc::DestroyTextNodes()
|
|||||||
maTextNodes.clear();
|
maTextNodes.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
String TextDoc::GetText( const sal_Unicode* pSep ) const
|
OUString TextDoc::GetText( const sal_Unicode* pSep ) const
|
||||||
{
|
{
|
||||||
sal_uLong nLen = GetTextLen( pSep );
|
sal_uLong nLen = GetTextLen( pSep );
|
||||||
sal_uLong nNodes = maTextNodes.Count();
|
sal_uLong nNodes = maTextNodes.Count();
|
||||||
@ -483,9 +483,10 @@ String TextDoc::GetText( const sal_Unicode* pSep ) const
|
|||||||
return aASCIIText;
|
return aASCIIText;
|
||||||
}
|
}
|
||||||
|
|
||||||
XubString TextDoc::GetText( sal_uLong nPara ) const
|
OUString TextDoc::GetText( sal_uLong nPara ) const
|
||||||
{
|
{
|
||||||
XubString aText;
|
OUString aText;
|
||||||
|
|
||||||
TextNode* pNode = ( nPara < maTextNodes.Count() ) ? maTextNodes.GetObject( nPara ) : 0;
|
TextNode* pNode = ( nPara < maTextNodes.Count() ) ? maTextNodes.GetObject( nPara ) : 0;
|
||||||
if ( pNode )
|
if ( pNode )
|
||||||
aText = pNode->GetText();
|
aText = pNode->GetText();
|
||||||
@ -541,15 +542,15 @@ TextPaM TextDoc::InsertText( const TextPaM& rPaM, sal_Unicode c )
|
|||||||
return aPaM;
|
return aPaM;
|
||||||
}
|
}
|
||||||
|
|
||||||
TextPaM TextDoc::InsertText( const TextPaM& rPaM, const XubString& rStr )
|
TextPaM TextDoc::InsertText( const TextPaM& rPaM, const OUString& rStr )
|
||||||
{
|
{
|
||||||
DBG_ASSERT( rStr.Search( 0x0A ) == STRING_NOTFOUND, "TextDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" );
|
DBG_ASSERT( rStr.indexOf( 0x0A ) == -1, "TextDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" );
|
||||||
DBG_ASSERT( rStr.Search( 0x0D ) == STRING_NOTFOUND, "TextDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" );
|
DBG_ASSERT( rStr.indexOf( 0x0D ) == -1, "TextDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" );
|
||||||
|
|
||||||
TextNode* pNode = maTextNodes.GetObject( rPaM.GetPara() );
|
TextNode* pNode = maTextNodes.GetObject( rPaM.GetPara() );
|
||||||
pNode->InsertText( rPaM.GetIndex(), rStr );
|
pNode->InsertText( rPaM.GetIndex(), rStr );
|
||||||
|
|
||||||
TextPaM aPaM( rPaM.GetPara(), rPaM.GetIndex()+rStr.Len() );
|
TextPaM aPaM( rPaM.GetPara(), rPaM.GetIndex()+rStr.getLength() );
|
||||||
return aPaM;
|
return aPaM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,14 +116,14 @@ public:
|
|||||||
|
|
||||||
TextPaM RemoveChars( const TextPaM& rPaM, sal_uInt16 nChars );
|
TextPaM RemoveChars( const TextPaM& rPaM, sal_uInt16 nChars );
|
||||||
TextPaM InsertText( const TextPaM& rPaM, sal_Unicode c );
|
TextPaM InsertText( const TextPaM& rPaM, sal_Unicode c );
|
||||||
TextPaM InsertText( const TextPaM& rPaM, const String& rStr );
|
TextPaM InsertText( const TextPaM& rPaM, const OUString& rStr );
|
||||||
|
|
||||||
TextPaM InsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs );
|
TextPaM InsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs );
|
||||||
TextPaM ConnectParagraphs( TextNode* pLeft, TextNode* pRight );
|
TextPaM ConnectParagraphs( TextNode* pLeft, TextNode* pRight );
|
||||||
|
|
||||||
sal_uLong GetTextLen( const sal_Unicode* pSep, const TextSelection* pSel = NULL ) const;
|
sal_uLong GetTextLen( const sal_Unicode* pSep, const TextSelection* pSel = NULL ) const;
|
||||||
String GetText( const sal_Unicode* pSep ) const;
|
OUString GetText( const sal_Unicode* pSep ) const;
|
||||||
String GetText( sal_uLong nPara ) const;
|
OUString GetText( sal_uLong nPara ) const;
|
||||||
|
|
||||||
void SetLeftMargin( sal_uInt16 n ) { mnLeftMargin = n; }
|
void SetLeftMargin( sal_uInt16 n ) { mnLeftMargin = n; }
|
||||||
sal_uInt16 GetLeftMargin() const { return mnLeftMargin; }
|
sal_uInt16 GetLeftMargin() const { return mnLeftMargin; }
|
||||||
|
@ -492,7 +492,7 @@ void TextEngine::ImpRemoveChars( const TextPaM& rPaM, sal_uInt16 nChars, SfxUndo
|
|||||||
{
|
{
|
||||||
// attributes have to be saved for UNDO before RemoveChars!
|
// attributes have to be saved for UNDO before RemoveChars!
|
||||||
TextNode* pNode = mpDoc->GetNodes().GetObject( rPaM.GetPara() );
|
TextNode* pNode = mpDoc->GetNodes().GetObject( rPaM.GetPara() );
|
||||||
XubString aStr( pNode->GetText().Copy( rPaM.GetIndex(), nChars ) );
|
OUString aStr( pNode->GetText().Copy( rPaM.GetIndex(), nChars ) );
|
||||||
|
|
||||||
// check if attributes are being deleted or changed
|
// check if attributes are being deleted or changed
|
||||||
sal_uInt16 nStart = rPaM.GetIndex();
|
sal_uInt16 nStart = rPaM.GetIndex();
|
||||||
@ -707,7 +707,7 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
|
|||||||
|
|
||||||
// the text that needs to be checked is only the one
|
// the text that needs to be checked is only the one
|
||||||
// before the current cursor position
|
// before the current cursor position
|
||||||
OUString aOldText( mpDoc->GetText( aPaM.GetPara() ).Copy(0, nTmpPos) );
|
OUString aOldText( mpDoc->GetText( aPaM.GetPara() ).copy(0, nTmpPos) );
|
||||||
OUString aNewText( aOldText );
|
OUString aNewText( aOldText );
|
||||||
if (aCTLOptions.IsCTLSequenceCheckingTypeAndReplace())
|
if (aCTLOptions.IsCTLSequenceCheckingTypeAndReplace())
|
||||||
{
|
{
|
||||||
@ -770,7 +770,7 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, const XubString& rStr )
|
TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, const OUString& rStr )
|
||||||
{
|
{
|
||||||
UndoActionStart();
|
UndoActionStart();
|
||||||
|
|
||||||
@ -781,40 +781,35 @@ TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, const XubString
|
|||||||
else
|
else
|
||||||
aPaM = rCurSel.GetEnd();
|
aPaM = rCurSel.GetEnd();
|
||||||
|
|
||||||
XubString aText(convertLineEnd(rStr, LINEEND_LF));
|
OUString aText(convertLineEnd(rStr, LINEEND_LF));
|
||||||
|
|
||||||
sal_uInt16 nStart = 0;
|
sal_Int32 nStart = 0;
|
||||||
while ( nStart < aText.Len() )
|
while ( nStart < aText.getLength() )
|
||||||
{
|
{
|
||||||
sal_uInt16 nEnd = aText.Search( LINE_SEP, nStart );
|
sal_Int32 nEnd = aText.indexOf( LINE_SEP, nStart );
|
||||||
if ( nEnd == STRING_NOTFOUND )
|
if (nEnd == -1)
|
||||||
nEnd = aText.Len(); // do not dereference!
|
nEnd = aText.getLength(); // do not dereference!
|
||||||
|
|
||||||
// Start == End => empty line
|
// Start == End => empty line
|
||||||
if ( nEnd > nStart )
|
if ( nEnd > nStart )
|
||||||
{
|
{
|
||||||
sal_uLong nL = aPaM.GetIndex();
|
sal_uLong nL = aPaM.GetIndex();
|
||||||
nL += ( nEnd-nStart );
|
nL += ( nEnd-nStart );
|
||||||
if ( nL > STRING_MAXLEN )
|
|
||||||
{
|
|
||||||
sal_uInt16 nDiff = (sal_uInt16) (nL-STRING_MAXLEN);
|
|
||||||
nEnd = nEnd - nDiff;
|
|
||||||
}
|
|
||||||
|
|
||||||
XubString aLine( aText, nStart, nEnd-nStart );
|
OUString aLine(aText.copy(nStart, nEnd-nStart));
|
||||||
if ( IsUndoEnabled() && !IsInUndo() )
|
if ( IsUndoEnabled() && !IsInUndo() )
|
||||||
InsertUndo( new TextUndoInsertChars( this, aPaM, aLine ) );
|
InsertUndo( new TextUndoInsertChars( this, aPaM, aLine ) );
|
||||||
|
|
||||||
TEParaPortion* pPortion = mpTEParaPortions->GetObject( aPaM.GetPara() );
|
TEParaPortion* pPortion = mpTEParaPortions->GetObject( aPaM.GetPara() );
|
||||||
pPortion->MarkInvalid( aPaM.GetIndex(), aLine.Len() );
|
pPortion->MarkInvalid( aPaM.GetIndex(), aLine.getLength() );
|
||||||
if ( aLine.Search( '\t' ) != STRING_NOTFOUND )
|
if (aLine.indexOf( '\t' ) != -1)
|
||||||
pPortion->SetNotSimpleInvalid();
|
pPortion->SetNotSimpleInvalid();
|
||||||
|
|
||||||
aPaM = mpDoc->InsertText( aPaM, aLine );
|
aPaM = mpDoc->InsertText( aPaM, aLine );
|
||||||
ImpCharsInserted( aPaM.GetPara(), aPaM.GetIndex()-aLine.Len(), aLine.Len() );
|
ImpCharsInserted( aPaM.GetPara(), aPaM.GetIndex()-aLine.getLength(), aLine.getLength() );
|
||||||
|
|
||||||
}
|
}
|
||||||
if ( nEnd < aText.Len() )
|
if ( nEnd < aText.getLength() )
|
||||||
aPaM = ImpInsertParaBreak( aPaM );
|
aPaM = ImpInsertParaBreak( aPaM );
|
||||||
|
|
||||||
nStart = nEnd+1;
|
nStart = nEnd+1;
|
||||||
@ -1352,7 +1347,7 @@ void TextEngine::UndoActionStart( sal_uInt16 nId )
|
|||||||
if ( IsUndoEnabled() && !IsInUndo() )
|
if ( IsUndoEnabled() && !IsInUndo() )
|
||||||
{
|
{
|
||||||
String aComment;
|
String aComment;
|
||||||
GetUndoManager().EnterListAction( aComment, XubString(), nId );
|
GetUndoManager().EnterListAction( aComment, OUString(), nId );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,11 +82,11 @@ class TextUndoInsertChars : public TextUndo
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
TextPaM maTextPaM;
|
TextPaM maTextPaM;
|
||||||
String maText;
|
OUString maText;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TYPEINFO();
|
TYPEINFO();
|
||||||
TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const String& rStr );
|
TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr );
|
||||||
|
|
||||||
virtual void Undo();
|
virtual void Undo();
|
||||||
virtual void Redo();
|
virtual void Redo();
|
||||||
@ -101,11 +101,11 @@ class TextUndoRemoveChars : public TextUndo
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
TextPaM maTextPaM;
|
TextPaM maTextPaM;
|
||||||
String maText;
|
OUString maText;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TYPEINFO();
|
TYPEINFO();
|
||||||
TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const String& rStr );
|
TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr );
|
||||||
|
|
||||||
virtual void Undo();
|
virtual void Undo();
|
||||||
virtual void Redo();
|
virtual void Redo();
|
||||||
|
@ -224,7 +224,7 @@ void TextUndoConnectParas::Redo()
|
|||||||
|
|
||||||
OUString TextUndoConnectParas::GetComment () const
|
OUString TextUndoConnectParas::GetComment () const
|
||||||
{
|
{
|
||||||
return ResId(STR_TEXTUNDO_CONNECTPARAS, *ImplGetResMgr());
|
return ResId(STR_TEXTUNDO_CONNECTPARAS, *ImplGetResMgr()).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
TextUndoSplitPara::TextUndoSplitPara( TextEngine* pTextEngine, sal_uLong nPara, sal_uInt16 nPos )
|
TextUndoSplitPara::TextUndoSplitPara( TextEngine* pTextEngine, sal_uLong nPara, sal_uInt16 nPos )
|
||||||
@ -255,7 +255,7 @@ OUString TextUndoSplitPara::GetComment () const
|
|||||||
return ResId(STR_TEXTUNDO_SPLITPARA, *ImplGetResMgr());
|
return ResId(STR_TEXTUNDO_SPLITPARA, *ImplGetResMgr());
|
||||||
}
|
}
|
||||||
|
|
||||||
TextUndoInsertChars::TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const XubString& rStr )
|
TextUndoInsertChars::TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr )
|
||||||
: TextUndo( pTextEngine ),
|
: TextUndo( pTextEngine ),
|
||||||
maTextPaM( rTextPaM ), maText( rStr )
|
maTextPaM( rTextPaM ), maText( rStr )
|
||||||
{
|
{
|
||||||
@ -264,7 +264,7 @@ TextUndoInsertChars::TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM
|
|||||||
void TextUndoInsertChars::Undo()
|
void TextUndoInsertChars::Undo()
|
||||||
{
|
{
|
||||||
TextSelection aSel( maTextPaM, maTextPaM );
|
TextSelection aSel( maTextPaM, maTextPaM );
|
||||||
aSel.GetEnd().GetIndex() = aSel.GetEnd().GetIndex() + maText.Len();
|
aSel.GetEnd().GetIndex() = aSel.GetEnd().GetIndex() + maText.getLength();
|
||||||
TextPaM aPaM = GetTextEngine()->ImpDeleteText( aSel );
|
TextPaM aPaM = GetTextEngine()->ImpDeleteText( aSel );
|
||||||
SetSelection( aPaM );
|
SetSelection( aPaM );
|
||||||
}
|
}
|
||||||
@ -274,7 +274,7 @@ void TextUndoInsertChars::Redo()
|
|||||||
TextSelection aSel( maTextPaM, maTextPaM );
|
TextSelection aSel( maTextPaM, maTextPaM );
|
||||||
GetTextEngine()->ImpInsertText( aSel, maText );
|
GetTextEngine()->ImpInsertText( aSel, maText );
|
||||||
TextPaM aNewPaM( maTextPaM );
|
TextPaM aNewPaM( maTextPaM );
|
||||||
aNewPaM.GetIndex() = aNewPaM.GetIndex() + maText.Len();
|
aNewPaM.GetIndex() = aNewPaM.GetIndex() + maText.getLength();
|
||||||
SetSelection( TextSelection( aSel.GetStart(), aNewPaM ) );
|
SetSelection( TextSelection( aSel.GetStart(), aNewPaM ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -288,7 +288,7 @@ bool TextUndoInsertChars::Merge( SfxUndoAction* pNextAction )
|
|||||||
if ( maTextPaM.GetPara() != pNext->maTextPaM.GetPara() )
|
if ( maTextPaM.GetPara() != pNext->maTextPaM.GetPara() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ( ( maTextPaM.GetIndex() + maText.Len() ) == pNext->maTextPaM.GetIndex() )
|
if ( ( maTextPaM.GetIndex() + maText.getLength() ) == pNext->maTextPaM.GetIndex() )
|
||||||
{
|
{
|
||||||
maText += pNext->maText;
|
maText += pNext->maText;
|
||||||
return true;
|
return true;
|
||||||
@ -301,10 +301,10 @@ OUString TextUndoInsertChars::GetComment () const
|
|||||||
// multiple lines?
|
// multiple lines?
|
||||||
OUString sText(maText);
|
OUString sText(maText);
|
||||||
Shorten(sText);
|
Shorten(sText);
|
||||||
return OUString(ResId(STR_TEXTUNDO_INSERTCHARS, *ImplGetResMgr())).replaceAll("$1", sText);
|
return ResId(STR_TEXTUNDO_INSERTCHARS, *ImplGetResMgr()).toString().replaceAll("$1", sText);
|
||||||
}
|
}
|
||||||
|
|
||||||
TextUndoRemoveChars::TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const XubString& rStr )
|
TextUndoRemoveChars::TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr )
|
||||||
: TextUndo( pTextEngine ),
|
: TextUndo( pTextEngine ),
|
||||||
maTextPaM( rTextPaM ), maText( rStr )
|
maTextPaM( rTextPaM ), maText( rStr )
|
||||||
{
|
{
|
||||||
@ -314,14 +314,14 @@ void TextUndoRemoveChars::Undo()
|
|||||||
{
|
{
|
||||||
TextSelection aSel( maTextPaM, maTextPaM );
|
TextSelection aSel( maTextPaM, maTextPaM );
|
||||||
GetTextEngine()->ImpInsertText( aSel, maText );
|
GetTextEngine()->ImpInsertText( aSel, maText );
|
||||||
aSel.GetEnd().GetIndex() = aSel.GetEnd().GetIndex() + maText.Len();
|
aSel.GetEnd().GetIndex() = aSel.GetEnd().GetIndex() + maText.getLength();
|
||||||
SetSelection( aSel );
|
SetSelection( aSel );
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextUndoRemoveChars::Redo()
|
void TextUndoRemoveChars::Redo()
|
||||||
{
|
{
|
||||||
TextSelection aSel( maTextPaM, maTextPaM );
|
TextSelection aSel( maTextPaM, maTextPaM );
|
||||||
aSel.GetEnd().GetIndex() = aSel.GetEnd().GetIndex() + maText.Len();
|
aSel.GetEnd().GetIndex() = aSel.GetEnd().GetIndex() + maText.getLength();
|
||||||
TextPaM aPaM = GetTextEngine()->ImpDeleteText( aSel );
|
TextPaM aPaM = GetTextEngine()->ImpDeleteText( aSel );
|
||||||
SetSelection( aPaM );
|
SetSelection( aPaM );
|
||||||
}
|
}
|
||||||
|
@ -950,8 +950,8 @@ void TextView::Command( const CommandEvent& rCEvt )
|
|||||||
|
|
||||||
if ( mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite )
|
if ( mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite )
|
||||||
{
|
{
|
||||||
sal_uInt16 nOldIMETextLen = mpImpl->mpTextEngine->mpIMEInfos->nLen;
|
sal_Int32 nOldIMETextLen = mpImpl->mpTextEngine->mpIMEInfos->nLen;
|
||||||
sal_uInt16 nNewIMETextLen = pData->GetText().Len();
|
sal_Int32 nNewIMETextLen = pData->GetText().getLength();
|
||||||
|
|
||||||
if ( ( nOldIMETextLen > nNewIMETextLen ) &&
|
if ( ( nOldIMETextLen > nNewIMETextLen ) &&
|
||||||
( nNewIMETextLen < mpImpl->mpTextEngine->mpIMEInfos->aOldTextAfterStartPos.Len() ) )
|
( nNewIMETextLen < mpImpl->mpTextEngine->mpIMEInfos->aOldTextAfterStartPos.Len() ) )
|
||||||
@ -981,7 +981,7 @@ void TextView::Command( const CommandEvent& rCEvt )
|
|||||||
|
|
||||||
if ( pData->GetTextAttr() )
|
if ( pData->GetTextAttr() )
|
||||||
{
|
{
|
||||||
mpImpl->mpTextEngine->mpIMEInfos->CopyAttribs( pData->GetTextAttr(), pData->GetText().Len() );
|
mpImpl->mpTextEngine->mpIMEInfos->CopyAttribs( pData->GetTextAttr(), pData->GetText().getLength() );
|
||||||
mpImpl->mpTextEngine->mpIMEInfos->bCursor = pData->IsCursorVisible();
|
mpImpl->mpTextEngine->mpIMEInfos->bCursor = pData->IsCursorVisible();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -56,12 +56,12 @@ TextSelection ExtTextEngine::MatchGroup( const TextPaM& rCursor ) const
|
|||||||
sal_uInt16 nLevel = 1;
|
sal_uInt16 nLevel = 1;
|
||||||
while ( nLevel && ( nPara < nParas ) )
|
while ( nLevel && ( nPara < nParas ) )
|
||||||
{
|
{
|
||||||
XubString aStr = GetText( nPara );
|
OUString aStr = GetText( nPara );
|
||||||
while ( nCur < aStr.Len() )
|
while ( nCur < aStr.getLength() )
|
||||||
{
|
{
|
||||||
if ( aStr.GetChar( nCur ) == nSC )
|
if ( aStr[nCur] == nSC )
|
||||||
nLevel++;
|
nLevel++;
|
||||||
else if ( aStr.GetChar( nCur ) == nEC )
|
else if ( aStr[nCur] == nEC )
|
||||||
{
|
{
|
||||||
nLevel--;
|
nLevel--;
|
||||||
if ( !nLevel )
|
if ( !nLevel )
|
||||||
@ -94,16 +94,16 @@ TextSelection ExtTextEngine::MatchGroup( const TextPaM& rCursor ) const
|
|||||||
{
|
{
|
||||||
if ( GetTextLen( nPara ) )
|
if ( GetTextLen( nPara ) )
|
||||||
{
|
{
|
||||||
XubString aStr = GetText( nPara );
|
OUString aStr = GetText( nPara );
|
||||||
while ( nCur )
|
while ( nCur )
|
||||||
{
|
{
|
||||||
if ( aStr.GetChar( nCur ) == nSC )
|
if ( aStr[nCur] == nSC )
|
||||||
{
|
{
|
||||||
nLevel--;
|
nLevel--;
|
||||||
if ( !nLevel )
|
if ( !nLevel )
|
||||||
break; // while nCur...
|
break; // while nCur...
|
||||||
}
|
}
|
||||||
else if ( aStr.GetChar( nCur ) == nEC )
|
else if ( aStr[nCur] == nEC )
|
||||||
nLevel++;
|
nLevel++;
|
||||||
|
|
||||||
nCur--;
|
nCur--;
|
||||||
|
@ -318,9 +318,8 @@ static bool ImplIsNotTransparent( const MetaAction& rAct, const OutputDevice& rO
|
|||||||
case META_TEXT_ACTION:
|
case META_TEXT_ACTION:
|
||||||
{
|
{
|
||||||
const MetaTextAction& rTextAct = static_cast<const MetaTextAction&>(rAct);
|
const MetaTextAction& rTextAct = static_cast<const MetaTextAction&>(rAct);
|
||||||
const XubString aString( rTextAct.GetText(), rTextAct.GetIndex(), rTextAct.GetLen() );
|
const OUString aString( rTextAct.GetText().copy(rTextAct.GetIndex(), rTextAct.GetLen()) );
|
||||||
|
if (!aString.isEmpty())
|
||||||
if( aString.Len() )
|
|
||||||
bRet = true;
|
bRet = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -328,9 +327,8 @@ static bool ImplIsNotTransparent( const MetaAction& rAct, const OutputDevice& rO
|
|||||||
case META_TEXTARRAY_ACTION:
|
case META_TEXTARRAY_ACTION:
|
||||||
{
|
{
|
||||||
const MetaTextArrayAction& rTextAct = static_cast<const MetaTextArrayAction&>(rAct);
|
const MetaTextArrayAction& rTextAct = static_cast<const MetaTextArrayAction&>(rAct);
|
||||||
const XubString aString( rTextAct.GetText(), rTextAct.GetIndex(), rTextAct.GetLen() );
|
const OUString aString( rTextAct.GetText().copy(rTextAct.GetIndex(), rTextAct.GetLen()) );
|
||||||
|
if (!aString.isEmpty())
|
||||||
if( aString.Len() )
|
|
||||||
bRet = true;
|
bRet = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -537,9 +535,9 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
|
|||||||
case META_TEXT_ACTION:
|
case META_TEXT_ACTION:
|
||||||
{
|
{
|
||||||
const MetaTextAction& rTextAct = static_cast<const MetaTextAction&>(rAct);
|
const MetaTextAction& rTextAct = static_cast<const MetaTextAction&>(rAct);
|
||||||
const XubString aString( rTextAct.GetText(), rTextAct.GetIndex(), rTextAct.GetLen() );
|
const OUString aString( rTextAct.GetText().copy(rTextAct.GetIndex(), rTextAct.GetLen()) );
|
||||||
|
|
||||||
if( aString.Len() )
|
if (!aString.isEmpty())
|
||||||
{
|
{
|
||||||
const Point aPtLog( rTextAct.GetPoint() );
|
const Point aPtLog( rTextAct.GetPoint() );
|
||||||
|
|
||||||
@ -555,8 +553,8 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
|
|||||||
case META_TEXTARRAY_ACTION:
|
case META_TEXTARRAY_ACTION:
|
||||||
{
|
{
|
||||||
const MetaTextArrayAction& rTextAct = static_cast<const MetaTextArrayAction&>(rAct);
|
const MetaTextArrayAction& rTextAct = static_cast<const MetaTextArrayAction&>(rAct);
|
||||||
const XubString aString( rTextAct.GetText(), rTextAct.GetIndex(), rTextAct.GetLen() );
|
const OUString aString( rTextAct.GetText().copy(rTextAct.GetIndex(), rTextAct.GetLen()) );
|
||||||
const long nLen = aString.Len();
|
const sal_Int32 nLen = aString.getLength();
|
||||||
|
|
||||||
if( nLen )
|
if( nLen )
|
||||||
{
|
{
|
||||||
@ -581,8 +579,8 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
|
|||||||
case META_STRETCHTEXT_ACTION:
|
case META_STRETCHTEXT_ACTION:
|
||||||
{
|
{
|
||||||
const MetaStretchTextAction& rTextAct = static_cast<const MetaStretchTextAction&>(rAct);
|
const MetaStretchTextAction& rTextAct = static_cast<const MetaStretchTextAction&>(rAct);
|
||||||
const XubString aString( rTextAct.GetText(), rTextAct.GetIndex(), rTextAct.GetLen() );
|
const OUString aString( rTextAct.GetText().copy(rTextAct.GetIndex(), rTextAct.GetLen()) );
|
||||||
const long nLen = aString.Len();
|
const sal_Int32 nLen = aString.getLength();
|
||||||
|
|
||||||
// #i16195# Literate copy from TextArray action, the
|
// #i16195# Literate copy from TextArray action, the
|
||||||
// semantics for the ImplLayout call are copied from the
|
// semantics for the ImplLayout call are copied from the
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include <vcl/cmdevt.hxx>
|
#include <vcl/cmdevt.hxx>
|
||||||
|
|
||||||
CommandExtTextInputData::CommandExtTextInputData( const XubString& rText,
|
CommandExtTextInputData::CommandExtTextInputData( const OUString& rText,
|
||||||
const sal_uInt16* pTextAttr,
|
const sal_uInt16* pTextAttr,
|
||||||
xub_StrLen nCursorPos,
|
xub_StrLen nCursorPos,
|
||||||
sal_uInt16 nCursorFlags,
|
sal_uInt16 nCursorFlags,
|
||||||
@ -31,10 +31,10 @@ CommandExtTextInputData::CommandExtTextInputData( const XubString& rText,
|
|||||||
sal_Bool bOnlyCursor ) :
|
sal_Bool bOnlyCursor ) :
|
||||||
maText( rText )
|
maText( rText )
|
||||||
{
|
{
|
||||||
if ( pTextAttr && maText.Len() )
|
if ( pTextAttr && !maText.isEmpty() )
|
||||||
{
|
{
|
||||||
mpTextAttr = new sal_uInt16[maText.Len()];
|
mpTextAttr = new sal_uInt16[maText.getLength()];
|
||||||
memcpy( mpTextAttr, pTextAttr, maText.Len()*sizeof(sal_uInt16) );
|
memcpy( mpTextAttr, pTextAttr, maText.getLength()*sizeof(sal_uInt16) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mpTextAttr = NULL;
|
mpTextAttr = NULL;
|
||||||
@ -50,10 +50,10 @@ CommandExtTextInputData::CommandExtTextInputData( const XubString& rText,
|
|||||||
CommandExtTextInputData::CommandExtTextInputData( const CommandExtTextInputData& rData ) :
|
CommandExtTextInputData::CommandExtTextInputData( const CommandExtTextInputData& rData ) :
|
||||||
maText( rData.maText )
|
maText( rData.maText )
|
||||||
{
|
{
|
||||||
if ( rData.mpTextAttr && maText.Len() )
|
if ( rData.mpTextAttr && !maText.isEmpty() )
|
||||||
{
|
{
|
||||||
mpTextAttr = new sal_uInt16[maText.Len()];
|
mpTextAttr = new sal_uInt16[maText.getLength()];
|
||||||
memcpy( mpTextAttr, rData.mpTextAttr, maText.Len()*sizeof(sal_uInt16) );
|
memcpy( mpTextAttr, rData.mpTextAttr, maText.getLength()*sizeof(sal_uInt16) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mpTextAttr = NULL;
|
mpTextAttr = NULL;
|
||||||
|
@ -427,11 +427,11 @@ static Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, sal_Uni
|
|||||||
pWindow = ImplGetChildWindow( pParent, nFormStart, i, sal_True );
|
pWindow = ImplGetChildWindow( pParent, nFormStart, i, sal_True );
|
||||||
while( bSearch && pWindow )
|
while( bSearch && pWindow )
|
||||||
{
|
{
|
||||||
const XubString aStr = pWindow->GetText();
|
const OUString aStr = pWindow->GetText();
|
||||||
sal_uInt16 nPos = aStr.Search( '~' );
|
sal_Int32 nPos = aStr.indexOf( '~' );
|
||||||
while ( nPos != STRING_NOTFOUND )
|
while (nPos != -1)
|
||||||
{
|
{
|
||||||
cCompareChar = aStr.GetChar( nPos+1 );
|
cCompareChar = aStr[nPos+1];
|
||||||
cCompareChar = xCharClass->toUpper( OUString(cCompareChar), 0, 1, rLocale )[0];
|
cCompareChar = xCharClass->toUpper( OUString(cCompareChar), 0, 1, rLocale )[0];
|
||||||
if ( cCompareChar == cCharCode )
|
if ( cCompareChar == cCharCode )
|
||||||
{
|
{
|
||||||
@ -453,7 +453,7 @@ static Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, sal_Uni
|
|||||||
rIndex = i;
|
rIndex = i;
|
||||||
return pWindow;
|
return pWindow;
|
||||||
}
|
}
|
||||||
nPos = aStr.Search( '~', nPos+1 );
|
nPos = aStr.indexOf( '~', nPos+1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
// #i93011# it would have made sense to have this really recursive
|
// #i93011# it would have made sense to have this really recursive
|
||||||
|
@ -113,11 +113,11 @@ struct MenuItemData
|
|||||||
MenuItemBits nBits; // MenuItem-Bits
|
MenuItemBits nBits; // MenuItem-Bits
|
||||||
Menu* pSubMenu; // Pointer to SubMenu
|
Menu* pSubMenu; // Pointer to SubMenu
|
||||||
Menu* pAutoSubMenu; // Pointer to SubMenu from Resource
|
Menu* pAutoSubMenu; // Pointer to SubMenu from Resource
|
||||||
XubString aText; // Menu-Text
|
OUString aText; // Menu-Text
|
||||||
XubString aHelpText; // Help-String
|
OUString aHelpText; // Help-String
|
||||||
XubString aTipHelpText; // TipHelp-String (eg, expanded filenames)
|
OUString aTipHelpText; // TipHelp-String (eg, expanded filenames)
|
||||||
XubString aCommandStr; // CommandString
|
OUString aCommandStr; // CommandString
|
||||||
XubString aHelpCommandStr; // Help command string (to reference external help)
|
OUString aHelpCommandStr; // Help command string (to reference external help)
|
||||||
OString sIdent;
|
OString sIdent;
|
||||||
OString aHelpId; // Help-Id
|
OString aHelpId; // Help-Id
|
||||||
sal_uLong nUserValue; // User value
|
sal_uLong nUserValue; // User value
|
||||||
@ -130,15 +130,15 @@ struct MenuItemData
|
|||||||
sal_Bool bMirrorMode;
|
sal_Bool bMirrorMode;
|
||||||
long nItemImageAngle;
|
long nItemImageAngle;
|
||||||
Size aSz; // only temporarily valid
|
Size aSz; // only temporarily valid
|
||||||
XubString aAccessibleName; // accessible name
|
OUString aAccessibleName; // accessible name
|
||||||
XubString aAccessibleDescription; // accessible description
|
OUString aAccessibleDescription; // accessible description
|
||||||
|
|
||||||
SalMenuItem* pSalMenuItem; // access to native menu
|
SalMenuItem* pSalMenuItem; // access to native menu
|
||||||
|
|
||||||
MenuItemData() :
|
MenuItemData() :
|
||||||
pSubMenu(NULL), pAutoSubMenu(NULL), nItemImageAngle(0), pSalMenuItem ( NULL )
|
pSubMenu(NULL), pAutoSubMenu(NULL), nItemImageAngle(0), pSalMenuItem ( NULL )
|
||||||
{}
|
{}
|
||||||
MenuItemData( const XubString& rStr, const Image& rImage ) :
|
MenuItemData( const OUString& rStr, const Image& rImage ) :
|
||||||
pSubMenu(NULL),
|
pSubMenu(NULL),
|
||||||
pAutoSubMenu(NULL),
|
pAutoSubMenu(NULL),
|
||||||
aText( rStr ),
|
aText( rStr ),
|
||||||
@ -181,7 +181,7 @@ public:
|
|||||||
sal_uInt16 nId,
|
sal_uInt16 nId,
|
||||||
MenuItemType eType,
|
MenuItemType eType,
|
||||||
MenuItemBits nBits,
|
MenuItemBits nBits,
|
||||||
const XubString& rStr,
|
const OUString& rStr,
|
||||||
const Image& rImage,
|
const Image& rImage,
|
||||||
Menu* pMenu,
|
Menu* pMenu,
|
||||||
size_t nPos,
|
size_t nPos,
|
||||||
@ -229,7 +229,7 @@ MenuItemData* MenuItemList::Insert(
|
|||||||
sal_uInt16 nId,
|
sal_uInt16 nId,
|
||||||
MenuItemType eType,
|
MenuItemType eType,
|
||||||
MenuItemBits nBits,
|
MenuItemBits nBits,
|
||||||
const XubString& rStr,
|
const OUString& rStr,
|
||||||
const Image& rImage,
|
const Image& rImage,
|
||||||
Menu* pMenu,
|
Menu* pMenu,
|
||||||
size_t nPos,
|
size_t nPos,
|
||||||
@ -292,7 +292,7 @@ void MenuItemList::InsertSeparator(const OString &rIdent, size_t nPos)
|
|||||||
aSalMIData.eType = MENUITEM_SEPARATOR;
|
aSalMIData.eType = MENUITEM_SEPARATOR;
|
||||||
aSalMIData.nBits = 0;
|
aSalMIData.nBits = 0;
|
||||||
aSalMIData.pMenu = NULL;
|
aSalMIData.pMenu = NULL;
|
||||||
aSalMIData.aText = XubString();
|
aSalMIData.aText = OUString();
|
||||||
aSalMIData.aImage = Image();
|
aSalMIData.aImage = Image();
|
||||||
|
|
||||||
// Native-support: returns NULL if not supported
|
// Native-support: returns NULL if not supported
|
||||||
@ -370,11 +370,11 @@ MenuItemData* MenuItemList::SearchItem(
|
|||||||
MenuItemData* pData = maItemList[ rPos ];
|
MenuItemData* pData = maItemList[ rPos ];
|
||||||
if ( pData->bEnabled )
|
if ( pData->bEnabled )
|
||||||
{
|
{
|
||||||
sal_uInt16 n = pData->aText.Search( '~' );
|
sal_Int32 n = pData->aText.indexOf('~');
|
||||||
if ( n != STRING_NOTFOUND )
|
if ( n != -1 )
|
||||||
{
|
{
|
||||||
KeyCode mnKeyCode;
|
KeyCode mnKeyCode;
|
||||||
sal_Unicode mnUnicode = pData->aText.GetChar(n+1);
|
sal_Unicode mnUnicode = pData->aText[n+1];
|
||||||
Window* pDefWindow = ImplGetDefaultWindow();
|
Window* pDefWindow = ImplGetDefaultWindow();
|
||||||
if( ( pDefWindow
|
if( ( pDefWindow
|
||||||
&& pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( mnUnicode,
|
&& pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( mnUnicode,
|
||||||
@ -430,15 +430,15 @@ size_t MenuItemList::GetItemCount( KeyCode aKeyCode ) const
|
|||||||
MenuItemData* pData = maItemList[ --nPos ];
|
MenuItemData* pData = maItemList[ --nPos ];
|
||||||
if ( pData->bEnabled )
|
if ( pData->bEnabled )
|
||||||
{
|
{
|
||||||
sal_uInt16 n = pData->aText.Search( '~' );
|
sal_Int32 n = pData->aText.indexOf('~');
|
||||||
if ( n != STRING_NOTFOUND )
|
if (n != -1)
|
||||||
{
|
{
|
||||||
KeyCode mnKeyCode;
|
KeyCode mnKeyCode;
|
||||||
// if MapUnicodeToKeyCode fails or is unsupported we try the pure ascii mapping of the keycodes
|
// if MapUnicodeToKeyCode fails or is unsupported we try the pure ascii mapping of the keycodes
|
||||||
// so we have working shortcuts when ascii mnemonics are used
|
// so we have working shortcuts when ascii mnemonics are used
|
||||||
Window* pDefWindow = ImplGetDefaultWindow();
|
Window* pDefWindow = ImplGetDefaultWindow();
|
||||||
if( ( pDefWindow
|
if( ( pDefWindow
|
||||||
&& pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( pData->aText.GetChar(n+1),
|
&& pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( pData->aText[n+1],
|
||||||
Application::GetSettings().GetUILanguageTag().getLanguageType(), mnKeyCode )
|
Application::GetSettings().GetUILanguageTag().getLanguageType(), mnKeyCode )
|
||||||
&& aKeyCode.GetCode() == mnKeyCode.GetCode()
|
&& aKeyCode.GetCode() == mnKeyCode.GetCode()
|
||||||
)
|
)
|
||||||
@ -769,7 +769,7 @@ static void ImplSetMenuItemData( MenuItemData* pData )
|
|||||||
// convert data
|
// convert data
|
||||||
if ( !pData->aImage )
|
if ( !pData->aImage )
|
||||||
pData->eType = MENUITEM_STRING;
|
pData->eType = MENUITEM_STRING;
|
||||||
else if ( !pData->aText.Len() )
|
else if ( pData->aText.isEmpty() )
|
||||||
pData->eType = MENUITEM_IMAGE;
|
pData->eType = MENUITEM_IMAGE;
|
||||||
else
|
else
|
||||||
pData->eType = MENUITEM_STRINGIMAGE;
|
pData->eType = MENUITEM_STRINGIMAGE;
|
||||||
@ -810,7 +810,7 @@ static bool ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, sal_uInt16 nH
|
|||||||
aPos = rHEvt.GetMousePosPixel();
|
aPos = rHEvt.GetMousePosPixel();
|
||||||
|
|
||||||
Rectangle aRect( aPos, Size() );
|
Rectangle aRect( aPos, Size() );
|
||||||
if( pMenu->GetHelpText( nId ).Len() )
|
if (!pMenu->GetHelpText(nId).isEmpty())
|
||||||
Help::ShowBalloon( pMenuWindow, aPos, pMenu->GetHelpText( nId ) );
|
Help::ShowBalloon( pMenuWindow, aPos, pMenu->GetHelpText( nId ) );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1202,7 +1202,7 @@ void Menu::RemoveEventListener( const Link& rEventListener )
|
|||||||
maEventListeners.removeListener( rEventListener );
|
maEventListeners.removeListener( rEventListener );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::InsertItem(sal_uInt16 nItemId, const XubString& rStr, MenuItemBits nItemBits,
|
void Menu::InsertItem(sal_uInt16 nItemId, const OUString& rStr, MenuItemBits nItemBits,
|
||||||
const OString &rIdent, sal_uInt16 nPos)
|
const OString &rIdent, sal_uInt16 nPos)
|
||||||
{
|
{
|
||||||
DBG_ASSERT( nItemId, "Menu::InsertItem(): ItemId == 0" );
|
DBG_ASSERT( nItemId, "Menu::InsertItem(): ItemId == 0" );
|
||||||
@ -1235,11 +1235,11 @@ void Menu::InsertItem(sal_uInt16 nItemId, const XubString& rStr, MenuItemBits nI
|
|||||||
void Menu::InsertItem(sal_uInt16 nItemId, const Image& rImage,
|
void Menu::InsertItem(sal_uInt16 nItemId, const Image& rImage,
|
||||||
MenuItemBits nItemBits, const OString &rIdent, sal_uInt16 nPos)
|
MenuItemBits nItemBits, const OString &rIdent, sal_uInt16 nPos)
|
||||||
{
|
{
|
||||||
InsertItem(nItemId, ImplGetSVEmptyStr(), nItemBits, rIdent, nPos);
|
InsertItem(nItemId, OUString(), nItemBits, rIdent, nPos);
|
||||||
SetItemImage( nItemId, rImage );
|
SetItemImage( nItemId, rImage );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::InsertItem(sal_uInt16 nItemId, const XubString& rStr,
|
void Menu::InsertItem(sal_uInt16 nItemId, const OUString& rStr,
|
||||||
const Image& rImage, MenuItemBits nItemBits,
|
const Image& rImage, MenuItemBits nItemBits,
|
||||||
const OString &rIdent, sal_uInt16 nPos)
|
const OString &rIdent, sal_uInt16 nPos)
|
||||||
{
|
{
|
||||||
@ -1292,7 +1292,7 @@ void Menu::InsertItem( const ResId& rResId, sal_uInt16 nPos )
|
|||||||
if ( bSep )
|
if ( bSep )
|
||||||
InsertSeparator(OString(), nPos);
|
InsertSeparator(OString(), nPos);
|
||||||
|
|
||||||
String aHelpText;
|
OUString aHelpText;
|
||||||
if ( nObjMask & RSC_MENUITEM_HELPTEXT )
|
if ( nObjMask & RSC_MENUITEM_HELPTEXT )
|
||||||
{
|
{
|
||||||
aHelpText = ReadStringRes();
|
aHelpText = ReadStringRes();
|
||||||
@ -1675,11 +1675,11 @@ KeyEvent Menu::GetActivationKey( sal_uInt16 nItemId ) const
|
|||||||
MenuItemData* pData = pItemList->GetData( nItemId );
|
MenuItemData* pData = pItemList->GetData( nItemId );
|
||||||
if( pData )
|
if( pData )
|
||||||
{
|
{
|
||||||
sal_uInt16 nPos = pData->aText.Search( '~' );
|
sal_Int32 nPos = pData->aText.indexOf( '~' );
|
||||||
if( nPos != STRING_NOTFOUND && nPos < pData->aText.Len()-1 )
|
if( nPos != -1 && nPos < pData->aText.getLength()-1 )
|
||||||
{
|
{
|
||||||
sal_uInt16 nCode = 0;
|
sal_uInt16 nCode = 0;
|
||||||
sal_Unicode cAccel = pData->aText.GetChar( nPos+1 );
|
sal_Unicode cAccel = pData->aText[nPos+1];
|
||||||
if( cAccel >= 'a' && cAccel <= 'z' )
|
if( cAccel >= 'a' && cAccel <= 'z' )
|
||||||
nCode = KEY_A + (cAccel-'a');
|
nCode = KEY_A + (cAccel-'a');
|
||||||
else if( cAccel >= 'A' && cAccel <= 'Z' )
|
else if( cAccel >= 'A' && cAccel <= 'Z' )
|
||||||
@ -1837,7 +1837,7 @@ void Menu::ShowItem( sal_uInt16 nItemId, sal_Bool bVisible )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::SetItemText( sal_uInt16 nItemId, const XubString& rStr )
|
void Menu::SetItemText( sal_uInt16 nItemId, const OUString& rStr )
|
||||||
{
|
{
|
||||||
size_t nPos;
|
size_t nPos;
|
||||||
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
|
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
|
||||||
@ -1845,7 +1845,7 @@ void Menu::SetItemText( sal_uInt16 nItemId, const XubString& rStr )
|
|||||||
if ( !pData )
|
if ( !pData )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( !rStr.Equals( pData->aText ) )
|
if ( !rStr.equals( pData->aText ) )
|
||||||
{
|
{
|
||||||
pData->aText = rStr;
|
pData->aText = rStr;
|
||||||
ImplSetMenuItemData( pData );
|
ImplSetMenuItemData( pData );
|
||||||
@ -1866,15 +1866,15 @@ void Menu::SetItemText( sal_uInt16 nItemId, const XubString& rStr )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
XubString Menu::GetItemText( sal_uInt16 nItemId ) const
|
OUString Menu::GetItemText( sal_uInt16 nItemId ) const
|
||||||
{
|
{
|
||||||
size_t nPos;
|
size_t nPos;
|
||||||
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
|
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
|
||||||
|
|
||||||
if ( pData )
|
if ( pData )
|
||||||
return pData->aText;
|
return pData->aText;
|
||||||
else
|
|
||||||
return ImplGetSVEmptyStr();
|
return OUString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::SetItemImage( sal_uInt16 nItemId, const Image& rImage )
|
void Menu::SetItemImage( sal_uInt16 nItemId, const Image& rImage )
|
||||||
@ -1987,7 +1987,7 @@ void Menu::SetItemCommand( sal_uInt16 nItemId, const OUString& rCommand )
|
|||||||
pData->aCommandStr = rCommand;
|
pData->aCommandStr = rCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
const OUString Menu::GetItemCommand( sal_uInt16 nItemId ) const
|
OUString Menu::GetItemCommand( sal_uInt16 nItemId ) const
|
||||||
{
|
{
|
||||||
MenuItemData* pData = pItemList->GetData( nItemId );
|
MenuItemData* pData = pItemList->GetData( nItemId );
|
||||||
|
|
||||||
@ -1997,7 +1997,7 @@ const OUString Menu::GetItemCommand( sal_uInt16 nItemId ) const
|
|||||||
return OUString();
|
return OUString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::SetHelpCommand( sal_uInt16 nItemId, const XubString& rStr )
|
void Menu::SetHelpCommand( sal_uInt16 nItemId, const OUString& rStr )
|
||||||
{
|
{
|
||||||
MenuItemData* pData = pItemList->GetData( nItemId );
|
MenuItemData* pData = pItemList->GetData( nItemId );
|
||||||
|
|
||||||
@ -2005,17 +2005,17 @@ void Menu::SetHelpCommand( sal_uInt16 nItemId, const XubString& rStr )
|
|||||||
pData->aHelpCommandStr = rStr;
|
pData->aHelpCommandStr = rStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const XubString& Menu::GetHelpCommand( sal_uInt16 nItemId ) const
|
OUString Menu::GetHelpCommand( sal_uInt16 nItemId ) const
|
||||||
{
|
{
|
||||||
MenuItemData* pData = pItemList->GetData( nItemId );
|
MenuItemData* pData = pItemList->GetData( nItemId );
|
||||||
|
|
||||||
if ( pData )
|
if ( pData )
|
||||||
return pData->aHelpCommandStr;
|
return pData->aHelpCommandStr;
|
||||||
else
|
|
||||||
return ImplGetSVEmptyStr();
|
return OUString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::SetHelpText( sal_uInt16 nItemId, const XubString& rStr )
|
void Menu::SetHelpText( sal_uInt16 nItemId, const OUString& rStr )
|
||||||
{
|
{
|
||||||
MenuItemData* pData = pItemList->GetData( nItemId );
|
MenuItemData* pData = pItemList->GetData( nItemId );
|
||||||
|
|
||||||
@ -2023,38 +2023,38 @@ void Menu::SetHelpText( sal_uInt16 nItemId, const XubString& rStr )
|
|||||||
pData->aHelpText = rStr;
|
pData->aHelpText = rStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const XubString& Menu::ImplGetHelpText( sal_uInt16 nItemId ) const
|
OUString Menu::ImplGetHelpText( sal_uInt16 nItemId ) const
|
||||||
{
|
{
|
||||||
MenuItemData* pData = pItemList->GetData( nItemId );
|
MenuItemData* pData = pItemList->GetData( nItemId );
|
||||||
|
|
||||||
if ( pData )
|
if ( pData )
|
||||||
{
|
{
|
||||||
if ( !pData->aHelpText.Len() &&
|
if ( pData->aHelpText.isEmpty() &&
|
||||||
(( !pData->aHelpId.isEmpty() ) || ( pData->aCommandStr.Len() )))
|
(( !pData->aHelpId.isEmpty() ) || ( !pData->aCommandStr.isEmpty() )))
|
||||||
{
|
{
|
||||||
Help* pHelp = Application::GetHelp();
|
Help* pHelp = Application::GetHelp();
|
||||||
if ( pHelp )
|
if ( pHelp )
|
||||||
{
|
{
|
||||||
if ( pData->aCommandStr.Len() )
|
if (!pData->aCommandStr.isEmpty())
|
||||||
pData->aHelpText = pHelp->GetHelpText( pData->aCommandStr, NULL );
|
pData->aHelpText = pHelp->GetHelpText( pData->aCommandStr, NULL );
|
||||||
|
|
||||||
if( !pData->aHelpText.Len() && !pData->aHelpId.isEmpty() )
|
if( pData->aHelpText.isEmpty() && !pData->aHelpId.isEmpty() )
|
||||||
pData->aHelpText = pHelp->GetHelpText( OStringToOUString( pData->aHelpId, RTL_TEXTENCODING_UTF8 ), NULL );
|
pData->aHelpText = pHelp->GetHelpText( OStringToOUString( pData->aHelpId, RTL_TEXTENCODING_UTF8 ), NULL );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return pData->aHelpText;
|
return pData->aHelpText;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return ImplGetSVEmptyStr();
|
return OUString();
|
||||||
}
|
}
|
||||||
|
|
||||||
const XubString& Menu::GetHelpText( sal_uInt16 nItemId ) const
|
OUString Menu::GetHelpText( sal_uInt16 nItemId ) const
|
||||||
{
|
{
|
||||||
return ImplGetHelpText( nItemId );
|
return ImplGetHelpText( nItemId );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::SetTipHelpText( sal_uInt16 nItemId, const XubString& rStr )
|
void Menu::SetTipHelpText( sal_uInt16 nItemId, const OUString& rStr )
|
||||||
{
|
{
|
||||||
MenuItemData* pData = pItemList->GetData( nItemId );
|
MenuItemData* pData = pItemList->GetData( nItemId );
|
||||||
|
|
||||||
@ -2062,14 +2062,14 @@ void Menu::SetTipHelpText( sal_uInt16 nItemId, const XubString& rStr )
|
|||||||
pData->aTipHelpText = rStr;
|
pData->aTipHelpText = rStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const XubString& Menu::GetTipHelpText( sal_uInt16 nItemId ) const
|
OUString Menu::GetTipHelpText( sal_uInt16 nItemId ) const
|
||||||
{
|
{
|
||||||
MenuItemData* pData = pItemList->GetData( nItemId );
|
MenuItemData* pData = pItemList->GetData( nItemId );
|
||||||
|
|
||||||
if ( pData )
|
if ( pData )
|
||||||
return pData->aTipHelpText;
|
return pData->aTipHelpText;
|
||||||
else
|
|
||||||
return ImplGetSVEmptyStr();
|
return OUString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::SetHelpId( sal_uInt16 nItemId, const OString& rHelpId )
|
void Menu::SetHelpId( sal_uInt16 nItemId, const OString& rHelpId )
|
||||||
@ -2841,7 +2841,7 @@ void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemDa
|
|||||||
long nMaxItemTextWidth = aOutSz.Width() - aTmpPos.X() - nExtra - nOuterSpaceX;
|
long nMaxItemTextWidth = aOutSz.Width() - aTmpPos.X() - nExtra - nOuterSpaceX;
|
||||||
if( !bIsMenuBar && pData->aAccelKey.GetCode() && !ImplAccelDisabled() )
|
if( !bIsMenuBar && pData->aAccelKey.GetCode() && !ImplAccelDisabled() )
|
||||||
{
|
{
|
||||||
XubString aAccText = pData->aAccelKey.GetName();
|
OUString aAccText = pData->aAccelKey.GetName();
|
||||||
nMaxItemTextWidth -= pWin->GetTextWidth( aAccText ) + 3*nExtra;
|
nMaxItemTextWidth -= pWin->GetTextWidth( aAccText ) + 3*nExtra;
|
||||||
}
|
}
|
||||||
if( !bIsMenuBar && pData->pSubMenu )
|
if( !bIsMenuBar && pData->pSubMenu )
|
||||||
@ -2857,14 +2857,14 @@ void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemDa
|
|||||||
// Accel
|
// Accel
|
||||||
if ( !bLayout && !bIsMenuBar && pData->aAccelKey.GetCode() && !ImplAccelDisabled() )
|
if ( !bLayout && !bIsMenuBar && pData->aAccelKey.GetCode() && !ImplAccelDisabled() )
|
||||||
{
|
{
|
||||||
XubString aAccText = pData->aAccelKey.GetName();
|
OUString aAccText = pData->aAccelKey.GetName();
|
||||||
aTmpPos.X() = aOutSz.Width() - pWin->GetTextWidth( aAccText );
|
aTmpPos.X() = aOutSz.Width() - pWin->GetTextWidth( aAccText );
|
||||||
aTmpPos.X() -= 4*nExtra;
|
aTmpPos.X() -= 4*nExtra;
|
||||||
|
|
||||||
aTmpPos.X() -= nOuterSpaceX;
|
aTmpPos.X() -= nOuterSpaceX;
|
||||||
aTmpPos.Y() = aPos.Y();
|
aTmpPos.Y() = aPos.Y();
|
||||||
aTmpPos.Y() += nTextOffsetY;
|
aTmpPos.Y() += nTextOffsetY;
|
||||||
pWin->DrawCtrlText( aTmpPos, aAccText, 0, aAccText.Len(), nTextStyle );
|
pWin->DrawCtrlText( aTmpPos, aAccText, 0, aAccText.getLength(), nTextStyle );
|
||||||
}
|
}
|
||||||
|
|
||||||
// SubMenu?
|
// SubMenu?
|
||||||
@ -3193,26 +3193,26 @@ Rectangle Menu::GetBoundingRectangle( sal_uInt16 nPos ) const
|
|||||||
return aRet;
|
return aRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::SetAccessibleName( sal_uInt16 nItemId, const XubString& rStr )
|
void Menu::SetAccessibleName( sal_uInt16 nItemId, const OUString& rStr )
|
||||||
{
|
{
|
||||||
size_t nPos;
|
size_t nPos;
|
||||||
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
|
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
|
||||||
|
|
||||||
if ( pData && !rStr.Equals( pData->aAccessibleName ) )
|
if ( pData && !rStr.equals( pData->aAccessibleName ) )
|
||||||
{
|
{
|
||||||
pData->aAccessibleName = rStr;
|
pData->aAccessibleName = rStr;
|
||||||
ImplCallEventListeners( VCLEVENT_MENU_ACCESSIBLENAMECHANGED, nPos );
|
ImplCallEventListeners( VCLEVENT_MENU_ACCESSIBLENAMECHANGED, nPos );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
XubString Menu::GetAccessibleName( sal_uInt16 nItemId ) const
|
OUString Menu::GetAccessibleName( sal_uInt16 nItemId ) const
|
||||||
{
|
{
|
||||||
MenuItemData* pData = pItemList->GetData( nItemId );
|
MenuItemData* pData = pItemList->GetData( nItemId );
|
||||||
|
|
||||||
if ( pData )
|
if ( pData )
|
||||||
return pData->aAccessibleName;
|
return pData->aAccessibleName;
|
||||||
else
|
|
||||||
return ImplGetSVEmptyStr();
|
return OUString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::ImplSetSalMenu( SalMenu *pSalMenu )
|
void Menu::ImplSetSalMenu( SalMenu *pSalMenu )
|
||||||
|
@ -2698,7 +2698,7 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt )
|
|||||||
aHelpRect.Bottom() = aPt.Y();
|
aHelpRect.Bottom() = aPt.Y();
|
||||||
|
|
||||||
// Text ermitteln und anzeigen
|
// Text ermitteln und anzeigen
|
||||||
XubString aStr;
|
OUString aStr;
|
||||||
ResMgr* pResMgr = ImplGetResMgr();
|
ResMgr* pResMgr = ImplGetResMgr();
|
||||||
if( pResMgr )
|
if( pResMgr )
|
||||||
aStr = ResId( nHelpResId, *pResMgr ).toString();
|
aStr = ResId( nHelpResId, *pResMgr ).toString();
|
||||||
|
@ -363,10 +363,10 @@ void StatusBar::ImplDrawText( sal_Bool bOffScreen, long nOldTextWidth )
|
|||||||
if ( aTextRect.Right() > aTextRect.Left() )
|
if ( aTextRect.Right() > aTextRect.Left() )
|
||||||
{
|
{
|
||||||
// Position ermitteln
|
// Position ermitteln
|
||||||
XubString aStr = GetText();
|
OUString aStr = GetText();
|
||||||
sal_uInt16 nPos = aStr.Search( '\n' );
|
sal_Int32 nPos = aStr.indexOf('\n');
|
||||||
if ( nPos != STRING_NOTFOUND )
|
if (nPos != -1)
|
||||||
aStr.Erase( nPos );
|
aStr = aStr.copy(0, nPos);
|
||||||
|
|
||||||
aTextRect.Bottom() = aTextRect.Top()+GetTextHeight()+1;
|
aTextRect.Bottom() = aTextRect.Top()+GetTextHeight()+1;
|
||||||
|
|
||||||
@ -809,15 +809,15 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt )
|
|||||||
|
|
||||||
if ( rHEvt.GetMode() & HELPMODE_BALLOON )
|
if ( rHEvt.GetMode() & HELPMODE_BALLOON )
|
||||||
{
|
{
|
||||||
XubString aStr = GetHelpText( nItemId );
|
OUString aStr = GetHelpText( nItemId );
|
||||||
Help::ShowBalloon( this, aItemRect.Center(), aItemRect, aStr );
|
Help::ShowBalloon( this, aItemRect.Center(), aItemRect, aStr );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if ( rHEvt.GetMode() & HELPMODE_QUICK )
|
else if ( rHEvt.GetMode() & HELPMODE_QUICK )
|
||||||
{
|
{
|
||||||
XubString aStr = GetQuickHelpText( nItemId );
|
OUString aStr(GetQuickHelpText(nItemId));
|
||||||
// Show quickhelp if available
|
// Show quickhelp if available
|
||||||
if( aStr.Len() )
|
if (!aStr.isEmpty())
|
||||||
{
|
{
|
||||||
Help::ShowQuickHelp( this, aItemRect, aStr );
|
Help::ShowQuickHelp( this, aItemRect, aStr );
|
||||||
return;
|
return;
|
||||||
|
@ -4310,13 +4310,13 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
|
|||||||
aTempRect.Bottom() = aPt.Y();
|
aTempRect.Bottom() = aPt.Y();
|
||||||
|
|
||||||
// get text and display it
|
// get text and display it
|
||||||
XubString aStr = GetQuickHelpText( nItemId );
|
OUString aStr = GetQuickHelpText( nItemId );
|
||||||
const XubString& rHelpStr = GetHelpText( nItemId );
|
const OUString& rHelpStr = GetHelpText( nItemId );
|
||||||
if ( !aStr.Len() )
|
if (aStr.isEmpty())
|
||||||
aStr = MnemonicGenerator::EraseAllMnemonicChars( GetItemText( nItemId ) );
|
aStr = MnemonicGenerator::EraseAllMnemonicChars( GetItemText( nItemId ) );
|
||||||
if ( rHEvt.GetMode() & HELPMODE_BALLOON )
|
if ( rHEvt.GetMode() & HELPMODE_BALLOON )
|
||||||
{
|
{
|
||||||
if ( rHelpStr.Len() )
|
if (!rHelpStr.isEmpty())
|
||||||
aStr = rHelpStr;
|
aStr = rHelpStr;
|
||||||
Help::ShowBalloon( this, aHelpPos, aTempRect, aStr );
|
Help::ShowBalloon( this, aHelpPos, aTempRect, aStr );
|
||||||
}
|
}
|
||||||
|
@ -4183,10 +4183,10 @@ void Window::ImplNewInputContext()
|
|||||||
|
|
||||||
SalInputContext aNewContext;
|
SalInputContext aNewContext;
|
||||||
const Font& rFont = rInputContext.GetFont();
|
const Font& rFont = rInputContext.GetFont();
|
||||||
const XubString& rFontName = rFont.GetName();
|
const OUString& rFontName = rFont.GetName();
|
||||||
ImplFontEntry* pFontEntry = NULL;
|
ImplFontEntry* pFontEntry = NULL;
|
||||||
aNewContext.mpFont = NULL;
|
aNewContext.mpFont = NULL;
|
||||||
if ( rFontName.Len() )
|
if (!rFontName.isEmpty())
|
||||||
{
|
{
|
||||||
Size aSize = pFocusWin->ImplLogicToDevicePixel( rFont.GetSize() );
|
Size aSize = pFocusWin->ImplLogicToDevicePixel( rFont.GetSize() );
|
||||||
if ( !aSize.Height() )
|
if ( !aSize.Height() )
|
||||||
|
@ -1223,7 +1223,7 @@ static long ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent,
|
|||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
static long ImplHandleExtTextInput( Window* pWindow,
|
static long ImplHandleExtTextInput( Window* pWindow,
|
||||||
const XubString& rText,
|
const OUString& rText,
|
||||||
const sal_uInt16* pTextAttr,
|
const sal_uInt16* pTextAttr,
|
||||||
sal_uLong nCursorPos, sal_uInt16 nCursorFlags )
|
sal_uLong nCursorPos, sal_uInt16 nCursorFlags )
|
||||||
{
|
{
|
||||||
@ -1266,12 +1266,12 @@ static long ImplHandleExtTextInput( Window* pWindow,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// Test for changes
|
// Test for changes
|
||||||
sal_Bool bOnlyCursor = sal_False;
|
bool bOnlyCursor = false;
|
||||||
xub_StrLen nMinLen = std::min( pWinData->mpExtOldText->getLength(), sal_Int32(rText.Len()) );
|
sal_Int32 nMinLen = std::min( pWinData->mpExtOldText->getLength(), rText.getLength() );
|
||||||
xub_StrLen nDeltaStart = 0;
|
sal_Int32 nDeltaStart = 0;
|
||||||
while ( nDeltaStart < nMinLen )
|
while ( nDeltaStart < nMinLen )
|
||||||
{
|
{
|
||||||
if ( (*pWinData->mpExtOldText)[nDeltaStart] != rText.GetChar( nDeltaStart ) )
|
if ( (*pWinData->mpExtOldText)[nDeltaStart] != rText[nDeltaStart] )
|
||||||
break;
|
break;
|
||||||
nDeltaStart++;
|
nDeltaStart++;
|
||||||
}
|
}
|
||||||
@ -1294,8 +1294,8 @@ static long ImplHandleExtTextInput( Window* pWindow,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( (nDeltaStart >= nMinLen) &&
|
if ( (nDeltaStart >= nMinLen) &&
|
||||||
(pWinData->mpExtOldText->getLength() == rText.Len()) )
|
(pWinData->mpExtOldText->getLength() == rText.getLength()) )
|
||||||
bOnlyCursor = sal_True;
|
bOnlyCursor = true;
|
||||||
|
|
||||||
// Call Event and store the information
|
// Call Event and store the information
|
||||||
CommandExtTextInputData aData( rText, pTextAttr,
|
CommandExtTextInputData aData( rText, pTextAttr,
|
||||||
@ -1310,8 +1310,8 @@ static long ImplHandleExtTextInput( Window* pWindow,
|
|||||||
}
|
}
|
||||||
if ( pTextAttr )
|
if ( pTextAttr )
|
||||||
{
|
{
|
||||||
pWinData->mpExtOldAttrAry = new sal_uInt16[rText.Len()];
|
pWinData->mpExtOldAttrAry = new sal_uInt16[rText.getLength()];
|
||||||
memcpy( pWinData->mpExtOldAttrAry, pTextAttr, rText.Len()*sizeof( sal_uInt16 ) );
|
memcpy( pWinData->mpExtOldAttrAry, pTextAttr, rText.getLength()*sizeof( sal_uInt16 ) );
|
||||||
}
|
}
|
||||||
return !ImplCallCommand( pChild, COMMAND_EXTTEXTINPUT, &aData );
|
return !ImplCallCommand( pChild, COMMAND_EXTTEXTINPUT, &aData );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user