[Libreoffice-commits] .: 2 commits - basctl/source cui/source svx/source
basctl/source/basicide/bastypes.cxx |2 -- basctl/source/basicide/macrodlg.hxx |2 -- basctl/source/dlged/propbrw.cxx |5 - cui/source/customize/cfgutil.cxx|6 -- cui/source/dialogs/SpellDialog.cxx |1 - cui/source/dialogs/cuigaldlg.cxx|7 --- cui/source/dialogs/cuiimapwnd.cxx |2 -- cui/source/dialogs/linkdlg.cxx |5 - cui/source/inc/scriptdlg.hxx|6 -- svx/source/form/fmPropBrw.cxx |6 -- svx/source/form/tabwin.cxx |6 -- 11 files changed, 48 deletions(-) New commits: commit ac7f7b04627c9ee8321b1696fa609d9632763b8b Author: Takeshi Abe t...@fixedpoint.jp Date: Fri Apr 20 01:56:39 2012 +0900 removed unused defines diff --git a/basctl/source/basicide/macrodlg.hxx b/basctl/source/basicide/macrodlg.hxx index ef4f3bf..ee4ce3e 100644 --- a/basctl/source/basicide/macrodlg.hxx +++ b/basctl/source/basicide/macrodlg.hxx @@ -42,8 +42,6 @@ #define MACRO_OK_RUN11 #define MACRO_NEW 12 #define MACRO_EDIT 14 -#define MACRO_ORGANIZE 15 -#define MACRO_ASSIGN16 #define MACROCHOOSER_ALL1 #define MACROCHOOSER_CHOOSEONLY 2 diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index fe1e39d..200cd39 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -79,7 +79,6 @@ using namespace ::com::sun::star::linguistic2; using ::rtl::OUString; -#define C2U(cChar) ::rtl::OUString::createFromAscii(cChar) // struct SpellDialog_Impl - struct SpellDialog_Impl diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index fd80ad3..9c14228 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -73,13 +73,6 @@ using namespace ::com::sun::star::ucb; using namespace ::com::sun::star::ui::dialogs; using namespace ::com::sun::star::uno; - -// --- -// - Defines - -// --- - -#define MAXPATH 1024 - // // - SearchThread - // diff --git a/cui/source/dialogs/cuiimapwnd.cxx b/cui/source/dialogs/cuiimapwnd.cxx index f04dc99..bdaef5f 100644 --- a/cui/source/dialogs/cuiimapwnd.cxx +++ b/cui/source/dialogs/cuiimapwnd.cxx @@ -53,8 +53,6 @@ #include sot/formats.hxx -#define TRANSCOL Color( COL_WHITE ) - /* |* |* URLDlg diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 11c714a..b61e721 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -53,11 +53,6 @@ #include svl/svstdarr.hxx -#define MAX_FILENAME18 -#define MAX_LINKNAME18 -#define MAX_TYPENAME15 -#define MAX_UPDATENAME 10 - #define FILEOBJECT ( OBJECT_CLIENT_FILE ~OBJECT_CLIENT_SO ) using namespace sfx2; diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx index 394f289..c347063 100644 --- a/cui/source/inc/scriptdlg.hxx +++ b/cui/source/inc/scriptdlg.hxx @@ -51,12 +51,6 @@ #define OBJTYPE_SCRIPTCONTAINER 3L #define OBJTYPE_SFROOT 4L -#define BROWSEMODE_MODULES 0x01 -#define BROWSEMODE_SUBS 0x02 -#define BROWSEMODE_OBJS 0x04 -#define BROWSEMODE_PROPS0x08 -#define BROWSEMODE_SUBOBJS 0x10 - #define INPUTMODE_NEWLIB1 #define INPUTMODE_NEWMACRO 2 #define INPUTMODE_RENAME3 commit 3f7c2623633ccce76cb5523d9dc2a268226b34ab Author: Takeshi Abe t...@fixedpoint.jp Date: Fri Apr 20 01:56:13 2012 +0900 removed unused const/static data diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index cde8bdc..eb079eb 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -52,8 +52,6 @@ using ::std::vector; DBG_NAME( IDEBaseWindow ) -const char* pRegName = BasicIDETabBar; - TYPEINIT0( IDEBaseWindow ) TYPEINIT1( SbxItem, SfxPoolItem ); diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx index 4e1f90f..3dddfbc 100644 --- a/basctl/source/dlged/propbrw.cxx +++ b/basctl/source/dlged/propbrw.cxx @@ -102,12 +102,7 @@ const long STD_WIN_SIZE_Y = 350; const long STD_MIN_SIZE_X = 250; const long STD_MIN_SIZE_Y = 250; -const long STD_WIN_POS_X = 50; -const long STD_WIN_POS_Y = 50; const long WIN_BORDER = 2; -const long MIN_WIN_SIZE_X = 50; -const long MIN_WIN_SIZE_Y = 50; - DBG_NAME(PropBrw) diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 932b1fb..bb3e085 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -87,12 +87,6 @@ void SfxStylesInfo_Impl::setModel(const ::com::sun::star::uno::Reference ::com: m_xDoc = xModel; } -static ::rtl::OUString FAMILY_CHARACTERSTYLE (RTL_CONSTASCII_USTRINGPARAM(CharacterStyles) ); -static ::rtl::OUString
[Libreoffice-commits] .: 2 commits - basctl/source
basctl/source/basicide/basobj2.cxx |9 + basctl/source/basicide/bastype2.cxx | 14 +++--- basctl/source/basicide/bastype3.cxx | 10 -- 3 files changed, 16 insertions(+), 17 deletions(-) New commits: commit b1bee56af9a4cbbaabfe43290d28f53efdebc14d Author: Takeshi Abe t...@fixedpoint.jp Date: Wed Apr 18 00:23:42 2012 +0900 calling GetChar() only once suffices diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index ddbc3a4..cd9986c 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -108,10 +108,11 @@ sal_Bool IsValidSbxName( const String rName ) { for ( sal_uInt16 nChar = 0; nChar rName.Len(); nChar++ ) { -sal_Bool bValid = ( ( rName.GetChar(nChar) = 'A' rName.GetChar(nChar) = 'Z' ) || -( rName.GetChar(nChar) = 'a' rName.GetChar(nChar) = 'z' ) || -( rName.GetChar(nChar) = '0' rName.GetChar(nChar) = '9' nChar ) || -( rName.GetChar(nChar) == '_' ) ); +sal_Unicode c = rName.GetChar(nChar); +sal_Bool bValid = ( ( c = 'A' c = 'Z' ) || +( c = 'a' c = 'z' ) || +( c = '0' c = '9' nChar ) || +( c == '_' ) ); if ( !bValid ) return sal_False; } commit f00d60997edc56bf0f4653b1bd78c5379cedda6a Author: Takeshi Abe t...@fixedpoint.jp Date: Wed Apr 18 00:22:17 2012 +0900 replaced String by rtl::OUString diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index 986efa3..34a1aaf 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -332,7 +332,7 @@ void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const for ( sal_Int32 i = 0 ; i nModCount ; i++ ) { -String aModName = pModNames[ i ]; +::rtl::OUString aModName = pModNames[ i ]; SvLBoxEntry* pModuleEntry = FindEntry( pLibRootEntry, aModName, OBJ_TYPE_MODULE ); if ( !pModuleEntry ) pModuleEntry = AddEntry( @@ -408,10 +408,10 @@ void BasicTreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEnt { ::std::vector std::pair BasicEntryType, ::rtl::OUString aEntries; -aEntries.push_back( ::std::make_pair( OBJ_TYPE_DOCUMENT_OBJECTS, String( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) ) ); -aEntries.push_back( ::std::make_pair( OBJ_TYPE_USERFORMS, String( IDEResId( RID_STR_USERFORMS ) ) ) ); -aEntries.push_back( ::std::make_pair( OBJ_TYPE_NORMAL_MODULES, String( IDEResId( RID_STR_NORMAL_MODULES ) ) ) ); -aEntries.push_back( ::std::make_pair( OBJ_TYPE_CLASS_MODULES, String( IDEResId( RID_STR_CLASS_MODULES ) ) ) ); +aEntries.push_back( ::std::make_pair( OBJ_TYPE_DOCUMENT_OBJECTS, ResId::toString( IDEResId( RID_STR_DOCUMENT_OBJECTS ) ) ) ); +aEntries.push_back( ::std::make_pair( OBJ_TYPE_USERFORMS, ResId::toString( IDEResId( RID_STR_USERFORMS ) ) ) ); +aEntries.push_back( ::std::make_pair( OBJ_TYPE_NORMAL_MODULES, ResId::toString( IDEResId( RID_STR_NORMAL_MODULES ) ) ) ); +aEntries.push_back( ::std::make_pair( OBJ_TYPE_CLASS_MODULES, ResId::toString( IDEResId( RID_STR_CLASS_MODULES ) ) ) ); ::std::vector std::pair BasicEntryType, ::rtl::OUString ::iterator iter; for( iter = aEntries.begin(); iter != aEntries.end(); ++iter ) @@ -798,8 +798,8 @@ void BasicTreeListBox::SetCurrentEntry( BasicEntryDescriptor rDesc ) { aDesc = BasicEntryDescriptor( ScriptDocument::getApplicationScriptDocument(), -LIBRARY_LOCATION_USER, String::CreateFromAscii( Standard ), -String(), String::CreateFromAscii( . ), OBJ_TYPE_UNKNOWN ); +LIBRARY_LOCATION_USER, Standard, +::rtl::OUString(), ., OBJ_TYPE_UNKNOWN ); } ScriptDocument aDocument( aDesc.GetDocument() ); OSL_ENSURE( aDocument.isValid(), BasicTreeListBox::SetCurrentEntry: invalid document! ); diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx index 4128474..d906471 100644 --- a/basctl/source/basicide/bastype3.cxx +++ b/basctl/source/basicide/bastype3.cxx @@ -67,8 +67,7 @@ void BasicTreeListBox::RequestingChildren( SvLBoxEntry* pEntry ) } else if ( eType == OBJ_TYPE_LIBRARY ) { -String aLibName( aDesc.GetLibName() ); -::rtl::OUString aOULibName( aLibName ); +::rtl::OUString aOULibName( aDesc.GetLibName() ); // check password sal_Bool bOK = sal_True; @@ -79,7 +78,7 @@ void BasicTreeListBox::RequestingChildren( SvLBoxEntry* pEntry ) if ( xPasswd.is() xPasswd-isLibraryPasswordProtected( aOULibName ) !xPasswd-isLibraryPasswordVerified( aOULibName ) ) {
[Libreoffice-commits] .: 2 commits - basctl/source
basctl/source/basicide/baside2.cxx |2 -- basctl/source/basicide/baside2.hxx |2 -- basctl/source/basicide/baside2b.cxx |3 --- basctl/source/basicide/basidesh.cxx |4 basctl/source/basicide/ide_pch.hxx |4 basctl/source/basicide/iderdll.cxx |2 -- 6 files changed, 17 deletions(-) New commits: commit 0432c53149b82ffc66a9992707db0962ff05299c Author: Takeshi Abe t...@fixedpoint.jp Date: Tue Apr 17 05:14:21 2012 +0900 removed useless static data diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index ef67435..ebb67bf 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -68,9 +68,6 @@ long nHeaderBarHeight; static const char cSuffixes[] = %!#@$; -MapUnit eEditMapUnit = MAP_100TH_MM; - - /** * Helper functions to get/set text in TextEngine using * the stream interface. diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 5e5cec7..a2f9a18 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -70,8 +70,6 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star; using ::rtl::OUString; -static const rtl::OUString sStandardLibName( RTL_CONSTASCII_USTRINGPARAM(Standard)); - typedef ::cppu::WeakImplHelper1 container::XContainerListener ContainerListenerBASE; class ContainerListenerImpl : public ContainerListenerBASE commit f4137c8e457b3f07ccb9292f6315e022d1e713ed Author: Takeshi Abe t...@fixedpoint.jp Date: Tue Apr 17 05:13:29 2012 +0900 removed unused defines diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index ce6a140..3e18278 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -62,8 +62,6 @@ using namespace ::com::sun::star::uno; #define BMARGPRN1000 #define BORDERPRN 300 -#define APPWAIT_START 100 - #define VALIDWINDOW 0x1234 #if defined(OW) || defined(MTF) diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index 8adbe15..a274eec 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -318,8 +318,6 @@ public: }; -#define SYNTAX_COLOR_MAX5 - class ModulWindow: public IDEBaseWindow { friend class BasicIDEShell; diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 02e10c2..5e5cec7 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -36,8 +36,6 @@ #define SI_NOCONTROL #define SI_NOSBXCONTROLS -#define ITEMID_SIZE 0 - // if without PCH's: #include ide_pch.hxx diff --git a/basctl/source/basicide/ide_pch.hxx b/basctl/source/basicide/ide_pch.hxx index a7eb874..11e21f0 100644 --- a/basctl/source/basicide/ide_pch.hxx +++ b/basctl/source/basicide/ide_pch.hxx @@ -26,10 +26,6 @@ * / -#define ITEMID_SEARCH 0 -#define ITEMID_SIZE 0 - -//#include vcl/msgbox.hxx #include svl/aeitem.hxx #include svl/whiter.hxx #include svl/intitem.hxx diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx index c8da69e..9ec5001 100644 --- a/basctl/source/basicide/iderdll.cxx +++ b/basctl/source/basicide/iderdll.cxx @@ -52,8 +52,6 @@ #include basicmod.hxx #include propbrw.hxx - -#define ITEMID_SEARCH 0 #include svl/srchitem.hxx #include com/sun/star/script/XLibraryContainerPassword.hpp ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 2 commits - basctl/source
basctl/source/basicide/baside2.cxx| 20 +++- basctl/source/basicide/breakpoint.cxx |2 ++ 2 files changed, 13 insertions(+), 9 deletions(-) New commits: commit ebf168f59f64b868002c10a49448e02939074755 Author: August Sodora aug...@gmail.com Date: Mon Dec 5 00:52:02 2011 -0500 So size_t is recognized on windows diff --git a/basctl/source/basicide/breakpoint.cxx b/basctl/source/basicide/breakpoint.cxx index b763174..6bbfdf9 100644 --- a/basctl/source/basicide/breakpoint.cxx +++ b/basctl/source/basicide/breakpoint.cxx @@ -31,6 +31,8 @@ #include basic/sbmod.hxx #include tools/debug.hxx +#include stddef.h + BreakPointList::BreakPointList() {} commit 5ca762a9caf9b89f225d2c8ddd32d265d4bddb61 Author: August Sodora aug...@gmail.com Date: Mon Dec 5 00:47:35 2011 -0500 String-OUString diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 0f425cf..ddb3781 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -82,7 +82,7 @@ DBG_NAME( ModulWindow ) TYPEINIT1( ModulWindow , IDEBaseWindow ); -void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 nCurPage, const String rTitle, bool bOutput ) +void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 nCurPage, const ::rtl::OUString rTitle, bool bOutput ) { short nLeftMargin = LMARGPRN; Size aSz = pPrinter-GetOutputSize(); @@ -122,17 +122,20 @@ void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 nCurPage, { aFont.SetWeight( WEIGHT_NORMAL ); pPrinter-SetFont( aFont ); -String aPageStr( RTL_CONSTASCII_USTRINGPARAM( [ ) ); -aPageStr += String( IDEResId( RID_STR_PAGE ) ); -aPageStr += ' '; -aPageStr += String::CreateFromInt32( nCurPage ); -aPageStr += ']'; aPos.X() += pPrinter-GetTextWidth( rTitle ); + if( bOutput ) -pPrinter-DrawText( aPos, aPageStr ); +{ +::rtl::OUStringBuffer aPageStr; +aPageStr.appendAscii( RTL_CONSTASCII_STRINGPARAM( [ ) ); +aPageStr.append(ResId::toString( IDEResId( RID_STR_PAGE ) )); +aPageStr.append(' '); +aPageStr.append( nCurPage ); +aPageStr.append(']'); +pPrinter-DrawText( aPos, aPageStr.makeStringAndClear() ); +} } - nY = TMARGPRN-nBorder; if( bOutput ) @@ -165,7 +168,6 @@ void lcl_ConvertTabsToSpaces( String rLine ) } } - ModulWindow::ModulWindow( ModulWindowLayout* pParent, const ScriptDocument rDocument, String aLibName, String aName, ::rtl::OUString aModule ) :IDEBaseWindow( pParent, rDocument, aLibName, aName ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 2 commits - basctl/source
basctl/source/dlged/managelang.cxx | 14 ++ basctl/source/inc/managelang.hxx | 12 ++-- 2 files changed, 12 insertions(+), 14 deletions(-) New commits: commit 98fd966d0c2c46b51b84da26cdb4bc5ac81e0372 Author: August Sodora aug...@gmail.com Date: Wed Nov 30 22:03:58 2011 -0500 Remove unnecessary includes diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx index feeabbd..d41ed42 100644 --- a/basctl/source/dlged/managelang.cxx +++ b/basctl/source/dlged/managelang.cxx @@ -26,24 +26,23 @@ * / - #include basidesh.hxx #include basobj.hxx -#include dlgresid.hrc #include iderdll.hxx #include iderid.hxx #include localizationmgr.hxx #include managelang.hxx -#include managelang.hrc +#include dlgresid.hrc #include helpid.hrc +#include managelang.hrc -#include com/sun/star/i18n/XBreakIterator.hpp #include com/sun/star/i18n/WordType.hpp #include comphelper/string.hxx #include editeng/unolingu.hxx #include sfx2/bindings.hxx #include svtools/langtab.hxx +#include svx/langbox.hxx #include vcl/unohelp.hxx #include vcl/svapp.hxx #include vcl/msgbox.hxx diff --git a/basctl/source/inc/managelang.hxx b/basctl/source/inc/managelang.hxx index 6d81efd..f9f9dba 100644 --- a/basctl/source/inc/managelang.hxx +++ b/basctl/source/inc/managelang.hxx @@ -29,13 +29,13 @@ #ifndef _BASCTL_MANAGELANG_HXX #define _BASCTL_MANAGELANG_HXX -#include svx/langbox.hxx #include svx/checklbx.hxx #include vcl/button.hxx #include vcl/dialog.hxx #include vcl/fixed.hxx class LocalizationMgr; +class SvxLanguageBox; struct LanguageEntry { commit b291c3a1f2d0595096d671c8f6d2812caa993f83 Author: August Sodora aug...@gmail.com Date: Wed Nov 30 21:56:20 2011 -0500 String-OUString diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx index a83c62c..feeabbd 100644 --- a/basctl/source/dlged/managelang.cxx +++ b/basctl/source/dlged/managelang.cxx @@ -100,10 +100,9 @@ ManageLanguageDialog::ManageLanguageDialog( Window* pParent, LocalizationMgr* _p m_aHelpBtn ( this, IDEResId( PB_HELP ) ), m_aCloseBtn ( this, IDEResId( PB_CLOSE ) ), m_pLocalizationMgr ( _pLMgr ), -m_sDefLangStr ( IDEResId( STR_DEF_LANG ) ), -m_sDeleteStr( IDEResId( STR_DELETE ) ), -m_sCreateLangStr( IDEResId( STR_CREATE_LANG ) ) - +m_sDefLangStr (ResId::toString(IDEResId(STR_DEF_LANG))), +m_sDeleteStr(ResId::toString(IDEResId(STR_DELETE))), +m_sCreateLangStr(ResId::toString(IDEResId(STR_CREATE_LANG))) { FreeResource(); diff --git a/basctl/source/inc/managelang.hxx b/basctl/source/inc/managelang.hxx index d31188f..6d81efd 100644 --- a/basctl/source/inc/managelang.hxx +++ b/basctl/source/inc/managelang.hxx @@ -39,11 +39,11 @@ class LocalizationMgr; struct LanguageEntry { -String m_sLanguage; +::rtl::OUString m_sLanguage; ::com::sun::star::lang::Locale m_aLocale; boolm_bIsDefault; -LanguageEntry( const String _rLanguage, +LanguageEntry( const ::rtl::OUString _rLanguage, const ::com::sun::star::lang::Locale _rLocale, bool _bIsDefault ) : m_sLanguage( _rLanguage ), @@ -70,9 +70,9 @@ private: LocalizationMgr*m_pLocalizationMgr; -String m_sDefLangStr; -String m_sDeleteStr; -String m_sCreateLangStr; +::rtl::OUString m_sDefLangStr; +::rtl::OUString m_sDeleteStr; +::rtl::OUString m_sCreateLangStr; voidInit(); voidCalcInfoSize(); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 2 commits - basctl/source
basctl/source/dlged/dlgedobj.cxx |4 ++-- basctl/source/dlged/managelang.cxx | 30 +++--- basctl/source/dlged/propbrw.cxx|2 +- 3 files changed, 18 insertions(+), 18 deletions(-) New commits: commit cbde0ff28bcf9cf0271324fae879df39c2710f48 Author: August Sodora aug...@gmail.com Date: Mon Nov 21 23:58:02 2011 -0500 String-OUString diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx index f95bbb5..a286d7a 100644 --- a/basctl/source/dlged/managelang.cxx +++ b/basctl/source/dlged/managelang.cxx @@ -42,6 +42,7 @@ #include com/sun/star/i18n/XBreakIterator.hpp #include com/sun/star/i18n/WordType.hpp +#include comphelper/string.hxx #include editeng/unolingu.hxx #include sfx2/bindings.hxx #include svtools/langtab.hxx @@ -63,7 +64,7 @@ bool localesAreEqual( const Locale rLocaleLeft, const Locale rLocaleRight ) } namespace { -long getLongestWordWidth( const String rText, const Window rWin ) +long getLongestWordWidth( const ::rtl::OUString rText, const Window rWin ) { long nWidth = 0; Reference XBreakIterator xBreakIter( vcl::unohelper::CreateBreakIterator() ); @@ -75,9 +76,7 @@ namespace { while ( aBoundary.startPos != aBoundary.endPos ) { nStartPos = aBoundary.endPos; -String sWord( rText.Copy( -(sal_uInt16)aBoundary.startPos, -(sal_uInt16)aBoundary.endPos - (sal_uInt16)aBoundary.startPos ) ); +::rtl::OUString sWord(rText.copy(aBoundary.startPos, aBoundary.endPos - aBoundary.startPos)); long nTemp = rWin.GetCtrlTextWidth( sWord ); if ( nTemp nWidth ) nWidth = nTemp; @@ -124,10 +123,10 @@ void ManageLanguageDialog::Init() { // get current IDE BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell(); -String sLibName = pIDEShell-GetCurLibName(); +::rtl::OUString sLibName = pIDEShell-GetCurLibName(); // set dialog title with library name -String sText = GetText(); -sText.SearchAndReplace( String::CreateFromAscii($1), sLibName ); +::rtl::OUString sText = GetText(); +::comphelper::string::replace(sText, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM($1)), sLibName); SetText( sText ); // set handler m_aAddPB.SetClickHdl( LINK( this, ManageLanguageDialog, AddHdl ) ); @@ -141,7 +140,7 @@ void ManageLanguageDialog::Init() void ManageLanguageDialog::CalcInfoSize() { -String sInfoStr = m_aInfoFT.GetText(); +::rtl::OUString sInfoStr = m_aInfoFT.GetText(); long nInfoWidth = m_aInfoFT.GetSizePixel().Width(); long nLongWord = getLongestWordWidth( sInfoStr, m_aInfoFT ); long nTxtWidth = m_aInfoFT.GetCtrlTextWidth( sInfoStr ) + nLongWord; @@ -183,12 +182,13 @@ void ManageLanguageDialog::FillLanguageBox() { bool bIsDefault = localesAreEqual( aDefaultLocale, pLocale[i] ); LanguageType eLangType = SvxLocaleToLanguage( pLocale[i] ); -String sLanguage = aLangTable.GetString( eLangType ); +::rtl::OUStringBuffer sLanguageBuf(aLangTable.GetString( eLangType )); if ( bIsDefault ) { -sLanguage += ' '; -sLanguage += m_sDefLangStr; +sLanguageBuf.append(' '); +sLanguageBuf.append(m_sDefLangStr); } +::rtl::OUString sLanguage(sLanguageBuf.makeStringAndClear()); sal_uInt16 nPos = m_aLanguageLB.InsertEntry( sLanguage ); m_aLanguageLB.SetEntryData( nPos, new LanguageEntry( sLanguage, pLocale[i], bIsDefault ) ); } @@ -315,9 +315,9 @@ SetDefaultLanguageDialog::SetDefaultLanguageDialog( Window* pParent, Localizatio // change to Add Interface Language mode SetHelpId( HID_BASICIDE_ADDNEW_LANGUAGE ); m_pCheckLangLB = new SvxCheckListBox( this, IDEResId( LB_ADD_LANGUAGE ) ); -SetText( String( IDEResId( STR_ADDLANG_TITLE ) ) ); -m_aLanguageFT.SetText( String( IDEResId( STR_ADDLANG_LABEL ) ) ); -m_aInfoFT.SetText( String( IDEResId( STR_ADDLANG_INFO ) ) ); +SetText( ResId::toString( IDEResId( STR_ADDLANG_TITLE ) ) ); +m_aLanguageFT.SetText( ResId::toString( IDEResId( STR_ADDLANG_LABEL ) ) ); +m_aInfoFT.SetText( ResId::toString( IDEResId( STR_ADDLANG_INFO ) ) ); } FreeResource(); @@ -362,7 +362,7 @@ void SetDefaultLanguageDialog::FillLanguageBox() void SetDefaultLanguageDialog::CalcInfoSize() { -String sInfoStr = m_aInfoFT.GetText(); +::rtl::OUString sInfoStr = m_aInfoFT.GetText(); long nInfoWidth = m_aInfoFT.GetSizePixel().Width(); long nLongWord = getLongestWordWidth( sInfoStr, m_aInfoFT ); long nTxtWidth = m_aInfoFT.GetCtrlTextWidth( sInfoStr ) + nLongWord; commit 89e27727c9b7cfd4e74a007a3390052cd1c13afb Author: August Sodora aug...@gmail.com Date: Mon Nov 21 23:54:04 2011 -0500 String-OUString
[Libreoffice-commits] .: 2 commits - basctl/source
basctl/source/accessibility/accessibledialogwindow.cxx |2 basctl/source/basicide/baside2.cxx |4 basctl/source/basicide/basides2.cxx|4 basctl/source/basicide/bastype2.cxx| 90 - basctl/source/basicide/bastype2.hxx| 48 - basctl/source/basicide/bastype3.cxx|7 - basctl/source/basicide/macrodlg.cxx|4 basctl/source/basicide/moduldlg.cxx|2 basctl/source/dlged/dlged.cxx |6 - basctl/source/inc/bastypes.hxx |4 basctl/source/inc/dlged.hxx|4 11 files changed, 87 insertions(+), 88 deletions(-) New commits: commit 8061b40349c1251362c984b76aaa90b9510fba4f Author: August Sodora aug...@gmail.com Date: Tue Nov 22 00:20:15 2011 -0500 String-OUString diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx index 8b4228f..3584e6e 100644 --- a/basctl/source/accessibility/accessibledialogwindow.cxx +++ b/basctl/source/accessibility/accessibledialogwindow.cxx @@ -243,7 +243,7 @@ sal_Bool AccessibleDialogWindow::IsChildVisible( const ChildDescriptor rDesc ) const SdrLayer* pSdrLayer = rLayerAdmin.GetLayerPerID( nLayerId ); if ( pSdrLayer ) { -String aLayerName = pSdrLayer-GetName(); +::rtl::OUString aLayerName = pSdrLayer-GetName(); SdrView* pSdrView = m_pDialogWindow-GetView(); if ( pSdrView pSdrView-IsLayerVisible( aLayerName ) ) { diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 101a8a8..8b57961 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -1350,9 +1350,9 @@ BasicEntryDescriptor ModulWindow::CreateEntryDescriptor() uno::Reference container::XNameContainer xLib = aDocument.getOrCreateLibrary( E_SCRIPTS, aLibName ); if( xLib.is() ) { -String sObjName; +::rtl::OUString sObjName; ModuleInfoHelper::getObjectName( xLib, aModName, sObjName ); -if( sObjName.Len() ) +if( !sObjName.isEmpty() ) { aModName.AppendAscii( ().Append(sObjName).AppendAscii()); } diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx index 7754d9a..81e325c 100644 --- a/basctl/source/basicide/basides2.cxx +++ b/basctl/source/basicide/basides2.cxx @@ -248,9 +248,9 @@ ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument rDocument, const { // display a nice friendly name in the ObjectModule tab, // combining the objectname and module name, e.g. Sheet1 ( Financials ) -String sObjName; +::rtl::OUString sObjName; ModuleInfoHelper::getObjectName( xLib, rModName, sObjName ); -if( sObjName.Len() ) +if( !sObjName.isEmpty() ) { aModName.AppendAscii( ().Append(sObjName).AppendAscii()); } diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index 9820cc1..531dbbf 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -61,7 +61,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star; -void ModuleInfoHelper::getObjectName( const uno::Reference container::XNameContainer rLib, const String rModName, String rObjName ) +void ModuleInfoHelper::getObjectName( const uno::Reference container::XNameContainer rLib, const ::rtl::OUString rModName, ::rtl::OUString rObjName ) { try { @@ -84,7 +84,7 @@ void ModuleInfoHelper::getObjectName( const uno::Reference container::XNameCont } } -sal_Int32 ModuleInfoHelper::getModuleType( const uno::Reference container::XNameContainer rLib, const String rModName ) +sal_Int32 ModuleInfoHelper::getModuleType( const uno::Reference container::XNameContainer rLib, const ::rtl::OUString rModName ) { sal_Int32 nType = script::ModuleType::NORMAL; uno::Reference script::vba::XVBAModuleInfo xVBAModuleInfo( rLib, uno::UNO_QUERY ); @@ -112,7 +112,7 @@ BasicDocumentEntry::~BasicDocumentEntry() { } -BasicLibEntry::BasicLibEntry( const ScriptDocument rDocument, LibraryLocation eLocation, const String rLibName, BasicEntryType eType ) +BasicLibEntry::BasicLibEntry( const ScriptDocument rDocument, LibraryLocation eLocation, const ::rtl::OUString rLibName, BasicEntryType eType ) :BasicDocumentEntry( rDocument, eLocation, eType ) ,m_aLibName( rLibName ) { @@ -129,7 +129,7 @@ BasicEntryDescriptor::BasicEntryDescriptor() { }
[Libreoffice-commits] .: 2 commits - basctl/source
basctl/source/basicide/basides1.cxx |1 basctl/source/basicide/basidesh.cxx |9 ++ basctl/source/basicide/linenumberwindow.cxx | 106 +++- basctl/source/basicide/linenumberwindow.hxx | 25 +++--- 4 files changed, 82 insertions(+), 59 deletions(-) New commits: commit 6e6546a5f7fb30ab35dc52e148a20b9d6d3d70b8 Author: Norbert Thiebaud nthieb...@gmail.com Date: Thu Nov 17 21:49:06 2011 -0600 calculate the width based on the font + general clean-up diff --git a/basctl/source/basicide/linenumberwindow.cxx b/basctl/source/basicide/linenumberwindow.cxx index fb7bed6..f8f566d 100644 --- a/basctl/source/basicide/linenumberwindow.cxx +++ b/basctl/source/basicide/linenumberwindow.cxx @@ -5,90 +5,102 @@ #include svtools/textview.hxx LineNumberWindow::LineNumberWindow( Window* pParent, ModulWindow* pModulWin ) : - Window( pParent, WB_BORDER ), - pModulWindow(pModulWin), - nWidth(1), - nCurYOffset(0) +Window( pParent, WB_BORDER ), +m_pModulWindow(pModulWin), +m_nCurYOffset(0) { - SetBackground(Wallpaper(GetSettings().GetStyleSettings().GetFieldColor())); +SetBackground(Wallpaper(GetSettings().GetStyleSettings().GetFieldColor())); +m_nBaseWidth = GetTextWidth(String('8')); +m_nWidth = m_nBaseWidth * 3 + m_nBaseWidth / 2;; } LineNumberWindow::~LineNumberWindow() { } void LineNumberWindow::Paint( const Rectangle ) { - if(SyncYOffset()) -return; +if(SyncYOffset()) +return; - ExtTextEngine* txtEngine = pModulWindow-GetEditEngine(); - if(!txtEngine) -return; +ExtTextEngine* txtEngine = m_pModulWindow-GetEditEngine(); +if(!txtEngine) +return; - TextView* txtView = pModulWindow-GetEditView(); - if(!txtView) -return; +TextView* txtView = m_pModulWindow-GetEditView(); +if(!txtView) +return; - GetParent()-Resize(); +GetParent()-Resize(); - int windowHeight = GetOutputSize().Height(); - int nLineHeight = GetTextHeight(); +int windowHeight = GetOutputSize().Height(); +int nLineHeight = GetTextHeight(); - int startY = txtView-GetStartDocPos().Y(); - int nStartLine = startY / nLineHeight + 1; - int nEndLine = (startY + windowHeight) / nLineHeight + 1; +int startY = txtView-GetStartDocPos().Y(); +int nStartLine = startY / nLineHeight + 1; +int nEndLine = (startY + windowHeight) / nLineHeight + 1; - if(txtEngine-GetParagraphCount() + 1 nEndLine) -nEndLine = txtEngine-GetParagraphCount() + 1; +if(txtEngine-GetParagraphCount() + 1 (unsigned int)nEndLine) +nEndLine = txtEngine-GetParagraphCount() + 1; - nWidth = String::CreateFromInt64(nEndLine).Len() * 10; +// FIXME: it would be best if we could get notified of a font change +// rather than doing that re-calculation at each Paint event +m_nBaseWidth = GetTextWidth(String('8')); - sal_Int64 y = (nStartLine - 1) * nLineHeight; - for(int i = nStartLine; i = nEndLine; ++i, y += nLineHeight) -DrawText(Point(0, y - nCurYOffset), String::CreateFromInt64(i)); +// reserve enough for 3 sigit minimum, with a bit to spare for confort +m_nWidth = m_nBaseWidth * 3 + m_nBaseWidth / 2; +int i = (nEndLine + 1) / 1000; +while(i) +{ +i /= 10; +m_nWidth += m_nBaseWidth; +} + +sal_Int64 y = (nStartLine - 1) * nLineHeight; +for(int i = nStartLine; i = nEndLine; ++i, y += nLineHeight) +DrawText(Point(0, y - m_nCurYOffset), String::CreateFromInt32(i)); } void LineNumberWindow::DataChanged(DataChangedEvent const rDCEvt) { - Window::DataChanged(rDCEvt); - if (rDCEvt.GetType() == DATACHANGED_SETTINGS - (rDCEvt.GetFlags() SETTINGS_STYLE) != 0) - { -Color aColor(GetSettings().GetStyleSettings().GetFieldColor()); -if (aColor != rDCEvt.GetOldSettings()-GetStyleSettings().GetFieldColor()) +Window::DataChanged(rDCEvt); +if (rDCEvt.GetType() == DATACHANGED_SETTINGS + (rDCEvt.GetFlags() SETTINGS_STYLE) != 0) { - SetBackground(Wallpaper(aColor)); - Invalidate(); +Color aColor(GetSettings().GetStyleSettings().GetFieldColor()); +if (aColor != rDCEvt.GetOldSettings()-GetStyleSettings().GetFieldColor()) +{ +SetBackground(Wallpaper(aColor)); +Invalidate(); +} } - } } void LineNumberWindow::DoScroll(long nHorzScroll, long nVertScroll) { - nCurYOffset -= nVertScroll; - Window::Scroll(nHorzScroll, nVertScroll); +m_nCurYOffset -= nVertScroll; +Window::Scroll(nHorzScroll, nVertScroll); } long LineNumberWindow::GetCurYOffset() { - return nCurYOffset; +return m_nCurYOffset; } bool LineNumberWindow::SyncYOffset() { - TextView* pView = pModulWindow-GetEditView(); - if (!pView) -return false; +TextView* pView = m_pModulWindow-GetEditView(); +if (!pView) +return false; - long nViewYOffset = pView-GetStartDocPos().Y(); - if (nCurYOffset == nViewYOffset) -return