summaryrefslogtreecommitdiff
path: root/cui/source/dialogs
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2011-08-21 18:12:16 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2011-08-21 18:12:16 -0500
commit0d4720d1e1ffcefc43ae2af59c7487ab0bfab2ce (patch)
tree7cacea747b7ff3de52f69a8605ef486463201a9c /cui/source/dialogs
parent57b992c0b57daba5f44b5c4cdb08e817f355ea01 (diff)
undo anything not wizard related in the previous merge-commit
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r--cui/source/dialogs/about.cxx223
-rw-r--r--cui/source/dialogs/about.hrc7
-rw-r--r--cui/source/dialogs/about.src8
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx92
-rw-r--r--cui/source/dialogs/cuihyperdlg.cxx1
-rw-r--r--cui/source/dialogs/hldocntp.cxx2
-rw-r--r--cui/source/dialogs/hlinettp.cxx50
-rw-r--r--cui/source/dialogs/hltpbase.cxx4
-rw-r--r--cui/source/dialogs/hyperdlg.hrc1
-rw-r--r--cui/source/dialogs/hyperdlg.src27
-rw-r--r--cui/source/dialogs/iconcdlg.cxx14
-rw-r--r--cui/source/dialogs/srchxtra.cxx8
12 files changed, 148 insertions, 289 deletions
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index e4a4b293e2a6..0d77033cc2d7 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -73,69 +73,37 @@ Image SfxApplication::GetApplicationLogo()
return Image( aBitmap );
}
-/* intense magic to get strong version information */
+/* get good version information */
static String
GetBuildId()
{
- const String sCWSSchema( String::CreateFromAscii( "[CWS:" ) );
rtl::OUString sDefault;
- String sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) );
- OSL_ENSURE( sBuildId.Len() > 0, "No BUILDID in bootstrap file" );
- if ( sBuildId.Len() > 0 && sBuildId.Search( sCWSSchema ) == STRING_NOTFOUND )
+ rtl::OUString sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) );
+ if (!sBuildId.isEmpty() && sBuildId.getLength() > 50)
{
- // no cws part in brand buildid -> try basis buildid
- rtl::OUString sBasisBuildId( DEFINE_CONST_OUSTRING("${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":buildid}" ) );
- rtl::Bootstrap::expandMacros( sBasisBuildId );
- sal_Int32 nIndex = sBasisBuildId.indexOf( sCWSSchema );
- if ( nIndex != -1 )
- sBuildId += String( sBasisBuildId.copy( nIndex ) );
- }
-
- String sProductSource( utl::Bootstrap::getProductSource( sDefault ) );
- OSL_ENSURE( sProductSource.Len() > 0, "No ProductSource in bootstrap file" );
-
- // the product source is something like "DEV300", where the
- // build id is something like "300m12(Build:12345)". For better readability,
- // strip the duplicate UPD ("300").
- if ( sProductSource.Len() )
- {
- bool bMatchingUPD =
- ( sProductSource.Len() >= 3 )
- && ( sBuildId.Len() >= 3 )
- && ( sProductSource.Copy( sProductSource.Len() - 3 ) == sBuildId.Copy( 0, 3 ) );
- OSL_ENSURE( bMatchingUPD, "BUILDID and ProductSource do not match in their UPD" );
- if ( bMatchingUPD )
- sProductSource = sProductSource.Copy( 0, sProductSource.Len() - 3 );
-
- // prepend the product source
- sBuildId.Insert( sProductSource, 0 );
- }
-
- // Version information (in about box) (#i94693#)
- /* if the build ids of the basis or ure layer are different from the build id
- * of the brand layer then show them */
- rtl::OUString aBasisProductBuildId( DEFINE_CONST_OUSTRING("${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":ProductBuildid}" ) );
- rtl::Bootstrap::expandMacros( aBasisProductBuildId );
- rtl::OUString aUREProductBuildId( DEFINE_CONST_OUSTRING("${$URE_BIN_DIR/" SAL_CONFIGFILE("version") ":ProductBuildid}" ) );
- rtl::Bootstrap::expandMacros( aUREProductBuildId );
- if ( sBuildId.Search( String( aBasisProductBuildId ) ) == STRING_NOTFOUND
- || sBuildId.Search( String( aUREProductBuildId ) ) == STRING_NOTFOUND )
- {
- String sTemp( '-' );
- sTemp += String( aBasisProductBuildId );
- sTemp += '-';
- sTemp += String( aUREProductBuildId );
- sBuildId.Insert( sTemp, sBuildId.Search( ')' ) );
+ rtl::OUStringBuffer aBuffer;
+ aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("\n\t"));
+ sal_Int32 nIndex = 0;
+ do
+ {
+ rtl::OUString aToken = sBuildId.getToken( 0, '-', nIndex );
+ if (!aToken.isEmpty())
+ {
+ aBuffer.append(aToken);
+ if (nIndex >= 0)
+ {
+ if (nIndex % 5)
+ aBuffer.append(static_cast<sal_Unicode>('-'));
+ else
+ aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("\n\t"));
+ }
+ }
+ }
+ while ( nIndex >= 0 );
+ sBuildId = aBuffer.makeStringAndClear();
}
- // the build id format is "milestone(build)[cwsname]". For readability, it would
- // be nice to have some more spaces in there.
- xub_StrLen nPos = 0;
- if ( ( nPos = sBuildId.Search( sal_Unicode( '(' ) ) ) != STRING_NOTFOUND )
- sBuildId.Insert( sal_Unicode( ' ' ), nPos );
- if ( ( nPos = sBuildId.Search( sal_Unicode( '[' ) ) ) != STRING_NOTFOUND )
- sBuildId.Insert( sal_Unicode( ' ' ), nPos );
-
+ OSL_ENSURE( sBuildId.getLength() > 0, "No BUILDID in bootstrap file" );
return sBuildId;
}
@@ -169,6 +137,8 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
String sVersion = aVersionTextStr;
sVersion.SearchAndReplaceAscii( "$(VER)", Application::GetDisplayName() );
sVersion += '\n';
+ sVersion += m_sBuildStr;
+ sVersion += ' ';
sVersion += GetBuildId();
#ifdef BUILD_VER_STRING
String aBuildString( DEFINE_CONST_UNICODE( BUILD_VER_STRING ) );
@@ -177,28 +147,6 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
#endif
aVersionText.SetText( sVersion );
- // Initialization call for developers
- if ( aAccelStr.Len() && ByteString(U2S(aAccelStr)).IsAlphaAscii() )
- {
- Accelerator *pAccel = 0, *pPrevAccel = 0, *pFirstAccel = 0;
- aAccelStr.ToUpperAscii();
-
- for ( sal_uInt16 i = 0; i < aAccelStr.Len(); ++i )
- {
- pPrevAccel = pAccel;
- pAccel = new Accelerator;
- aAccelList.push_back( pAccel );
- sal_uInt16 nKey = aAccelStr.GetChar(i) - 'A' + KEY_A;
- pAccel->InsertItem( 1, KeyCode( nKey, KEY_MOD1 ) );
- if ( i > 0 )
- pPrevAccel->SetAccel( 1, pAccel );
- if ( i == 0 )
- pFirstAccel = pAccel;
- }
- pAccel->SetSelectHdl( LINK( this, AboutDialog, AccelSelectHdl ) );
- GetpApp()->InsertAccel( pFirstAccel );
- }
-
// set for background and text the correct system color
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
Color aWhiteCol( rSettings.GetWindowColor() );
@@ -235,17 +183,10 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
// determine size and position of the dialog & elements
Size aAppLogoSiz = aAppLogo.GetSizePixel();
- if (aAppLogoSiz.Width() < 300)
- aAppLogoSiz.Width() = 300;
-
- Size aOutSiz = GetOutputSizePixel();
- aOutSiz.Width() = aAppLogoSiz.Width();
-
// analyze size of the aVersionText widget
// character size
Size a6Size = aVersionText.LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
// preferred Version widget size
- Size aVTSize = aVersionText.CalcMinimumSize();
long nY = aAppLogoSiz.Height() + ( a6Size.Height() * 2 );
long nDlgMargin = a6Size.Width() * 2;
long nCtrlMargin = a6Size.Height() * 2;
@@ -269,47 +210,50 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
long nTextWidth = (aOutSiz.Width() - nDlgMargin);
// finally set the aVersionText widget position and size
- Size aVTCopySize = aVTSize;
- Point aVTCopyPnt;
- aVTCopySize.Width() = nTextWidth;
- aVTCopyPnt.X() = ( aOutSiz.Width() - aVTCopySize.Width() ) / 2;
- aVTCopyPnt.Y() = nY;
- aVersionText.SetPosSizePixel( aVTCopyPnt, aVTCopySize );
-
- nY += nCtrlMargin;
+ Size aVTSize = aVersionText.GetSizePixel();
+ aVTSize.Width() = nTextWidth;
+ aVersionText.SetSizePixel(aVTSize);
+ aVTSize = aVersionText.CalcMinimumSize();
+ Point aVTPnt;
+ aVTPnt.X() = ( aOutSiz.Width() - aVTSize.Width() ) / 2;
+ aVTPnt.Y() = nY;
+ aVersionText.SetPosSizePixel( aVTPnt, aVTSize );
- // OK-Button-Position (at the bottom and centered)
- Size aOKSiz = aOKButton.GetSizePixel();
- Point aOKPnt = aOKButton.GetPosPixel();
-
- // FixedHyperlink with more info link
- Point aLinkPnt = aInfoLink.GetPosPixel();
- Size aLinkSize = aInfoLink.GetSizePixel();
+ nY += aVTSize.Height() + nCtrlMargin;
// Multiline edit with Copyright-Text
- Point aCopyPnt = aCopyrightText.GetPosPixel();
- Size aCopySize = aCopyrightText.GetSizePixel();
- aCopySize.Width() = nTextWidth;
- aCopySize.Height() = aOutSiz.Height() - nY - ( aOKSiz.Height() * 2 ) - 3*aLinkSize.Height() - nCtrlMargin;
-
- aCopyPnt.X() = ( aOutSiz.Width() - aCopySize.Width() ) / 2;
- aCopyPnt.Y() = nY;
- aCopyrightText.SetPosSizePixel( aCopyPnt, aCopySize );
+ // preferred Version widget size
+ aCopyrightText.SetSizePixel(Size(nTextWidth,600));
+ Size aCTSize = aCopyrightText.CalcMinimumSize();
+ aCTSize.Width()= nTextWidth;
+ Point aCTPnt;
+ aCTPnt.X() = ( aOutSiz.Width() - aCTSize.Width() ) / 2;
+ aCTPnt.Y() = nY;
+ aCopyrightText.SetPosSizePixel( aCTPnt, aCTSize );
- nY += aCopySize.Height() + aLinkSize.Height();
+ nY += aCTSize.Height() + nCtrlMargin;
- aLinkSize.Width() = aInfoLink.CalcMinimumSize().Width();
- aLinkPnt.X() = ( aOutSiz.Width() - aLinkSize.Width() ) / 2;
- aLinkPnt.Y() = nY;
- aInfoLink.SetPosSizePixel( aLinkPnt, aLinkSize );
+ // FixedHyperlink with more info link
+ Size aLTSize = aInfoLink.CalcMinimumSize();
+ Point aLTPnt;
+ aLTPnt.X() = ( aOutSiz.Width() - aLTSize.Width() ) / 2;
+ aLTPnt.Y() = nY;
+ aInfoLink.SetPosSizePixel( aLTPnt, aLTSize );
- nY += aLinkSize.Height() + nCtrlMargin;
+ nY += aLTSize.Height() + nCtrlMargin;
+ // OK-Button-Position (at the bottom and centered)
+ Size aOKSiz = aOKButton.GetSizePixel();
+ Point aOKPnt;
aOKPnt.X() = ( aOutSiz.Width() - aOKSiz.Width() ) / 2;
aOKPnt.Y() = nY;
aOKButton.SetPosPixel( aOKPnt );
- // Change the width of the dialog
+ nY += aOKSiz.Height() + nCtrlMargin;
+
+ aOutSiz.Height() = nY;
+
+ // Change the size of the dialog
SetOutputSizePixel( aOutSiz );
FreeResource();
@@ -320,50 +264,6 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
// -----------------------------------------------------------------------
-AboutDialog::~AboutDialog()
-{
- // Clearing the developers call
- if ( !aAccelList.empty() )
- {
- GetpApp()->RemoveAccel( aAccelList.front() );
-
- for ( size_t i = 0, n = aAccelList.size(); i < n; ++i )
- delete aAccelList[ i ];
- aAccelList.clear();
- }
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( AboutDialog, TimerHdl, Timer *, pTimer )
-{
- (void)pTimer; //unused
- ++m_nPendingScrolls;
- Invalidate( INVALIDATE_NOERASE | INVALIDATE_NOCHILDREN );
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( AboutDialog, AccelSelectHdl, Accelerator *, pAccelerator )
-{
- (void)pAccelerator; //unused
- // init Timer
- aTimer.SetTimeoutHdl( LINK( this, AboutDialog, TimerHdl ) );
-
- // init scroll mode
- nOff = GetOutputSizePixel().Height();
- MapMode aMapMode( MAP_PIXEL );
- SetMapMode( aMapMode );
-
- // start scroll Timer
- aTimer.SetTimeout( SCROLL_TIMER );
- aTimer.Start();
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
IMPL_LINK( AboutDialog, HandleHyperlink, svt::FixedHyperlink*, pHyperlink )
{
rtl::OUString sURL=pHyperlink->GetURL();
@@ -394,15 +294,12 @@ IMPL_LINK( AboutDialog, HandleHyperlink, svt::FixedHyperlink*, pHyperlink )
void AboutDialog::Paint( const Rectangle& rRect )
{
SetClipRegion( rRect );
-
- Point aPos( m_nDeltaWidth / 2, 0 );
+ Point aPos( 0, 0 );
DrawImage( aPos, aAppLogo );
}
sal_Bool AboutDialog::Close()
{
- // stop Timer and finish the dialog
- aTimer.Stop();
EndDialog( RET_OK );
return sal_False;
}
diff --git a/cui/source/dialogs/about.hrc b/cui/source/dialogs/about.hrc
index 2f7e97484c6b..fe314232a28a 100644
--- a/cui/source/dialogs/about.hrc
+++ b/cui/source/dialogs/about.hrc
@@ -29,10 +29,9 @@
#define ABOUT_BTN_OK 1
#define ABOUT_FTXT_VERSION 2
-#define ABOUT_STR_ACCEL 3
-#define ABOUT_FTXT_COPYRIGHT 4
-
-#define ABOUT_FTXT_LINK 5
+#define ABOUT_FTXT_COPYRIGHT 3
+#define ABOUT_FTXT_LINK 4
+#define ABOUT_STR_BUILD 5
#define ABOUT_STR_VERSION 6
#define ABOUT_STR_VENDOR 7
#define ABOUT_STR_COPYRIGHT 8
diff --git a/cui/source/dialogs/about.src b/cui/source/dialogs/about.src
index 607460c37604..5ad35acc4e90 100644
--- a/cui/source/dialogs/about.src
+++ b/cui/source/dialogs/about.src
@@ -33,7 +33,6 @@ ModalDialog RID_DEFAULTABOUT
Size = MAP_APPFONT ( 245 , 280 ) ;
Moveable = TRUE ;
SVLook = TRUE ;
-// TEXT_DEFAULTABOUT
OKButton ABOUT_BTN_OK
{
DefButton = TRUE ;
@@ -57,6 +56,9 @@ ModalDialog RID_DEFAULTABOUT
IgnoreTab = TRUE ;
ReadOnly = TRUE ;
AutoVScroll = TRUE ;
+ LEFT = FALSE ;
+ CENTER = TRUE ;
+ RIGHT = FALSE ;
};
FixedText ABOUT_FTXT_LINK
{
@@ -94,8 +96,8 @@ ModalDialog RID_DEFAULTABOUT
{
Text[ en-US ] = "http://www.libreoffice.org/credits.html";
};
- String ABOUT_STR_ACCEL
+ String ABOUT_STR_BUILD
{
- Text = "SDT" ;
+ Text[ en-US ] = "Build ID:";
};
};
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index c25b11f48f65..c099128991bb 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -116,7 +116,7 @@ void SAL_CALL SearchThread::run()
nBeginFormat = nEndFormat = nFileNumber;
for( sal_uInt16 i = nBeginFormat; i <= nEndFormat; ++i )
- aFormats.push_back( ( (FilterEntry*) mpBrowser->aFilterEntryList.GetObject( i ) )->aFilterName.ToLowerAscii() );
+ aFormats.push_back( mpBrowser->aFilterEntryList[ i ]->aFilterName.ToLowerAscii() );
ImplSearch( maStartURL, aFormats, mpBrowser->bSearchRecursive );
}
@@ -205,13 +205,13 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL,
}
}
}
- catch( const ContentCreationException& )
+ catch (const ContentCreationException&)
{
}
- catch( const ::com::sun::star::uno::RuntimeException& )
+ catch (const ::com::sun::star::uno::RuntimeException&)
{
}
- catch( const ::com::sun::star::uno::Exception& )
+ catch (const ::com::sun::star::uno::Exception&)
{
}
}
@@ -279,10 +279,14 @@ void SearchProgress::StartExecuteModal( const Link& rEndDialogHdl )
// - TakeThread -
// --------------
-TakeThread::TakeThread( TakeProgress* pProgess, TPGalleryThemeProperties* pBrowser, List& rTakenList ) :
- mpProgress ( pProgess ),
- mpBrowser ( pBrowser ),
- mrTakenList ( rTakenList )
+TakeThread::TakeThread(
+ TakeProgress* pProgess,
+ TPGalleryThemeProperties* pBrowser,
+ TokenList_impl& rTakenList
+) :
+ mpProgress ( pProgess ),
+ mpBrowser ( pBrowser ),
+ mrTakenList ( rTakenList )
{
}
@@ -298,9 +302,9 @@ void SAL_CALL TakeThread::run()
{
String aName;
INetURLObject aURL;
- sal_uInt16 nEntries;
+ sal_uInt16 nEntries;
GalleryTheme* pThm = mpBrowser->GetXChgData()->pTheme;
- sal_uInt16 nPos;
+ sal_uInt16 nPos;
GalleryProgress* pStatusProgress;
{
@@ -319,7 +323,7 @@ void SAL_CALL TakeThread::run()
aURL = INetURLObject(*mpBrowser->aFoundList[ nPos = mpBrowser->aLbxFound.GetSelectEntryPos( i ) ]);
// Position in Taken-Liste uebernehmen
- mrTakenList.Insert( (void*) (sal_uLong)nPos, LIST_APPEND );
+ mrTakenList.push_back( (sal_uLong)nPos );
{
SolarMutexGuard aGuard;
@@ -392,10 +396,9 @@ IMPL_LINK( TakeProgress, CleanUpHdl, void*, EMPTYARG )
mpBrowser->aLbxFound.SetNoSelection();
// mark all taken positions in aRemoveEntries
- for( i = 0UL, nCount = maTakenList.Count(); i < nCount; ++i )
- aRemoveEntries[ (sal_uLong) maTakenList.GetObject( i ) ] = true;
-
- maTakenList.Clear();
+ for( i = 0, nCount = maTakenList.size(); i < nCount; ++i )
+ aRemoveEntries[ maTakenList[ i ] ] = true;
+ maTakenList.clear();
// refill found list
for( i = 0, nCount = aRemoveEntries.size(); i < nCount; ++i )
@@ -827,8 +830,9 @@ TPGalleryThemeProperties::~TPGalleryThemeProperties()
for ( size_t i = 0, n = aFoundList.size(); i < n; ++i )
delete aFoundList[ i ];
- for( void* pEntry = aFilterEntryList.First(); pEntry; pEntry = aFilterEntryList.Next() )
- delete (FilterEntry*) pEntry;
+ for ( size_t i = 0, n = aFilterEntryList.size(); i < n; ++i ) {
+ delete aFilterEntryList[ i ];
+ }
}
// ------------------------------------------------------------------------
@@ -861,7 +865,7 @@ SfxTabPage* TPGalleryThemeProperties::Create( Window* pParent, const SfxItemSet&
void TPGalleryThemeProperties::FillFilterList()
{
- GraphicFilter* pFilter = GraphicFilter::GetGraphicFilter();
+ GraphicFilter &rFilter = GraphicFilter::GetGraphicFilter();
String aExt;
String aName;
FilterEntry* pFilterEntry;
@@ -870,11 +874,12 @@ void TPGalleryThemeProperties::FillFilterList()
sal_Bool bInList;
// graphic filters
- for( i = 0, nKeyCount = pFilter->GetImportFormatCount(); i < nKeyCount; i++ )
+ for( i = 0, nKeyCount = rFilter.GetImportFormatCount(); i < nKeyCount; i++ )
{
- aExt = pFilter->GetImportFormatShortName( i );
- aName = pFilter->GetImportFormatName( i );
- pTestEntry = (FilterEntry*) aFilterEntryList.First();
+ aExt = rFilter.GetImportFormatShortName( i );
+ aName = rFilter.GetImportFormatName( i );
+ size_t entryIndex = 0;
+ pTestEntry = aFilterEntryList.empty() ? NULL : aFilterEntryList[ entryIndex ];
bInList = sal_False;
String aExtensions;
@@ -882,7 +887,7 @@ void TPGalleryThemeProperties::FillFilterList()
String sWildcard;
while( sal_True )
{
- sWildcard = pFilter->GetImportWildcard( i, j++ );
+ sWildcard = rFilter.GetImportWildcard( i, j++ );
if ( !sWildcard.Len() )
break;
if ( aExtensions.Search( sWildcard ) == STRING_NOTFOUND )
@@ -901,18 +906,24 @@ void TPGalleryThemeProperties::FillFilterList()
bInList = sal_True;
break;
}
- pTestEntry = (FilterEntry*) aFilterEntryList.Next();
+ pTestEntry = ( ++entryIndex < aFilterEntryList.size() )
+ ? aFilterEntryList[ entryIndex ] : NULL;
}
if ( !bInList )
{
pFilterEntry = new FilterEntry;
pFilterEntry->aFilterName = aExt;
- aFilterEntryList.Insert( pFilterEntry, aCbbFileType.InsertEntry( aName ) );
+ size_t pos = aCbbFileType.InsertEntry( aName );
+ if ( pos < aFilterEntryList.size() ) {
+ aFilterEntryList.insert( aFilterEntryList.begin() + pos, pFilterEntry );
+ } else {
+ aFilterEntryList.push_back( pFilterEntry );
+ }
}
}
// media filters
- static const ::rtl::OUString aWildcard( RTL_CONSTASCII_USTRINGPARAM( "*." ) );
+ static const ::rtl::OUString aWildcard( RTL_CONSTASCII_USTRINGPARAM( "*." ) );
::avmedia::FilterNameVector aFilters;
const ::rtl::OUString aSeparator( RTL_CONSTASCII_USTRINGPARAM( ";" ) );
::rtl::OUString aAllTypes;
@@ -927,9 +938,20 @@ void TPGalleryThemeProperties::FillFilterList()
pFilterEntry = new FilterEntry;
pFilterEntry->aFilterName = aFilters[ l ].second.getToken( 0, ';', nIndex );
- nFirstExtFilterPos = aCbbFileType.InsertEntry( addExtension( aFilters[ l ].first,
- aFilterWildcard += pFilterEntry->aFilterName ) );
- aFilterEntryList.Insert( pFilterEntry, nFirstExtFilterPos );
+ nFirstExtFilterPos = aCbbFileType.InsertEntry(
+ addExtension(
+ aFilters[ l ].first,
+ aFilterWildcard += pFilterEntry->aFilterName
+ )
+ );
+ if ( nFirstExtFilterPos < aFilterEntryList.size() ) {
+ aFilterEntryList.insert(
+ aFilterEntryList.begin() + nFirstExtFilterPos,
+ pFilterEntry
+ );
+ } else {
+ aFilterEntryList.push_back( pFilterEntry );
+ }
}
}
@@ -943,7 +965,7 @@ void TPGalleryThemeProperties::FillFilterList()
String sWildcard;
while( sal_True )
{
- sWildcard = pFilter->GetImportWildcard( i, j++ );
+ sWildcard = rFilter.GetImportWildcard( i, j++ );
if ( !sWildcard.Len() )
break;
if ( aExtensions.Search( sWildcard ) == STRING_NOTFOUND )
@@ -975,8 +997,12 @@ void TPGalleryThemeProperties::FillFilterList()
pFilterEntry = new FilterEntry;
pFilterEntry->aFilterName = String( CUI_RES( RID_SVXSTR_GALLERY_ALLFILES ) );
pFilterEntry->aFilterName = addExtension( pFilterEntry->aFilterName, aExtensions );
- aFilterEntryList.Insert(pFilterEntry, aCbbFileType. InsertEntry( pFilterEntry->aFilterName, 0 ) );
-
+ size_t pos = aCbbFileType.InsertEntry( pFilterEntry->aFilterName, 0 );
+ if ( pos < aFilterEntryList.size() ) {
+ aFilterEntryList.insert( aFilterEntryList.begin() + pos, pFilterEntry );
+ } else {
+ aFilterEntryList.push_back( pFilterEntry );
+ }
aCbbFileType.SetText( pFilterEntry->aFilterName );
}
@@ -1065,7 +1091,7 @@ IMPL_LINK( TPGalleryThemeProperties, ClickSearchHdl, void *, EMPTYARG )
}
}
}
- catch(IllegalArgumentException)
+ catch (const IllegalArgumentException&)
{
OSL_FAIL( "Folder picker failed with illegal arguments" );
}
diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx
index cc2cd69f53d7..1b44a8dbf54a 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -290,7 +290,6 @@ sal_uInt16 SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem )
{
case INET_PROT_HTTP :
case INET_PROT_FTP :
- case INET_PROT_TELNET :
nPageId = RID_SVXPAGE_HYPERLINK_INTERNET;
break;
case INET_PROT_FILE :
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 356416a61753..ae30fa0b5f4c 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -395,7 +395,7 @@ void SvxHyperlinkNewDocTp::DoApply ()
}
}
}
- catch( uno::Exception )
+ catch (const uno::Exception&)
{
}
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 77e4cc1d2531..1018518b718d 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -34,18 +34,14 @@
#include "hyperdlg.hrc"
#include "hlmarkwn_def.hxx"
-#define STD_DOC_SUBPATH "internal"
-#define STD_DOC_NAME "url_transfer.htm"
-
sal_Char const sAnonymous[] = "anonymous";
sal_Char const sHTTPScheme[] = INET_HTTP_SCHEME;
sal_Char const sHTTPSScheme[] = INET_HTTPS_SCHEME;
sal_Char const sFTPScheme[] = INET_FTP_SCHEME;
-sal_Char const sTelnetScheme[] = INET_TELNET_SCHEME;
/*************************************************************************
|*
-|* Contructor / Destructor
+|* Constructor / Destructor
|*
|************************************************************************/
@@ -56,7 +52,6 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent,
maGrpLinkTyp ( this, CUI_RES (GRP_LINKTYPE) ),
maRbtLinktypInternet ( this, CUI_RES (RB_LINKTYP_INTERNET) ),
maRbtLinktypFTP ( this, CUI_RES (RB_LINKTYP_FTP) ),
- maRbtLinktypTelnet ( this, CUI_RES (RB_LINKTYP_TELNET) ),
maFtTarget ( this, CUI_RES (FT_TARGET_HTML) ),
maCbbTarget ( this, INET_PROT_HTTP ),
maBtBrowse ( this, CUI_RES (BTN_BROWSE) ),
@@ -81,19 +76,6 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent,
maCbbTarget.Show();
maCbbTarget.SetHelpId( HID_HYPERDLG_INET_PATH );
- // Find Path to Std-Doc
- String aStrBasePaths( SvtPathOptions().GetTemplatePath() );
- for( xub_StrLen n = 0; n < aStrBasePaths.GetTokenCount(); n++ )
- {
- INetURLObject aURL( aStrBasePaths.GetToken( n ) );
- aURL.Append( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( STD_DOC_SUBPATH ) ) );
- aURL.Append( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( STD_DOC_NAME ) ) );
- if ( FileExists( aURL ) )
- {
- maStrStdDocURL = aURL.GetMainURL( INetURLObject::NO_DECODE );
- break;
- }
- }
SetExchangeSupport ();
///////////////////////////////////////
@@ -105,14 +87,13 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent,
maEdPassword.Show( sal_False );
maCbAnonymous.Show( sal_False );
maBtTarget.Enable( sal_False );
- maBtBrowse.Enable( maStrStdDocURL != aEmptyStr );
+ maBtBrowse.Enable( sal_True );
///////////////////////////////////////
// overload handlers
Link aLink( LINK ( this, SvxHyperlinkInternetTp, Click_SmartProtocol_Impl ) );
maRbtLinktypInternet.SetClickHdl( aLink );
maRbtLinktypFTP.SetClickHdl ( aLink );
- maRbtLinktypTelnet.SetClickHdl ( aLink );
maCbAnonymous.SetClickHdl ( LINK ( this, SvxHyperlinkInternetTp, ClickAnonymousHdl_Impl ) );
maBtBrowse.SetClickHdl ( LINK ( this, SvxHyperlinkInternetTp, ClickBrowseHdl_Impl ) );
maBtTarget.SetClickHdl ( LINK ( this, SvxHyperlinkInternetTp, ClickTargetHdl_Impl ) );
@@ -253,7 +234,7 @@ void SvxHyperlinkInternetTp::SetInitFocus()
/*************************************************************************
|*
-|* Contens of editfield "Taregt" modified
+|* Contents of editfield "Target" modified
|*
|************************************************************************/
@@ -272,7 +253,7 @@ IMPL_LINK ( SvxHyperlinkInternetTp, ModifiedTargetHdl_Impl, void *, EMPTYARG )
/*************************************************************************
|*
-|* If target-field was modify, to browse the new doc afeter timeout
+|* If target-field was modify, to browse the new doc after timeout
|*
|************************************************************************/
@@ -284,7 +265,7 @@ IMPL_LINK ( SvxHyperlinkInternetTp, TimeoutHdl_Impl, Timer *, EMPTYARG )
/*************************************************************************
|*
-|* Contens of editfield "Login" modified
+|* Contents of editfield "Login" modified
|*
|************************************************************************/
@@ -308,14 +289,10 @@ void SvxHyperlinkInternetTp::SetScheme( const String& aScheme )
//if aScheme is empty or unknown the default beaviour is like it where HTTP
sal_Bool bFTP = aScheme.SearchAscii( sFTPScheme ) == 0;
- sal_Bool bTelnet = sal_False;
- if( !bFTP )
- bTelnet = aScheme.SearchAscii( sTelnetScheme ) == 0;
- sal_Bool bInternet = !(bFTP || bTelnet);
+ sal_Bool bInternet = !(bFTP);
//update protocol button selection:
maRbtLinktypFTP.Check(bFTP);
- maRbtLinktypTelnet.Check(bTelnet);
maRbtLinktypInternet.Check(bInternet);
//update target:
@@ -338,7 +315,7 @@ void SvxHyperlinkInternetTp::SetScheme( const String& aScheme )
}
else
{
- //disable for https, ftp and telnet
+ //disable for https and ftp
maBtTarget.Disable();
if ( mbMarkWndOpen )
HideMarkWnd ();
@@ -371,10 +348,6 @@ String SvxHyperlinkInternetTp::GetSchemeFromButtons() const
{
return String::CreateFromAscii( INET_FTP_SCHEME );
}
- else if( maRbtLinktypTelnet.IsChecked() )
- {
- return String::CreateFromAscii( INET_TELNET_SCHEME );
- }
return String::CreateFromAscii( INET_HTTP_SCHEME );
}
@@ -384,16 +357,12 @@ INetProtocol SvxHyperlinkInternetTp::GetSmartProtocolFromButtons() const
{
return INET_PROT_FTP;
}
- else if( maRbtLinktypTelnet.IsChecked() )
- {
- return INET_PROT_TELNET;
- }
return INET_PROT_HTTP;
}
/*************************************************************************
|*
-|* Click on Radiobutton : Internet, FTP or Telnet
+|* Click on Radiobutton : Internet or FTP
|*
|************************************************************************/
@@ -457,7 +426,8 @@ IMPL_LINK ( SvxHyperlinkInternetTp, ClickBrowseHdl_Impl, void *, EMPTYARG )
/////////////////////////////////////////////////
// Open URL if available
- SfxStringItem aName( SID_FILE_NAME, maStrStdDocURL );
+ SfxStringItem aName( SID_FILE_NAME, UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "http://" ) ) );
SfxStringItem aRefererItem( SID_REFERER, UniString::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "private:user" ) ) );
SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, sal_True );
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index cbfcacbf591d..c577095dd216 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -578,10 +578,6 @@ String SvxHyperlinkTabPageBase::GetSchemeFromURL( String aStrURL )
{
aStrScheme = String::CreateFromAscii( INET_NEWS_SCHEME );
}
- else if ( aStrURL.EqualsIgnoreCaseAscii( INET_TELNET_SCHEME, 0, 9 ) )
- {
- aStrScheme = String::CreateFromAscii( INET_TELNET_SCHEME );
- }
}
else
aStrScheme = INetURLObject::GetScheme( aProtocol );
diff --git a/cui/source/dialogs/hyperdlg.hrc b/cui/source/dialogs/hyperdlg.hrc
index c838ffd9c20d..ead6a8239059 100644
--- a/cui/source/dialogs/hyperdlg.hrc
+++ b/cui/source/dialogs/hyperdlg.hrc
@@ -30,7 +30,6 @@
#define GRP_LINKTYPE 1
#define RB_LINKTYP_INTERNET 2
#define RB_LINKTYP_FTP 3
-#define RB_LINKTYP_TELNET 4
#define FT_TARGET_HTML 5
#define CB_TARGET_HTML 6
#define FT_LOGIN 7
diff --git a/cui/source/dialogs/hyperdlg.src b/cui/source/dialogs/hyperdlg.src
index 66c9be97525d..38df0d9cb71c 100644
--- a/cui/source/dialogs/hyperdlg.src
+++ b/cui/source/dialogs/hyperdlg.src
@@ -68,13 +68,6 @@ TabPage RID_SVXPAGE_HYPERLINK_INTERNET
Size = MAP_APPFONT( 56 - COL_DIFF, 10 );
Text [ en-US ] = "~FTP";
};
- RadioButton RB_LINKTYP_TELNET
- {
- HelpID = "cui:RadioButton:RID_SVXPAGE_HYPERLINK_INTERNET:RB_LINKTYP_TELNET";
- Pos = MAP_APPFONT( 173, 13 );
- Size = MAP_APPFONT( 56, 10 );
- Text [ en-US ] = "~Telnet";
- };
FixedText FT_TARGET_HTML
{
Pos = MAP_APPFONT ( 12 , 26 ) ;
@@ -124,7 +117,7 @@ TabPage RID_SVXPAGE_HYPERLINK_INTERNET
TabStop = TRUE ;
Text [ en-US ] = "WWW Browser";
- QuickHelpText [ en-US ] = "WWW Browser" ;
+ QuickHelpText [ en-US ] = "Open web browser, copy an URL, and paste it to Target field" ;
ButtonImage = Image
{
ImageBitmap = Bitmap { File = "browse.bmp" ; };
@@ -132,22 +125,6 @@ TabPage RID_SVXPAGE_HYPERLINK_INTERNET
};
};
- ImageButton BTN_TARGET
- {
- HelpID = "cui:ImageButton:RID_SVXPAGE_HYPERLINK_INTERNET:BTN_TARGET";
- Pos = MAP_APPFONT ( 235, 40+2 ) ;
- Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_HEIGHT, HYPERDLG_IMGBUTTON_HEIGHT );
- TabStop = TRUE ;
- Text [ en-US ] = "Target in Document";
-
- QuickHelpText [ en-US ] = "Target in Document" ;
- ButtonImage = Image
- {
- ImageBitmap = Bitmap { File = "target.bmp" ; };
- MASKCOLOR
- };
- };
-
FixedLine GRP_MORE
{
Pos = MAP_APPFONT ( 6 , 92 ) ;
@@ -783,7 +760,7 @@ String RID_SVXSTR_HYPERDLG_HLINETTP
};
String RID_SVXSTR_HYPERDLG_HLINETTP_HELP
{
- Text [ en-US ] = "This is where you create a hyperlink to a Web page, FTP server or Telnet connection." ;
+ Text [ en-US ] = "This is where you create a hyperlink to a Web page or FTP server connection." ;
};
String RID_SVXSTR_HYPERDLG_HLMAILTP
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index f981edef298b..c78da40d90fb 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -45,15 +45,7 @@
using ::std::vector;
-#ifdef WNT
-int __cdecl IconcDlgCmpUS_Impl( const void* p1, const void* p2 )
-#else
-#if defined(OS2) && defined(ICC)
-int _Optlink IconcDlgCmpUS_Impl( const void* p1, const void* p2 )
-#else
-int IconcDlgCmpUS_Impl( const void* p1, const void* p2 )
-#endif
-#endif
+int SAL_CALL IconcDlgCmpUS_Impl( const void* p1, const void* p2 )
{
return *(sal_uInt16*)p1 - *(sal_uInt16*)p2;
}
@@ -279,7 +271,7 @@ IconChoiceDialog ::~IconChoiceDialog ()
// save configuration at INI-Manager
// and remove pages
SvtViewOptions aTabDlgOpt( E_TABDIALOG, String::CreateFromInt32( nResId ) );
- aTabDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( GetWindowState((WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y | WINDOWSTATE_MASK_STATE | WINDOWSTATE_MASK_MINIMIZED)).GetBuffer() ) );
+ aTabDlgOpt.SetWindowState(::rtl::OStringToOUString(GetWindowState((WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y | WINDOWSTATE_MASK_STATE | WINDOWSTATE_MASK_MINIMIZED)), RTL_TEXTENCODING_ASCII_US));
aTabDlgOpt.SetPageID( mnCurrentPageId );
for ( size_t i = 0, nCount = maPageList.size(); i < nCount; ++i )
@@ -1114,7 +1106,7 @@ void IconChoiceDialog::Start_Impl()
if ( aTabDlgOpt.Exists() )
{
// ggf. Position aus Konfig
- SetWindowState( ByteString( aTabDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) );
+ SetWindowState(rtl::OUStringToOString(aTabDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US));
// initiale TabPage aus Programm/Hilfe/Konfig
nActPage = (sal_uInt16)aTabDlgOpt.GetPageID();
diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx
index 4f8b83bc67f9..2e36a529f5f8 100644
--- a/cui/source/dialogs/srchxtra.cxx
+++ b/cui/source/dialogs/srchxtra.cxx
@@ -45,6 +45,7 @@
#include "backgrnd.hxx"
#include <svx/dialogs.hrc> // RID_SVXPAGE_...
#include <tools/resary.hxx>
+#include <rtl/strbuf.hxx>
// class SvxSearchFormatDialog -------------------------------------------
@@ -186,9 +187,10 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog( Window* pParent,
pEntry = aAttrLB.SvTreeListBox::InsertEntry( aAttrNames.GetString(nId) );
else
{
- ByteString sError( "no resource for slot id\nslot = " );
- sError += ByteString::CreateFromInt32( nSlot );
- DBG_ERRORFILE( sError.GetBuffer() );
+ rtl::OStringBuffer sError(
+ RTL_CONSTASCII_STRINGPARAM("no resource for slot id\nslot = "));
+ sError.append(static_cast<sal_Int32>(nSlot));
+ DBG_ERRORFILE(sError.getStr());
}
if ( pEntry )