summaryrefslogtreecommitdiff
path: root/cui
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
parent57b992c0b57daba5f44b5c4cdb08e817f355ea01 (diff)
undo anything not wizard related in the previous merge-commit
Diffstat (limited to 'cui')
-rw-r--r--cui/Library_cui.mk6
-rw-r--r--cui/source/customize/acccfg.cxx2
-rw-r--r--cui/source/customize/macropg.cxx20
-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
-rw-r--r--cui/source/factory/cuiresmgr.cxx7
-rw-r--r--cui/source/factory/dlgfact.cxx1
-rw-r--r--cui/source/inc/about.hxx3
-rw-r--r--cui/source/inc/chardlg.hxx8
-rw-r--r--cui/source/inc/cuigaldlg.hxx28
-rw-r--r--cui/source/inc/cuitabline.hxx59
-rw-r--r--cui/source/inc/hlinettp.hxx9
-rw-r--r--cui/source/inc/hltpbase.hxx2
-rw-r--r--cui/source/inc/page.hxx2
-rw-r--r--cui/source/options/fontsubs.cxx1
-rw-r--r--cui/source/options/fontsubs.hxx1
-rw-r--r--cui/source/options/optchart.cxx4
-rw-r--r--cui/source/options/optgdlg.cxx22
-rw-r--r--cui/source/options/opthtml.cxx74
-rw-r--r--cui/source/options/optinet2.cxx407
-rwxr-xr-xcui/source/options/optinet2.hrc23
-rw-r--r--cui/source/options/optinet2.hxx69
-rw-r--r--cui/source/options/optinet2.src166
-rw-r--r--cui/source/options/optmemory.cxx4
-rw-r--r--cui/source/options/optpath.cxx1
-rw-r--r--cui/source/options/optsave.cxx10
-rw-r--r--cui/source/options/treeopt.cxx4
-rw-r--r--cui/source/options/treeopt.src4
-rw-r--r--cui/source/tabpages/autocdlg.cxx58
-rw-r--r--cui/source/tabpages/chardlg.cxx288
-rw-r--r--cui/source/tabpages/numpages.cxx9
-rw-r--r--cui/source/tabpages/page.cxx17
-rw-r--r--cui/source/tabpages/tpline.cxx23
43 files changed, 338 insertions, 1431 deletions
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 406dd7499cfb..94d8a4a71603 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -36,7 +36,6 @@ $(eval $(call gb_Library_set_include,cui,\
$$(INCLUDE) \
-I$(realpath $(SRCDIR)/cui/source/inc) \
-I$(OUTDIR)/inc \
- -I$(OUTDIR)/inc/offuh \
))
$(eval $(call gb_Library_add_defs,cui,\
@@ -45,6 +44,11 @@ $(eval $(call gb_Library_add_defs,cui,\
$(if $(filter TRUE,$(ENABLE_KDE4)),-DENABLE_KDE4) \
))
+$(eval $(call gb_Library_add_api,cui,\
+ offapi \
+ udkapi \
+))
+
# .IF "$(ENABLE_LAYOUT)" == "TRUE"
# CFLAGS+= -DENABLE_LAYOUT=1 -I../$(PRJ)/layout/inc -I../$(PRJ)/layout/$(INPATH)/inc
# .ENDIF # ENABLE_LAYOUT == TRUE
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 4b955b653cd4..9436944924eb 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -1041,7 +1041,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, Load, Button*, EMPTYARG )
//-----------------------------------------------
IMPL_LINK( SfxAcceleratorConfigPage, Save, Button*, EMPTYARG )
{
- StartFileDialog( WB_SAVEAS | WB_STDMODAL | WB_3DLOOK, aLoadAccelConfigStr );
+ StartFileDialog( WB_SAVEAS | WB_STDMODAL | WB_3DLOOK, aSaveAccelConfigStr );
return 0;
}
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 007ad3d2ab1e..26847cc25666 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -344,7 +344,7 @@ sal_Bool _SvxMacroTabPage::FillItemSet( SfxItemSet& /*rSet*/ )
{
m_xAppEvents->replaceByName( eventName, GetPropsByName( eventName, m_appEventsHash ) );
}
- catch( const Exception& )
+ catch (const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -361,7 +361,7 @@ sal_Bool _SvxMacroTabPage::FillItemSet( SfxItemSet& /*rSet*/ )
{
m_xDocEvents->replaceByName( eventName, GetPropsByName( eventName, m_docEventsHash ) );
}
- catch( const Exception& )
+ catch (const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -375,7 +375,7 @@ sal_Bool _SvxMacroTabPage::FillItemSet( SfxItemSet& /*rSet*/ )
}
}
}
- catch(Exception&)
+ catch (const Exception&)
{
}
// what is the return value about??
@@ -420,7 +420,7 @@ void _SvxMacroTabPage::Reset()
}
}
}
- catch(Exception&)
+ catch (const Exception&)
{
}
DisplayAppEvents(bAppEvents);
@@ -763,8 +763,9 @@ void _SvxMacroTabPage::InitAndSetHandler( Reference< container::XNameReplace> xA
{
m_appEventsHash[ eventNames[nEvent] ] = GetPairFromAny( m_xAppEvents->getByName( eventNames[nEvent] ) );
}
- catch (Exception e)
- {}
+ catch (const Exception&)
+ {
+ }
}
if(m_xDocEvents.is())
{
@@ -776,8 +777,9 @@ void _SvxMacroTabPage::InitAndSetHandler( Reference< container::XNameReplace> xA
{
m_docEventsHash[ eventNames[nEvent] ] = GetPairFromAny( m_xDocEvents->getByName( eventNames[nEvent] ) );
}
- catch (Exception e)
- {}
+ catch (const Exception&)
+ {
+ }
}
}
}
@@ -924,7 +926,7 @@ IMPL_LINK( SvxMacroAssignSingleTabDialog, OKHdl_Impl, Button *, pButton )
{
(void)pButton; //unused
pPage->FillItemSet( *pOutSet );
- EndDialog( RET_CANCEL );
+ EndDialog( RET_OK );
return 0;
}
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 )
diff --git a/cui/source/factory/cuiresmgr.cxx b/cui/source/factory/cuiresmgr.cxx
index c04206ccb63b..8e3bc3140f1a 100644
--- a/cui/source/factory/cuiresmgr.cxx
+++ b/cui/source/factory/cuiresmgr.cxx
@@ -33,15 +33,14 @@
#include <svl/solar.hrc>
#include <vcl/svapp.hxx>
-static ResMgr* pResMgr=0;
-
// struct DialogsResMgr --------------------------------------------------
ResMgr* CuiResMgr::GetResMgr()
{
+ static ResMgr* pResMgr=0;
+
if ( !pResMgr )
{
- ByteString aName( "cui" );
- pResMgr = ResMgr::CreateResMgr( aName.GetBuffer(), Application::GetSettings().GetUILocale() );
+ pResMgr = ResMgr::CreateResMgr("cui", Application::GetSettings().GetUILocale());
}
return pResMgr;
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 49163e6034fc..5296dd5c01b9 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -40,7 +40,6 @@
#include "splitcelldlg.hxx"
#include "gallery.hrc"
#include "dstribut.hxx"
-#include "cuigaldlg.hxx"
#include "cuiimapwnd.hxx"
#include "hlmarkwn.hxx"
#include "cuicharmap.hxx"
diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx
index 036787e4c88e..4e09e0e2e422 100644
--- a/cui/source/inc/about.hxx
+++ b/cui/source/inc/about.hxx
@@ -67,10 +67,7 @@ protected:
public:
AboutDialog( Window* pParent, const ResId& rId);
- ~AboutDialog();
- DECL_LINK( TimerHdl, Timer * );
- DECL_LINK( AccelSelectHdl, Accelerator * );
DECL_LINK( HandleHyperlink, svt::FixedHyperlink * );
};
diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index 5f88aa64fd3b..f6a6a6361bdc 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -66,12 +66,8 @@ protected:
sal_uInt16 nResIdPrewievWin, sal_uInt16 nResIdFontTypeFT );
virtual ~SvxCharBasePage();
- void SetPrevFontSize( const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont );
- void SetPrevFont( const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont );
- void SetPrevFontStyle( const SfxItemSet& rSet, sal_uInt16 nSlotPosture, sal_uInt16 nSlotWeight, SvxFont& rFont ); // posture/weight
- void SetPrevFontWidthScale( const SfxItemSet& rSet );
-
- void SetPrevFontEscapement( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc );
+ void SetPrevFontWidthScale( const SfxItemSet& rSet );
+ void SetPrevFontEscapement( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc );
inline SvxFont& GetPreviewFont();
inline SvxFont& GetPreviewCJKFont();
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index 79a9b58f9350..1009ce0e7283 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -59,7 +59,8 @@ class SearchProgress;
class TakeProgress;
class TPGalleryThemeProperties;
-typedef ::std::vector< UniString* > StringList;
+typedef ::std::vector< UniString* > StringList;
+typedef ::std::vector< sal_uLong > TokenList_impl;
// ---------------
// - FilterEntry -
@@ -137,14 +138,18 @@ private:
TakeProgress* mpProgress;
TPGalleryThemeProperties* mpBrowser;
- List& mrTakenList;
+ TokenList_impl& mrTakenList;
virtual void SAL_CALL run();
virtual void SAL_CALL onTerminated();
public:
- TakeThread( TakeProgress* pProgess, TPGalleryThemeProperties* pBrowser, List& rTakenList );
+ TakeThread(
+ TakeProgress* pProgess,
+ TPGalleryThemeProperties* pBrowser,
+ TokenList_impl& rTakenList
+ );
virtual ~TakeThread();
};
@@ -160,7 +165,7 @@ private:
FixedLine aFLTakeProgress;
CancelButton aBtnCancel;
TakeThread maTakeThread;
- List maTakenList;
+ TokenList_impl maTakenList;
DECL_LINK( ClickCancelBtn, void* );
void Terminate();
@@ -304,6 +309,7 @@ public:
// ----------------------------
// - TPGalleryThemeProperties -
// ----------------------------
+typedef ::std::vector< FilterEntry* > FilterEntryList_impl;
class TPGalleryThemeProperties : public SfxTabPage
{
@@ -320,13 +326,13 @@ class TPGalleryThemeProperties : public SfxTabPage
CheckBox aCbxPreview;
GalleryPreview aWndPreview;
- ExchangeData* pData;
- StringList aFoundList;
- List aFilterEntryList;
- Timer aPreviewTimer;
- String aLastFilterName;
- String aPreviewString;
- INetURLObject aURL;
+ ExchangeData* pData;
+ StringList aFoundList;
+ FilterEntryList_impl aFilterEntryList;
+ Timer aPreviewTimer;
+ String aLastFilterName;
+ String aPreviewString;
+ INetURLObject aURL;
sal_uInt16 nCurFilterPos;
sal_uInt16 nFirstExtFilterPos;
sal_Bool bEntriesFound;
diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
index 26a6faf83887..3952b9f3a2aa 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -52,19 +52,19 @@ private:
XDashList* pNewDashList;
XLineEndList* pLineEndList;
XLineEndList* pNewLineEndList;
- sal_Bool bObjSelected;
+ sal_Bool bObjSelected;
ChangeType nLineEndListState;
ChangeType nDashListState;
ChangeType mnColorTableState;
- sal_uInt16 nPageType;
- sal_uInt16 nDlgType;
- sal_uInt16 nPosDashLb;
- sal_uInt16 nPosLineEndLb;
- sal_uInt16 mnPos;
- sal_Bool mbAreaTP;
- sal_Bool mbDeleteColorTable;
+ sal_uInt16 nPageType;
+ sal_uInt16 nDlgType;
+ sal_uInt16 nPosDashLb;
+ sal_uInt16 nPosLineEndLb;
+ sal_uInt16 mnPos;
+ sal_Bool mbAreaTP;
+ sal_Bool mbDeleteColorTable;
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
@@ -81,13 +81,13 @@ public:
sal_Bool bHasObj = sal_True );
~SvxLineTabDialog();
- void SetNewDashList( XDashList* pInLst)
+ void SetNewDashList( XDashList* pInLst)
{ pNewDashList = pInLst; }
- XDashList* GetNewDashList() const { return pNewDashList; }
- const XDashList* GetDashList() const { return pDashList; }
+ XDashList* GetNewDashList() const { return pNewDashList; }
+ const XDashList* GetDashList() const { return pDashList; }
void SetNewLineEndList( XLineEndList* pInLst)
- { pNewLineEndList = pInLst; }
+ { pNewLineEndList = pInLst; }
XLineEndList* GetNewLineEndList() const { return pNewLineEndList; }
const XLineEndList* GetLineEndList() const { return pLineEndList; }
@@ -102,6 +102,9 @@ public:
|*
\************************************************************************/
+class SvxBmpItemInfo;
+typedef ::std::vector< SvxBmpItemInfo* > SvxBmpItemInfoList;
+
class SvxLineTabPage : public SvxTabPage
{
using TabPage::ActivatePage;
@@ -149,17 +152,17 @@ private:
MetricField aSymbolHeightMF;
CheckBox aSymbolRatioCB;
std::vector<String> aGrfNames;
- List aGrfBrushItems;
+ SvxBmpItemInfoList aGrfBrushItems;
String sNumCharFmtName;
- sal_Bool bLastWidthModified;
+ sal_Bool bLastWidthModified;
Size aSymbolLastSize;
Graphic aSymbolGraphic;
Size aSymbolSize;
- sal_Bool bSymbols;
+ sal_Bool bSymbols;
const SfxItemSet& rOutAttrs;
RECT_POINT eRP;
- sal_Bool bObjSelected;
+ sal_Bool bObjSelected;
XOutdevItemPool* pXPool;
XLineStyleItem aXLStyle;
@@ -176,15 +179,15 @@ private:
ChangeType* pnLineEndListState;
ChangeType* pnDashListState;
ChangeType* pnColorTableState;
- sal_uInt16 nPageType;
- sal_uInt16 nDlgType;
- sal_uInt16* pPosDashLb;
- sal_uInt16* pPosLineEndLb;
+ sal_uInt16 nPageType;
+ sal_uInt16 nDlgType;
+ sal_uInt16* pPosDashLb;
+ sal_uInt16* pPosLineEndLb;
SfxMapUnit ePoolUnit;
// #63083#
- sal_Int32 nActLineWidth;
+ sal_Int32 nActLineWidth;
//Handler f�r Gallery-Popup-Menue-Button + Size
DECL_LINK( GraphicHdl_Impl, MenuButton * );
@@ -282,7 +285,7 @@ private:
const SfxItemSet& rOutAttrs;
XDash aDash;
- sal_Bool bObjSelected;
+ sal_Bool bObjSelected;
XOutdevItemPool* pXPool;
XLineStyleItem aXLStyle;
@@ -295,9 +298,9 @@ private:
XDashList* pDashList;
ChangeType* pnDashListState;
- sal_uInt16* pPageType;
- sal_uInt16* pDlgType;
- sal_uInt16* pPosDashLb;
+ sal_uInt16* pPageType;
+ sal_uInt16* pDlgType;
+ sal_uInt16* pPosDashLb;
SfxMapUnit ePoolUnit;
FieldUnit eFUnit;
@@ -372,7 +375,7 @@ private:
const SfxItemSet& rOutAttrs;
const SdrObject* pPolyObj;
- sal_Bool bObjSelected;
+ sal_Bool bObjSelected;
XOutdevItemPool* pXPool;
XLineStyleItem aXLStyle;
@@ -384,8 +387,8 @@ private:
XLineEndList* pLineEndList;
ChangeType* pnLineEndListState;
- sal_uInt16* pPageType;
- sal_uInt16* pDlgType;
+ sal_uInt16* pPageType;
+ sal_uInt16* pDlgType;
sal_uInt16* pPosLineEndLb;
#ifdef _SVX_TPLNEEND_CXX
diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx
index b803f01aaf1c..b4cd859c5b15 100644
--- a/cui/source/inc/hlinettp.hxx
+++ b/cui/source/inc/hlinettp.hxx
@@ -44,7 +44,6 @@ private:
FixedLine maGrpLinkTyp;
RadioButton maRbtLinktypInternet;
RadioButton maRbtLinktypFTP;
- RadioButton maRbtLinktypTelnet;
FixedText maFtTarget;
SvxHyperURLBox maCbbTarget;
ImageButton maBtBrowse;
@@ -60,12 +59,10 @@ private:
sal_Bool mbMarkWndOpen;
- String maStrStdDocURL;
-
- DECL_LINK (Click_SmartProtocol_Impl , void * ); // Radiobutton clicked: Type Internet, FTP or Telnet
- DECL_LINK (ClickAnonymousHdl_Impl , void * ); // Checkbox : Anonymer Benutzer
+ DECL_LINK (Click_SmartProtocol_Impl , void * ); // Radiobutton clicked: Type HTTP or FTP
+ DECL_LINK (ClickAnonymousHdl_Impl , void * ); // Checkbox : Anonymous User
DECL_LINK (ClickBrowseHdl_Impl , void * ); // Button : Browse
- DECL_LINK (ClickTargetHdl_Impl , void * ); // Button : Ziel
+ DECL_LINK (ClickTargetHdl_Impl , void * ); // Button : Target
DECL_LINK (ModifiedLoginHdl_Impl , void * ); // Contens of editfield "Login" modified
DECL_LINK (LostFocusTargetHdl_Impl , void * ); // Combobox "Target" lost its focus
DECL_LINK (ModifiedTargetHdl_Impl , void * ); // Contens of editfield "Target" modified
diff --git a/cui/source/inc/hltpbase.hxx b/cui/source/inc/hltpbase.hxx
index 0a3dbb237239..b13fe077e15b 100644
--- a/cui/source/inc/hltpbase.hxx
+++ b/cui/source/inc/hltpbase.hxx
@@ -28,8 +28,6 @@
#ifndef _SVX_TABBASE_HYPERLINK_HXX
#define _SVX_TABBASE_HYPERLINK_HXX
-#define INET_TELNET_SCHEME "telnet://"
-
#include <sfx2/app.hxx>
#include <sfx2/tabdlg.hxx>
#include <vcl/group.hxx>
diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index 289dac171671..e524a7d21e5d 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -222,7 +222,7 @@ public:
void SetPaperFormatRanges( Paper eStart, Paper eEnd )
{ ePaperStart = eStart, ePaperEnd = eEnd; }
- void SetCollectionList(const List* pList);
+ void SetCollectionList(const std::vector<String> &aList);
virtual void PageCreated (SfxAllItemSet aSet);
};
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 92d3fbb08c51..8e8035461e84 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -78,7 +78,6 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( Window* pParent,
sHeader3 (CUI_RES( STR_HEADER3 )),
sHeader4 (CUI_RES( STR_HEADER4 )),
- sFontGroup ("FontSubstitution"),
pCheckButtonData(0)
{
FreeResource();
diff --git a/cui/source/options/fontsubs.hxx b/cui/source/options/fontsubs.hxx
index 2ed4787240e2..ecd324ea4f63 100644
--- a/cui/source/options/fontsubs.hxx
+++ b/cui/source/options/fontsubs.hxx
@@ -102,7 +102,6 @@ class SvxFontSubstTabPage : public SfxTabPage
String sHeader4;
Color aTextColor;
- ByteString sFontGroup;
SvLBoxButtonData* pCheckButtonData;
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 13b861f07187..68a4fad5bc2b 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -196,6 +196,7 @@ IMPL_LINK( SvxDefaultColorOptPage, ResetToDefaults, void *, EMPTYARG )
aLbChartColors.GetFocus();
aLbChartColors.SelectEntryPos( 0 );
+ aPBRemove.Enable( sal_True );
}
return 0L;
@@ -217,6 +218,7 @@ IMPL_LINK( SvxDefaultColorOptPage, AddChartColor, void *, EMPTYARG )
aLbChartColors.GetFocus();
aLbChartColors.SelectEntryPos( pColorConfig->GetColorTable().size() - 1 );
+ aPBRemove.Enable( sal_True );
}
return 0L;
@@ -251,6 +253,8 @@ IMPL_LINK( SvxDefaultColorOptPage, RemoveChartColor, PushButton*, pButton )
aLbChartColors.SelectEntryPos( pColorConfig->GetColorTable().size() - 1 );
else if (aLbChartColors.GetEntryCount() > 0)
aLbChartColors.SelectEntryPos( nIndex );
+ else
+ aPBRemove.Enable( sal_False );
}
}
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 03f35d6d1111..503e4bb7778e 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -180,9 +180,12 @@ namespace
if ( xEnum.is() && xEnum->hasMoreElements() )
bRet = sal_True;
}
-
- catch( IllegalArgumentException ) {}
- catch( ElementExistException ) {}
+ catch (const IllegalArgumentException&)
+ {
+ }
+ catch (const ElementExistException&)
+ {
+ }
return bRet;
}
}
@@ -639,7 +642,7 @@ CanvasSettings::CanvasSettings() :
++pCurr;
}
}
- catch( Exception& )
+ catch (const Exception&)
{
}
}
@@ -677,8 +680,9 @@ sal_Bool CanvasSettings::IsHardwareAccelerationAvailable() const
return mbHWAccelAvailable;
}
}
- catch (Exception &)
- {}
+ catch (const Exception&)
+ {
+ }
++pCurrImpl;
}
@@ -1339,7 +1343,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe
}
}
- catch (Exception &e)
+ catch (const Exception &e)
{
// we'll just leave the box in it's default setting and won't
// even give it event handler...
@@ -1522,7 +1526,7 @@ sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet )
}
}
}
- catch (Exception& e)
+ catch (const Exception& e)
{
// we'll just leave the box in it's default setting and won't
// even give it event handler...
@@ -1757,7 +1761,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet )
aCTLLang >>= aLocale;
eCurLangCTL = MsLangId::convertLocaleToLanguage( aLocale );
}
- catch(Exception&)
+ catch (const Exception&)
{
}
//overwrite them by the values provided by the DocShell
diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx
index 8dcdb124e088..a3016e6f55e0 100644
--- a/cui/source/options/opthtml.cxx
+++ b/cui/source/options/opthtml.cxx
@@ -124,66 +124,66 @@ SfxTabPage* OfaHtmlTabPage::Create( Window* pParent,
sal_Bool OfaHtmlTabPage::FillItemSet( SfxItemSet& )
{
- SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
+ SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
if(aSize1NF.GetSavedValue() != aSize1NF.GetText())
- pHtmlOpt->SetFontSize(0, (sal_uInt16)aSize1NF.GetValue());
+ rHtmlOpt.SetFontSize(0, (sal_uInt16)aSize1NF.GetValue());
if(aSize2NF.GetSavedValue() != aSize2NF.GetText())
- pHtmlOpt->SetFontSize(1, (sal_uInt16)aSize2NF.GetValue());
+ rHtmlOpt.SetFontSize(1, (sal_uInt16)aSize2NF.GetValue());
if(aSize3NF.GetSavedValue() != aSize3NF.GetText())
- pHtmlOpt->SetFontSize(2, (sal_uInt16)aSize3NF.GetValue());
+ rHtmlOpt.SetFontSize(2, (sal_uInt16)aSize3NF.GetValue());
if(aSize4NF.GetSavedValue() != aSize4NF.GetText())
- pHtmlOpt->SetFontSize(3, (sal_uInt16)aSize4NF.GetValue());
+ rHtmlOpt.SetFontSize(3, (sal_uInt16)aSize4NF.GetValue());
if(aSize5NF.GetSavedValue() != aSize5NF.GetText())
- pHtmlOpt->SetFontSize(4, (sal_uInt16)aSize5NF.GetValue());
+ rHtmlOpt.SetFontSize(4, (sal_uInt16)aSize5NF.GetValue());
if(aSize6NF.GetSavedValue() != aSize6NF.GetText())
- pHtmlOpt->SetFontSize(5, (sal_uInt16)aSize6NF.GetValue());
+ rHtmlOpt.SetFontSize(5, (sal_uInt16)aSize6NF.GetValue());
if(aSize7NF.GetSavedValue() != aSize7NF.GetText())
- pHtmlOpt->SetFontSize(6, (sal_uInt16)aSize7NF.GetValue());
+ rHtmlOpt.SetFontSize(6, (sal_uInt16)aSize7NF.GetValue());
if(aNumbersEnglishUSCB.IsChecked() != aNumbersEnglishUSCB.GetSavedValue())
- pHtmlOpt->SetNumbersEnglishUS(aNumbersEnglishUSCB.IsChecked());
+ rHtmlOpt.SetNumbersEnglishUS(aNumbersEnglishUSCB.IsChecked());
if(aUnknownTagCB.IsChecked() != aUnknownTagCB.GetSavedValue())
- pHtmlOpt->SetImportUnknown(aUnknownTagCB.IsChecked());
+ rHtmlOpt.SetImportUnknown(aUnknownTagCB.IsChecked());
if(aIgnoreFontNamesCB.IsChecked() != aIgnoreFontNamesCB.GetSavedValue())
- pHtmlOpt->SetIgnoreFontFamily(aIgnoreFontNamesCB.IsChecked());
+ rHtmlOpt.SetIgnoreFontFamily(aIgnoreFontNamesCB.IsChecked());
if(aExportLB.GetSelectEntryPos() != aExportLB.GetSavedValue())
- pHtmlOpt->SetExportMode(aPosToExportArr[aExportLB.GetSelectEntryPos()]);
+ rHtmlOpt.SetExportMode(aPosToExportArr[aExportLB.GetSelectEntryPos()]);
if(aStarBasicCB.IsChecked() != aStarBasicCB.GetSavedValue())
- pHtmlOpt->SetStarBasic(aStarBasicCB.IsChecked());
+ rHtmlOpt.SetStarBasic(aStarBasicCB.IsChecked());
if(aStarBasicWarningCB.IsChecked() != aStarBasicWarningCB.GetSavedValue())
- pHtmlOpt->SetStarBasicWarning(aStarBasicWarningCB.IsChecked());
+ rHtmlOpt.SetStarBasicWarning(aStarBasicWarningCB.IsChecked());
if(aSaveGrfLocalCB.IsChecked() != aSaveGrfLocalCB.GetSavedValue())
- pHtmlOpt->SetSaveGraphicsLocal(aSaveGrfLocalCB.IsChecked());
+ rHtmlOpt.SetSaveGraphicsLocal(aSaveGrfLocalCB.IsChecked());
if(aPrintExtensionCB.IsChecked() != aPrintExtensionCB.GetSavedValue())
- pHtmlOpt->SetPrintLayoutExtension(aPrintExtensionCB.IsChecked());
+ rHtmlOpt.SetPrintLayoutExtension(aPrintExtensionCB.IsChecked());
- if( aCharSetLB.GetSelectTextEncoding() != pHtmlOpt->GetTextEncoding() )
- pHtmlOpt->SetTextEncoding( aCharSetLB.GetSelectTextEncoding() );
+ if( aCharSetLB.GetSelectTextEncoding() != rHtmlOpt.GetTextEncoding() )
+ rHtmlOpt.SetTextEncoding( aCharSetLB.GetSelectTextEncoding() );
return sal_False;
}
void OfaHtmlTabPage::Reset( const SfxItemSet& )
{
- SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
- aSize1NF.SetValue(pHtmlOpt->GetFontSize(0));
- aSize2NF.SetValue(pHtmlOpt->GetFontSize(1));
- aSize3NF.SetValue(pHtmlOpt->GetFontSize(2));
- aSize4NF.SetValue(pHtmlOpt->GetFontSize(3));
- aSize5NF.SetValue(pHtmlOpt->GetFontSize(4));
- aSize6NF.SetValue(pHtmlOpt->GetFontSize(5));
- aSize7NF.SetValue(pHtmlOpt->GetFontSize(6));
- aNumbersEnglishUSCB.Check(pHtmlOpt->IsNumbersEnglishUS());
- aUnknownTagCB.Check(pHtmlOpt->IsImportUnknown());
- aIgnoreFontNamesCB.Check(pHtmlOpt->IsIgnoreFontFamily());
- sal_uInt16 nExport = pHtmlOpt->GetExportMode();
+ SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
+ aSize1NF.SetValue(rHtmlOpt.GetFontSize(0));
+ aSize2NF.SetValue(rHtmlOpt.GetFontSize(1));
+ aSize3NF.SetValue(rHtmlOpt.GetFontSize(2));
+ aSize4NF.SetValue(rHtmlOpt.GetFontSize(3));
+ aSize5NF.SetValue(rHtmlOpt.GetFontSize(4));
+ aSize6NF.SetValue(rHtmlOpt.GetFontSize(5));
+ aSize7NF.SetValue(rHtmlOpt.GetFontSize(6));
+ aNumbersEnglishUSCB.Check(rHtmlOpt.IsNumbersEnglishUS());
+ aUnknownTagCB.Check(rHtmlOpt.IsImportUnknown());
+ aIgnoreFontNamesCB.Check(rHtmlOpt.IsIgnoreFontFamily());
+ sal_uInt16 nExport = rHtmlOpt.GetExportMode();
if( nExport >= SAL_N_ELEMENTS( aExportToPosArr ) )
nExport = 4; // default for bad config entry is NS 4.0
sal_uInt16 nPosArr = aExportToPosArr[ nExport ];
@@ -194,11 +194,11 @@ void OfaHtmlTabPage::Reset( const SfxItemSet& )
ExportHdl_Impl(&aExportLB);
- aStarBasicCB .Check(pHtmlOpt->IsStarBasic());
- aStarBasicWarningCB .Check(pHtmlOpt->IsStarBasicWarning());
+ aStarBasicCB .Check(rHtmlOpt.IsStarBasic());
+ aStarBasicWarningCB .Check(rHtmlOpt.IsStarBasicWarning());
aStarBasicWarningCB.Enable(!aStarBasicCB.IsChecked());
- aSaveGrfLocalCB.Check(pHtmlOpt->IsSaveGraphicsLocal());
- aPrintExtensionCB.Check(pHtmlOpt->IsPrintLayoutExtension());
+ aSaveGrfLocalCB.Check(rHtmlOpt.IsSaveGraphicsLocal());
+ aPrintExtensionCB.Check(rHtmlOpt.IsPrintLayoutExtension());
aPrintExtensionCB.SaveValue();
aStarBasicCB .SaveValue();
@@ -215,9 +215,9 @@ void OfaHtmlTabPage::Reset( const SfxItemSet& )
aUnknownTagCB.SaveValue();
aIgnoreFontNamesCB.SaveValue();
- if( !pHtmlOpt->IsDefaultTextEncoding() &&
- aCharSetLB.GetSelectTextEncoding() != pHtmlOpt->GetTextEncoding() )
- aCharSetLB.SelectTextEncoding( pHtmlOpt->GetTextEncoding() );
+ if( !rHtmlOpt.IsDefaultTextEncoding() &&
+ aCharSetLB.GetSelectTextEncoding() != rHtmlOpt.GetTextEncoding() )
+ aCharSetLB.SelectTextEncoding( rHtmlOpt.GetTextEncoding() );
}
IMPL_LINK(OfaHtmlTabPage, ExportHdl_Impl, ListBox*, pBox)
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index cf63dc133674..4b80409e2f36 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -635,413 +635,6 @@ IMPL_LINK( SvxProxyTabPage, LoseFocusHdl_Impl, Edit *, pEdit )
}
-/********************************************************************/
-/* */
-/* SvxSearchTabPage */
-/* */
-/********************************************************************/
-
-SvxSearchTabPage::SvxSearchTabPage(Window* pParent, const SfxItemSet& rSet ) :
-
- SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_INET_SEARCH ), rSet ),
-
- aSearchGB ( this, CUI_RES( GB_SEARCH ) ),
- aSearchLB ( this, CUI_RES( LB_SEARCH ) ),
- aSearchNameFT ( this, CUI_RES( FT_SEARCH_NAME ) ),
- aSearchNameED ( this, CUI_RES( ED_SEARCH_NAME ) ),
- aSearchFT ( this, CUI_RES( FT_SEARCH ) ),
- aAndRB ( this, CUI_RES( RB_AND ) ),
- aOrRB ( this, CUI_RES( RB_OR ) ),
- aExactRB ( this, CUI_RES( RB_EXACT ) ),
-
- aURLFT ( this, CUI_RES( FT_URL ) ),
- aURLED ( this, CUI_RES( ED_URL ) ),
-
- aPostFixFT ( this, CUI_RES( FT_POSTFIX ) ),
- aPostFixED ( this, CUI_RES( ED_POSTFIX ) ),
- aSeparatorFT ( this, CUI_RES( FT_SEPARATOR ) ),
- aSeparatorED ( this, CUI_RES( ED_SEPARATOR ) ),
- aCaseFT ( this, CUI_RES( FT_CASE ) ),
- aCaseED ( this, CUI_RES( ED_CASE ) ),
-
- aNewPB ( this, CUI_RES( PB_NEW ) ),
- aAddPB ( this, CUI_RES( PB_ADD ) ),
- aChangePB ( this, CUI_RES( PB_CHANGE ) ),
- aDeletePB ( this, CUI_RES( PB_DELETE ) ),
-
- sModifyMsg(CUI_RES(MSG_MODIFY))
-{
- FreeResource();
-
- SetExchangeSupport();
- aCaseED.SelectEntryPos(0); // falls kein Eintrag vorhanden ist, kann es sonst "Arger geben
-
- aNewPB.SetClickHdl(LINK( this, SvxSearchTabPage, NewSearchHdl_Impl ) );
- aAddPB.SetClickHdl(LINK( this, SvxSearchTabPage, AddSearchHdl_Impl ) );
- aChangePB.SetClickHdl(LINK( this, SvxSearchTabPage, ChangeSearchHdl_Impl ) );
- aDeletePB.SetClickHdl(LINK( this, SvxSearchTabPage, DeleteSearchHdl_Impl ) );
- aSearchLB.SetSelectHdl(LINK( this, SvxSearchTabPage, SearchEntryHdl_Impl ) );
-
- Link aLink = LINK( this, SvxSearchTabPage, SearchModifyHdl_Impl );
- aSearchNameED.SetModifyHdl( aLink );
- aURLED.SetModifyHdl( aLink );
- aSeparatorED.SetModifyHdl( aLink );
- aPostFixED.SetModifyHdl( aLink );
- aCaseED.SetSelectHdl( aLink );
-
- aLink = LINK( this, SvxSearchTabPage, SearchPartHdl_Impl );
- aAndRB.SetClickHdl( aLink );
- aOrRB.SetClickHdl( aLink );
- aExactRB.SetClickHdl( aLink );
-
- InitControls_Impl();
-}
-
-// -----------------------------------------------------------------------
-SvxSearchTabPage::~SvxSearchTabPage()
-{
-}
-// -----------------------------------------------------------------------
-
-SfxTabPage* SvxSearchTabPage::Create(Window* pParent, const SfxItemSet& rAttrSet )
-{
- return new SvxSearchTabPage(pParent, rAttrSet);
-}
-
-// -----------------------------------------------------------------------
-
-void SvxSearchTabPage::Reset( const SfxItemSet& )
-{
- //The two lines below are moved here from the last part of this method
- aChangePB.Disable();
- aAddPB.Disable();
-
- sal_uInt16 nCount = aSearchConfig.Count();
- aSearchLB.Clear();
- for(sal_uInt16 i = 0; i < nCount; i++)
- {
- const SvxSearchEngineData& rData = aSearchConfig.GetData(i);
- aSearchLB.InsertEntry(rData.sEngineName);
- }
-
- if ( nCount )
- {
- aSearchLB.SelectEntryPos(0);
- SearchEntryHdl_Impl( &aSearchLB );
- }
- else
- aDeletePB.Disable();
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool SvxSearchTabPage::FillItemSet( SfxItemSet& )
-{
- if(aSearchConfig.IsModified())
- aSearchConfig.Commit();
- return sal_True;
-}
-/*--------------------------------------------------------------------*/
-
-void SvxSearchTabPage::ActivatePage( const SfxItemSet& )
-{
-}
-
-/*--------------------------------------------------------------------*/
-
-int SvxSearchTabPage::DeactivatePage( SfxItemSet* _pSet )
-{
- if(!ConfirmLeave(String()))
- return KEEP_PAGE;
-
- if ( _pSet )
- FillItemSet( *_pSet );
- return LEAVE_PAGE;
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool SvxSearchTabPage::ConfirmLeave( const String& rStringSelection)
-{
- if(aChangePB.IsEnabled())
- {
- QueryBox aQuery(this, WB_YES_NO_CANCEL|WB_DEF_YES, sModifyMsg);
- sal_uInt16 nRet = aQuery.Execute();
- if(RET_CANCEL == nRet)
- {
- if(rStringSelection.Len())
- aSearchLB.SelectEntry(sLastSelectedEntry);
- return sal_False;
- }
- else if(RET_YES == nRet)
- {
- sal_uInt16 nEntryPos = aSearchLB.GetEntryPos( aSearchNameED.GetText() );
- if ( nEntryPos != LISTBOX_ENTRY_NOTFOUND )
- aSearchLB.SelectEntryPos(nEntryPos);
- else
- aSearchLB.SetNoSelection();
- ChangeSearchHdl_Impl(0);
- if(rStringSelection.Len())
- aSearchLB.SelectEntry(rStringSelection);
- }
- else if(RET_NO == nRet)
- {
- aChangePB.Enable(sal_False);
- aAddPB.Enable(sal_False);
- SearchEntryHdl_Impl(&aSearchLB);
- }
- }
- if(aAddPB.IsEnabled())
- {
- QueryBox aQuery(this, WB_YES_NO_CANCEL|WB_DEF_YES, sModifyMsg);
- sal_uInt16 nRet = aQuery.Execute();
- if(RET_CANCEL == nRet)
- {
- aSearchLB.SetNoSelection();
- return sal_False;
- }
- else if(RET_YES == nRet)
- {
- aSearchLB.SetNoSelection();
- AddSearchHdl_Impl(0);
- if(rStringSelection.Len())
- aSearchLB.SelectEntry(rStringSelection);
- }
- else if(RET_NO == nRet)
- {
- aAddPB.Enable(sal_False);
- aChangePB.Enable(sal_False);
- NewSearchHdl_Impl(0);
- }
-
- }
- return sal_True;
-}
-
-// -----------------------------------------------------------------------
-
-void SvxSearchTabPage::InitControls_Impl()
-{
- // detect longest label text
- sal_Int32 i = 0;
- long nLabelTextWidth = 0;
- Window* pLabels[] = { &aSearchNameFT, &aSearchFT, &aURLFT, &aPostFixFT, &aSeparatorFT, &aCaseFT };
- Window** pLabel = pLabels;
- const sal_Int32 nLabelCount = SAL_N_ELEMENTS( pLabels );
- for ( ; i < nLabelCount; ++i, ++pLabel )
- {
- long nTemp = (*pLabel)->GetCtrlTextWidth( (*pLabel)->GetText() );
- if ( nTemp > nLabelTextWidth )
- nLabelTextWidth = nTemp;
- }
-
- // resize all labels
- nLabelTextWidth = nLabelTextWidth * 120 / 100; // additional space looks better
- const long nLabelWidth = aSearchNameFT.GetSizePixel().Width();
- const long nDelta = nLabelWidth - nLabelTextWidth;
- pLabel = pLabels;
- for ( i = 0; i < nLabelCount; ++i, ++pLabel )
- {
- Size aNewSize = (*pLabel)->GetSizePixel();
- aNewSize.Width() += nDelta;
- (*pLabel)->SetSizePixel( aNewSize );
- }
-
- // resize and move the edits
- Window* pEdits[] = { &aSearchNameED, &aAndRB, &aOrRB,
- &aExactRB, &aURLED, &aPostFixED, &aSeparatorED, &aCaseED };
- Window** pEdit = pEdits;
- const sal_Int32 nCCount = SAL_N_ELEMENTS( pEdits );
- for ( i = 0; i < nCCount; ++i, ++pEdit )
- {
- Point aNewPos = (*pEdit)->GetPosPixel();
- aNewPos.X() -= nDelta;
- Size aNewSize = (*pEdit)->GetSizePixel();
- if ( (*pEdit) != &aSeparatorED && (*pEdit) != &aCaseED )
- aNewSize.Width() += nDelta;
- (*pEdit)->SetPosSizePixel( aNewPos, aNewSize );
- }
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( SvxSearchTabPage, NewSearchHdl_Impl, PushButton *, EMPTYARG )
-{
- SearchEntryHdl_Impl(&aSearchLB);
- if(aChangePB.IsEnabled() || aAddPB.IsEnabled())
- return 0;
- aSearchNameED.SetText( String() );
- aSearchLB.SetNoSelection();
- aCurrentSrchData = SvxSearchEngineData();
- aAndRB.Check( sal_True );
- SearchEntryHdl_Impl( &aSearchLB );
- SearchPartHdl_Impl( &aAndRB );
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( SvxSearchTabPage, AddSearchHdl_Impl, PushButton *, EMPTYARG )
-{
- aAddPB.Enable(sal_False);
- aChangePB.Enable(sal_False);
- aCurrentSrchData.sEngineName = aSearchNameED.GetText();
- aSearchConfig.SetData(aCurrentSrchData);
- aSearchLB.InsertEntry( aCurrentSrchData.sEngineName );
- aSearchLB.SelectEntry( aCurrentSrchData.sEngineName );
- SearchEntryHdl_Impl( &aSearchLB );
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( SvxSearchTabPage, ChangeSearchHdl_Impl, PushButton *, EMPTYARG )
-{
- aChangePB.Enable(sal_False);
- aAddPB.Enable(sal_False);
- sal_uInt16 nPos = aSearchLB.GetSelectEntryPos();
- if ( nPos != LISTBOX_ENTRY_NOTFOUND )
- {
- String sEngine = aSearchLB.GetSelectEntry();
- aCurrentSrchData.sEngineName = sEngine;
- aSearchConfig.SetData(aCurrentSrchData);
- aSearchLB.SelectEntry(sEngine);
- SearchEntryHdl_Impl(&aSearchLB);
- }
- else
- {
- SetUpdateMode(sal_False);
- String sEntry = aSearchNameED.GetText();
- // im AddHdl wird sLastSelectedEntry umgesetzt
- String sTemp(sLastSelectedEntry);
- AddSearchHdl_Impl(0);
- aSearchLB.SelectEntry(sTemp);
- DeleteSearchHdl_Impl(0);
- aSearchLB.SelectEntry(sEntry);
- SearchEntryHdl_Impl(&aSearchLB);
- SetUpdateMode(sal_True);
- }
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( SvxSearchTabPage, DeleteSearchHdl_Impl, PushButton *, EMPTYARG)
-{
- aChangePB.Enable(sal_False);
- sal_uInt16 nPos = aSearchLB.GetSelectEntryPos();
- DBG_ASSERT(nPos != LISTBOX_ENTRY_NOTFOUND, "kein Eintrag selektiert!");
- aSearchConfig.RemoveData(aSearchLB.GetSelectEntry());
- aSearchLB.RemoveEntry(nPos);
- aSearchLB.SelectEntryPos(0);
- SearchEntryHdl_Impl(&aSearchLB);
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( SvxSearchTabPage, SearchEntryHdl_Impl, ListBox*, pBox )
-{
- sal_uInt16 nEntryPos = pBox->GetSelectEntryPos();
- if ( nEntryPos != LISTBOX_ENTRY_NOTFOUND )
- {
- String sSelection(pBox->GetSelectEntry());
- if(!ConfirmLeave(sSelection))
- return 0;
-
- const SvxSearchEngineData* pData = aSearchConfig.GetData(sSelection);
- DBG_ASSERT(pData, "SearchEngine not available");
- if(pData)
- {
- aSearchNameED.SetText(sSelection);
- sLastSelectedEntry = sSelection;
- sal_Bool bAnd = aAndRB.IsChecked();
- sal_Bool bOr = aOrRB.IsChecked();
-
- aURLED.SetText(bAnd ? pData->sAndPrefix : bOr ? pData->sOrPrefix : pData->sExactPrefix);
- aSeparatorED.SetText( bAnd ? pData->sAndSeparator : bOr ? pData->sOrSeparator : pData->sExactSeparator);
- aPostFixED.SetText(bAnd ? pData->sAndSuffix : bOr ? pData->sOrSuffix : pData->sExactSuffix );
- sal_Int32 nCase = bAnd ? pData->nAndCaseMatch : bOr ? pData->nOrCaseMatch : pData->nExactCaseMatch;
- aCaseED.SelectEntryPos( (sal_uInt16)nCase );
- aCurrentSrchData = *pData;
- }
- aDeletePB.Enable();
- }
- else
- {
- aDeletePB.Enable(sal_False);
- sLastSelectedEntry.Erase();
- }
- aChangePB.Enable(sal_False);
- aAddPB.Enable(sal_False);
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( SvxSearchTabPage, SearchModifyHdl_Impl, SvxNoSpaceEdit*, pEdit )
-{
- if ( pEdit == &aSearchNameED )
- {
- sal_Bool bTextLen = ( 0 != pEdit->GetText().Len() );
- sal_Bool bFound = sal_False;
- if ( bTextLen )
- {
- sal_uInt16 nEntryPos = aSearchLB.GetEntryPos( pEdit->GetText() );
- bFound = ( nEntryPos != LISTBOX_ENTRY_NOTFOUND );
- if ( bFound )
- aSearchLB.SelectEntryPos(nEntryPos);
- else
- aSearchLB.SetNoSelection();
- }
- aChangePB.Enable( sLastSelectedEntry.Len() > 0 );
- aDeletePB.Enable(bFound);
- aAddPB.Enable(bTextLen && !bFound);
- }
- else
- {
- if ( aSearchLB.GetSelectEntryCount() && sLastSelectedEntry.Len() > 0 )
- aChangePB.Enable();
-
- if(aAndRB.IsChecked())
- {
- aCurrentSrchData.sAndPrefix = aURLED.GetText();
- aCurrentSrchData.sAndSeparator = aSeparatorED.GetText();
- aCurrentSrchData.sAndSuffix = aPostFixED.GetText();
- aCurrentSrchData.nAndCaseMatch = aCaseED.GetSelectEntryPos();
- }
- else if(aOrRB.IsChecked())
- {
- aCurrentSrchData.sOrPrefix = aURLED.GetText();
- aCurrentSrchData.sOrSeparator = aSeparatorED.GetText();
- aCurrentSrchData.sOrSuffix = aPostFixED.GetText();
- aCurrentSrchData.nOrCaseMatch = aCaseED.GetSelectEntryPos();
- }
- else
- {
- aCurrentSrchData.sExactPrefix = aURLED.GetText();
- aCurrentSrchData.sExactSeparator = aSeparatorED.GetText();
- aCurrentSrchData.sExactSuffix = aPostFixED.GetText();
- aCurrentSrchData.nExactCaseMatch = aCaseED.GetSelectEntryPos();
- }
- }
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( SvxSearchTabPage, SearchPartHdl_Impl, RadioButton *, EMPTYARG )
-{
- sal_Bool bAnd = aAndRB.IsChecked();
- sal_Bool bOr = aOrRB.IsChecked();
-
- aURLED.SetText(bAnd ? aCurrentSrchData.sAndPrefix : bOr ? aCurrentSrchData.sOrPrefix : aCurrentSrchData.sExactPrefix);
- aSeparatorED.SetText( bAnd ? aCurrentSrchData.sAndSeparator : bOr ? aCurrentSrchData.sOrSeparator : aCurrentSrchData.sExactSeparator);
- aPostFixED.SetText(bAnd ? aCurrentSrchData.sAndSuffix : bOr ? aCurrentSrchData.sOrSuffix : aCurrentSrchData.sExactSuffix );
- sal_Int32 nCase = bAnd ? aCurrentSrchData.nAndCaseMatch : bOr ? aCurrentSrchData.nOrCaseMatch : aCurrentSrchData.nExactCaseMatch;
- aCaseED.SelectEntryPos( (sal_uInt16)nCase );
- return 0;
-}
//#98647#----------------------------------------------
void SvxScriptExecListBox::RequestHelp( const HelpEvent& rHEvt )
diff --git a/cui/source/options/optinet2.hrc b/cui/source/options/optinet2.hrc
index 1bd09225ac9b..34dce4fca5de 100755
--- a/cui/source/options/optinet2.hrc
+++ b/cui/source/options/optinet2.hrc
@@ -56,29 +56,6 @@
#define FT_HTTPS_PORT 15
#define ED_HTTPS_PORT 15
-// Search ------------------------------------------------------------------
-#define GB_SEARCH 40
-#define LB_SEARCH 40
-#define FT_SEARCH_NAME 41
-#define ED_SEARCH_NAME 41
-#define FT_SEARCH 42
-#define RB_AND 43
-#define RB_OR 44
-#define RB_EXACT 45
-#define FT_URL 46
-#define ED_URL 46
-#define FT_POSTFIX 47
-#define ED_POSTFIX 47
-#define FT_SEPARATOR 48
-#define ED_SEPARATOR 48
-#define FT_CASE 49
-#define ED_CASE 49
-#define PB_CHANGE 53
-#define PB_DELETE 54
-#define PB_ADD 55
-#define PB_NEW 56
-#define MSG_MODIFY 57
-
// Protocols --------------------------------------------------------------
#define GB_DNS 105
#define RB_DNS_AUTO 106
diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx
index 751fb00f40cd..15dc1f892885 100644
--- a/cui/source/options/optinet2.hxx
+++ b/cui/source/options/optinet2.hxx
@@ -51,13 +51,8 @@ class SvtInetOptions;
#ifndef SV_NODIALOG
#define PROXY_CONTROLS 23
#define CACHE_CONTROLS 20
-#define INET_SEARCH 19
-#if defined(OS2)
-#define TYPE_CONTROLS 20
-#else
#define TYPE_CONTROLS 18
-#endif
namespace svx {
class SecurityOptionsDialog;
@@ -147,70 +142,6 @@ public:
virtual void Reset( const SfxItemSet& rSet );
};
-// class SvxSearchTabPage ------------------------------------------------
-class SvxSearchConfig;
-class SvxSearchTabPage : public SfxTabPage
-{
- using TabPage::ActivatePage;
- using TabPage::DeactivatePage;
-
-private:
- FixedLine aSearchGB;
- ListBox aSearchLB;
- FixedText aSearchNameFT;
- SvxNoSpaceEdit aSearchNameED;
-
- FixedText aSearchFT;
- RadioButton aAndRB;
- RadioButton aOrRB;
- RadioButton aExactRB;
-
- FixedText aURLFT;
- SvxNoSpaceEdit aURLED;
-
- FixedText aPostFixFT;
- SvxNoSpaceEdit aPostFixED;
- FixedText aSeparatorFT;
- SvxNoSpaceEdit aSeparatorED;
- FixedText aCaseFT;
- ListBox aCaseED;
-
- PushButton aNewPB;
- PushButton aAddPB;
- PushButton aChangePB;
- PushButton aDeletePB;
-
- String sLastSelectedEntry;
- String sModifyMsg;
-
- SvxSearchConfig aSearchConfig;
- SvxSearchEngineData aCurrentSrchData;
-
-#ifdef _SVX_OPTINET2_CXX
- void InitControls_Impl();
-
- DECL_LINK( NewSearchHdl_Impl, PushButton * );
- DECL_LINK( AddSearchHdl_Impl, PushButton * );
- DECL_LINK( ChangeSearchHdl_Impl, PushButton * );
- DECL_LINK( DeleteSearchHdl_Impl, PushButton * );
- DECL_LINK( SearchEntryHdl_Impl, ListBox * );
- DECL_LINK( SearchModifyHdl_Impl, SvxNoSpaceEdit * );
- DECL_LINK( SearchPartHdl_Impl, RadioButton * );
-#endif
-
- virtual void ActivatePage( const SfxItemSet& rSet );
- virtual int DeactivatePage( SfxItemSet* pSet = 0 );
- sal_Bool ConfirmLeave( const String& rStringSelection );
-
- SvxSearchTabPage( Window* pParent, const SfxItemSet& rSet );
- virtual ~SvxSearchTabPage();
-
-public:
- static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
- virtual sal_Bool FillItemSet( SfxItemSet& rSet );
- virtual void Reset( const SfxItemSet& rSet );
-};
-
// #98647# class SvxScriptExecListBox ------------------------------------
class SvxScriptExecListBox : public ListBox
{ // for adding tooltips to ListBox
diff --git a/cui/source/options/optinet2.src b/cui/source/options/optinet2.src
index ad77c8d33bd9..64a3662a5087 100644
--- a/cui/source/options/optinet2.src
+++ b/cui/source/options/optinet2.src
@@ -274,172 +274,6 @@ TabPage RID_SVXPAGE_INET_PROXY
Text [ en-US ] = "is not a valid entry for this field. Please specify a value between 1 and 255." ;
};
};
-/************************************************************************/
-/* */
-/* Suche */
-/* */
-/************************************************************************/
-TabPage RID_SVXPAGE_INET_SEARCH
-{
- HelpId = HID_OPTIONS_SEARCH ;
- OutputSize = TRUE ;
- Size = MAP_APPFONT ( 260 , 185 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- Text [ en-US ] = "Search" ;
-
- #define GB_SEARCH_LEFT 6
- #define GB_SEARCH_TOP 3
- FixedLine GB_SEARCH
- {
- Pos = MAP_APPFONT ( GB_SEARCH_LEFT , GB_SEARCH_TOP ) ;
- Size = MAP_APPFONT ( 248 , 8 ) ;
- Text [ en-US ] = "Search in" ;
- };
- ListBox LB_SEARCH
- {
- HelpID = "cui:ListBox:RID_SVXPAGE_INET_SEARCH:LB_SEARCH";
- Pos = MAP_APPFONT ( 12 , GB_SEARCH_TOP + 11 ) ;
- Size = MAP_APPFONT ( 39 , 120 ) ;
- Border = TRUE ;
- AutoHScroll = TRUE;
- };
- #define LABEL_START_XPOS (GB_SEARCH_LEFT + 6 + 39 + 5 )
- #define LABEL_LEN 64
- #define EDIT_START_XPOS (LABEL_START_XPOS + LABEL_LEN + 3)
- FixedText FT_SEARCH_NAME
- {
- Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 13 ) ;
- Size = MAP_APPFONT ( LABEL_LEN , 8 ) ;
- Text [ en-US ] = "~Name" ;
- };
- Edit ED_SEARCH_NAME
- {
- HelpID = "cui:Edit:RID_SVXPAGE_INET_SEARCH:ED_SEARCH_NAME";
- Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 11 ) ;
- Size = MAP_APPFONT ( 125 , 12 ) ;
- Border = TRUE ;
- };
- FixedText FT_SEARCH
- {
- Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 27 ) ;
- Size = MAP_APPFONT ( LABEL_LEN , 8 ) ;
- Text [ en-US ] = "Type" ;
- };
- RadioButton RB_AND
- {
- HelpID = "cui:RadioButton:RID_SVXPAGE_INET_SEARCH:RB_AND";
- Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 26 ) ;
- Size = MAP_APPFONT ( 125 , 10 ) ;
- Check = TRUE ;
- Text [ en-US ] = "And" ;
- };
- RadioButton RB_OR
- {
- HelpID = "cui:RadioButton:RID_SVXPAGE_INET_SEARCH:RB_OR";
- Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 39 ) ;
- Size = MAP_APPFONT ( 125 , 10 ) ;
- Text [ en-US ] = "~Or" ;
- };
- RadioButton RB_EXACT
- {
- HelpID = "cui:RadioButton:RID_SVXPAGE_INET_SEARCH:RB_EXACT";
- Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 52 ) ;
- Size = MAP_APPFONT ( 125 , 10 ) ;
- Text [ en-US ] = "E~xact" ;
- };
- FixedText FT_URL
- {
- Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 67 ) ;
- Size = MAP_APPFONT ( LABEL_LEN , 8 ) ;
- Text [ en-US ] = "~Prefix" ;
- };
- Edit ED_URL
- {
- HelpID = "cui:Edit:RID_SVXPAGE_INET_SEARCH:ED_URL";
- Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 65 ) ;
- Size = MAP_APPFONT ( 125 , 12 ) ;
- Border = TRUE ;
- };
- FixedText FT_POSTFIX
- {
- Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 82 ) ;
- Size = MAP_APPFONT ( LABEL_LEN , 8 ) ;
- Text [ en-US ] = "Su~ffix" ;
- };
- Edit ED_POSTFIX
- {
- HelpID = "cui:Edit:RID_SVXPAGE_INET_SEARCH:ED_POSTFIX";
- Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 80 ) ;
- Size = MAP_APPFONT ( 125 , 12 ) ;
- Border = TRUE ;
- };
- FixedText FT_SEPARATOR
- {
- Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 97 ) ;
- Size = MAP_APPFONT ( LABEL_LEN , 8 ) ;
- Text [ en-US ] = "~Separator" ;
- };
- Edit ED_SEPARATOR
- {
- HelpID = "cui:Edit:RID_SVXPAGE_INET_SEARCH:ED_SEPARATOR";
- Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 95 ) ;
- Size = MAP_APPFONT ( 42 , 12 ) ;
- Border = TRUE ;
- };
- FixedText FT_CASE
- {
- Pos = MAP_APPFONT ( LABEL_START_XPOS, GB_SEARCH_TOP + 112 ) ;
- Size = MAP_APPFONT ( LABEL_LEN , 8 ) ;
- Text [ en-US ] = "~Case match" ;
- };
- ListBox ED_CASE
- {
- HelpID = "cui:ListBox:RID_SVXPAGE_INET_SEARCH:ED_CASE";
- Pos = MAP_APPFONT ( EDIT_START_XPOS, GB_SEARCH_TOP + 110 ) ;
- Size = MAP_APPFONT ( 42 , 48 ) ;
- Border = TRUE ;
- DropDown = TRUE ;
- StringList [ en-US ] =
- {
- < "None" ; > ;
- < "Upper" ; > ;
- < "Lower" ; > ;
- };
- };
- PushButton PB_NEW
- {
- HelpID = "cui:PushButton:RID_SVXPAGE_INET_SEARCH:PB_NEW";
- Pos = MAP_APPFONT ( 39 , GB_SEARCH_TOP + 131 + 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Text [ en-US ] = "N~ew";
- };
- PushButton PB_ADD
- {
- HelpID = "cui:PushButton:RID_SVXPAGE_INET_SEARCH:PB_ADD";
- Pos = MAP_APPFONT ( 92 , GB_SEARCH_TOP + 131 + 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Text [ en-US ] = "~Add" ;
- };
- PushButton PB_CHANGE
- {
- HelpID = "cui:PushButton:RID_SVXPAGE_INET_SEARCH:PB_CHANGE";
- Pos = MAP_APPFONT ( 145 , GB_SEARCH_TOP + 131 + 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Text [ en-US ] = "~Modify" ;
- };
- PushButton PB_DELETE
- {
- HelpID = "cui:PushButton:RID_SVXPAGE_INET_SEARCH:PB_DELETE";
- Pos = MAP_APPFONT ( 198 , GB_SEARCH_TOP + 131 + 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Text [ en-US ] = "~Delete" ;
- };
- String MSG_MODIFY
- {
- Text [ en-US ] = "Do you want to accept the current modification?";
- };
-};
/************************************************************************/
diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx
index beb0d062d60e..164661a7b773 100644
--- a/cui/source/options/optmemory.cxx
+++ b/cui/source/options/optmemory.cxx
@@ -149,8 +149,8 @@ OfaMemoryOptionsPage::OfaMemoryOptionsPage(Window* pParent, const SfxItemSet& rS
#endif
FreeResource();
- //quick launch only available in Win and OS/2
-#if !defined(WNT) && !defined(OS2) && !defined(ENABLE_GTK)
+ //quick launch only available in Win
+#if !defined(WNT) && !defined(ENABLE_GTK)
aQuickLaunchFL.Hide();
aQuickLaunchCB.Hide();
#endif
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 45119573c5da..c6b87d000bcd 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -35,7 +35,6 @@
#include <sfx2/app.hxx>
#include <svl/aeitem.hxx>
#include <svtools/svtabbx.hxx>
-#include <svtools/filedlg.hxx>
#include <tools/config.hxx>
#include <tools/urlobj.hxx>
#include <vcl/svapp.hxx>
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index df99ea8f597f..e914524dc597 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -544,7 +544,6 @@ IMPL_LINK( SfxSaveTabPage, AutoClickHdl_Impl, CheckBox *, pBox )
{
aAutoSaveEdit.Enable();
aMinuteFT.Enable();
- aAutoSaveEdit.GrabFocus();
}
else
{
@@ -558,20 +557,13 @@ IMPL_LINK( SfxSaveTabPage, AutoClickHdl_Impl, CheckBox *, pBox )
OUString lcl_ExtracUIName(const Sequence<PropertyValue> rProperties)
{
OUString sRet;
- sal_Int32 nFlags;
const PropertyValue* pProperties = rProperties.getConstArray();
for(int nProp = 0; nProp < rProperties.getLength(); nProp++)
{
if(!pProperties[nProp].Name.compareToAscii("UIName"))
{
pProperties[nProp].Value >>= sRet;
- }
- else if(!pProperties[nProp].Name.compareToAscii("Flags"))
- {
- if ( pProperties[nProp].Value >>= nFlags )
- {
- nFlags &= 0x100;
- }
+ break;
}
else if(!pProperties[nProp].Name.compareToAscii("Name"))
{
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index a025fcaf790d..d8909c4bdde1 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -346,7 +346,6 @@ SfxTabPage* CreateGeneralTabPage( sal_uInt16 nId, Window* pParent, const SfxItem
case RID_SVXPAGE_ASIAN_LAYOUT: fnCreate = &SvxAsianLayoutPage::Create; break;
case RID_SVX_FONT_SUBSTITUTION: fnCreate = &SvxFontSubstTabPage::Create; break;
case RID_SVXPAGE_INET_PROXY: fnCreate = &SvxProxyTabPage::Create; break;
- case RID_SVXPAGE_INET_SEARCH: fnCreate = &SvxSearchTabPage::Create; break;
case RID_SVXPAGE_INET_SECURITY: fnCreate = &SvxSecurityTabPage::Create; break;
case RID_SVXPAGE_INET_MAIL: fnCreate = &SvxEMailTabPage::Create; break;
case RID_SVXPAGE_COLORCONFIG: fnCreate = &SvxColorOptionsTabPage::Create; break;
@@ -405,7 +404,6 @@ static OptionsMapping_Impl const OptionsMap_Impl[] =
{ "LanguageSettings", "ComplexTextLayout", RID_SVXPAGE_OPTIONS_CTL },
{ "Internet", NULL, SID_INET_DLG },
{ "Internet", "Proxy", RID_SVXPAGE_INET_PROXY },
- { "Internet", "Search", RID_SVXPAGE_INET_SEARCH },
{ "Internet", "Email", RID_SVXPAGE_INET_MAIL },
{ "Internet", "MozillaPlugin", RID_SVXPAGE_INET_MOZPLUGIN },
{ "LoadSave", NULL, SID_FILTER_DLG },
@@ -1168,7 +1166,7 @@ IMPL_LINK( OfaTreeOptionsDialog, SelectHdl_Impl, Timer*, EMPTYARG )
if ( SfxViewFrame::Current() && SfxViewFrame::Current()->GetDispatcher() )
pPtr = (const OfaPtrItem*)SfxViewFrame::Current()->
GetDispatcher()->Execute( SID_GET_COLORTABLE, SFX_CALLMODE_SYNCHRON );
- pColorTab = pPtr ? (XColorTable*)pPtr->GetValue() : XColorTable::GetStdColorTable();
+ pColorTab = pPtr ? (XColorTable*)pPtr->GetValue() : &XColorTable::GetStdColorTable();
rColPage.SetColorTable( pColorTab );
rColPage.SetPageType( &nUnknownType );
diff --git a/cui/source/options/treeopt.src b/cui/source/options/treeopt.src
index f4429608b291..39b70689349b 100644
--- a/cui/source/options/treeopt.src
+++ b/cui/source/options/treeopt.src
@@ -119,7 +119,7 @@ ModalDialog RID_OFADLG_OPTIONS_TREE
{
< "This dialog is used to define general settings when working with %PRODUCTNAME. Enter your personal data, the defaults to be used when saving documents, and paths to important files. These settings will be saved automatically and used in later sessions as well."; SID_GENERAL_OPTIONS; > ;
< "This is where you make settings concerning language and writing aids for your work with %PRODUCTNAME."; SID_LANGUAGE_OPTIONS; > ;
- < "This is where you configure %PRODUCTNAME for the Internet. You can define search engines or save your proxy settings." ; SID_INET_DLG; > ;
+ < "This is where you configure %PRODUCTNAME for the Internet. You can save your proxy settings." ; SID_INET_DLG; > ;
< "This is where you specify various settings for text documents. These settings determine how your text documents are handled in %PRODUCTNAME and are valid for all new %PRODUCTNAME Writer documents. You can also define a few settings for the active text document if you save it afterwards." ; SID_SW_EDITOPTIONS; > ;
< "This is where you define the basic settings for %PRODUCTNAME documents in HTML format. For example, you decide which contents should be displayed on the screen or printed, how the pages are scrolled on the screen, in which color keywords are highlighted in the source text and much more." ; SID_SW_ONLINEOPTIONS; > ;
< "This is where you define various global settings for spreadsheets. For example, you can define which contents should be displayed and in which direction the cursor will move after you enter data in a cell. You also define sort lists, the number of the decimal places displayed, etc." ; SID_SC_EDITOPTIONS; > ;
@@ -184,7 +184,6 @@ Resource RID_OFADLG_OPTIONS_TREE_PAGES
{
< "Internet" ; 0; > ;
< "Proxy" ; RID_SVXPAGE_INET_PROXY; > ;
- < "Search" ; RID_SVXPAGE_INET_SEARCH; > ;
< "E-mail" ; RID_SVXPAGE_INET_MAIL; > ;
< "Browser Plug-in" ; RID_SVXPAGE_INET_MOZPLUGIN; > ;
};
@@ -237,6 +236,7 @@ Resource RID_OFADLG_OPTIONS_TREE_PAGES
{
< "%PRODUCTNAME Calc" ; 0; > ;
< "General" ; SID_SC_TP_LAYOUT ;> ;
+ < "Defaults" ; RID_SC_TP_DEFAULTS ;> ;
< "View" ; SID_SC_TP_CONTENT ;> ;
< "International" ; RID_OFA_TP_INTERNATIONAL ;> ;
< "Calculate" ; SID_SC_TP_CALC ;> ;
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 1df841d22ae1..f6f0ee48d4fe 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -117,7 +117,7 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(Window* pParent, const SfxItemSet* _pSet ) :
else
{
// remove smart tag tab page if no extensions are installed
- SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
+ SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags();
if ( !pOpt || !pOpt->pSmartTagMgr || 0 == pOpt->pSmartTagMgr->NumberOfRecognizers() )
RemoveTabPage(RID_OFAPAGE_SMARTTAG_OPTIONS);
@@ -230,7 +230,7 @@ SfxTabPage* OfaAutocorrOptionsPage::Create( Window* pParent,
sal_Bool OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& )
{
- SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
+ SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
long nFlags = pAutoCorrect->GetFlags();
sal_uInt16 nPos = 0;
@@ -246,9 +246,9 @@ sal_Bool OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& )
sal_Bool bReturn = nFlags != pAutoCorrect->GetFlags();
if(bReturn )
{
- SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
- pCfg->SetModified();
- pCfg->Commit();
+ SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get();
+ rCfg.SetModified();
+ rCfg.Commit();
}
return bReturn;
}
@@ -260,7 +260,7 @@ void OfaAutocorrOptionsPage::ActivatePage( const SfxItemSet& )
void OfaAutocorrOptionsPage::Reset( const SfxItemSet& )
{
- SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
+ SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
const long nFlags = pAutoCorrect->GetFlags();
aCheckLB.SetUpdateMode(sal_False);
@@ -546,7 +546,7 @@ SfxTabPage* OfaSwAutoFmtOptionsPage::Create( Window* pParent,
sal_Bool OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& )
{
sal_Bool bModified = sal_False;
- SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
+ SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags();
long nFlags = pAutoCorrect->GetFlags();
@@ -651,9 +651,9 @@ sal_Bool OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& )
if(bModified || nFlags != pAutoCorrect->GetFlags())
{
- SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
- pCfg->SetModified();
- pCfg->Commit();
+ SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get();
+ rCfg.SetModified();
+ rCfg.Commit();
}
return sal_True;
@@ -671,7 +671,7 @@ void OfaSwAutoFmtOptionsPage::ActivatePage( const SfxItemSet& )
void OfaSwAutoFmtOptionsPage::Reset( const SfxItemSet& )
{
- SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
+ SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags();
const long nFlags = pAutoCorrect->GetFlags();
@@ -1023,7 +1023,7 @@ int OfaAutocorrReplacePage::DeactivatePage( SfxItemSet* )
sal_Bool OfaAutocorrReplacePage::FillItemSet( SfxItemSet& )
{
- SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
+ SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
DoubleStringArrayPtr pDoubleStringArray = aDoubleStringTable.Last();
while(pDoubleStringArray)
{
@@ -1222,7 +1222,7 @@ void OfaAutocorrReplacePage::RefillReplaceBox(sal_Bool bFromReset,
}
else
{
- SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
+ SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
SvxAutocorrWordList* pWordList = pAutoCorrect->LoadAutocorrWordList(eLang);
for(sal_uInt16 i = 0; i < pWordList->Count(); i++)
@@ -1572,7 +1572,7 @@ int OfaAutocorrExceptPage::DeactivatePage( SfxItemSet* )
sal_Bool OfaAutocorrExceptPage::FillItemSet( SfxItemSet& )
{
- SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
+ SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
StringsArraysPtr pArrays = aStringsTable.Last();
while(pArrays)
{
@@ -1753,7 +1753,7 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(sal_Bool bFromReset,
}
else
{
- SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
+ SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
const SvStringsISortDtor* pCplList = pAutoCorrect->GetCplSttExceptList(eLang);
const SvStringsISortDtor* pWrdList = pAutoCorrect->GetWrdSttExceptList(eLang);
sal_uInt16 i;
@@ -1770,7 +1770,7 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(sal_Bool bFromReset,
void OfaAutocorrExceptPage::Reset( const SfxItemSet& )
{
- SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
+ SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
RefillReplaceBoxes(sal_True, eLang, eLang);
aAutoAbbrevCB. Check( pAutoCorrect->IsAutoCorrFlag( SaveWordCplSttLst ));
aAutoCapsCB. Check( pAutoCorrect->IsAutoCorrFlag( SaveWordWrdSttLst ));
@@ -2004,7 +2004,7 @@ SfxTabPage* OfaQuoteTabPage::Create( Window* pParent,
sal_Bool OfaQuoteTabPage::FillItemSet( SfxItemSet& )
{
- SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
+ SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
long nFlags = pAutoCorrect->GetFlags();
@@ -2063,9 +2063,9 @@ sal_Bool OfaQuoteTabPage::FillItemSet( SfxItemSet& )
if( bModified || bReturn )
{
- SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
- pCfg->SetModified();
- pCfg->Commit();
+ SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get();
+ rCfg.SetModified();
+ rCfg.Commit();
}
return bReturn;
}
@@ -2077,7 +2077,7 @@ void OfaQuoteTabPage::ActivatePage( const SfxItemSet& )
void OfaQuoteTabPage::Reset( const SfxItemSet& )
{
- SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
+ SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
const long nFlags = pAutoCorrect->GetFlags();
// Initialize the Sw options
@@ -2153,7 +2153,7 @@ IMPL_LINK( OfaQuoteTabPage, QuoteHdl, PushButton*, pBtn )
LANGUAGE_ENGLISH_US, DEFAULTFONT_FLAGS_ONLYONE, 0 ));
pMap->SetText(nMode < SGL_END ? sStartQuoteDlg : sEndQuoteDlg );
sal_UCS4 cDlg;
- SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
+ SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
LanguageType eLang = Application::GetSettings().GetLanguage();
switch( nMode )
{
@@ -2319,7 +2319,7 @@ SfxTabPage* OfaAutoCompleteTabPage::Create( Window* pParent,
sal_Bool OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& )
{
sal_Bool bModified = sal_False, bCheck;
- SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
+ SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags();
sal_uInt16 nVal;
@@ -2362,16 +2362,16 @@ sal_Bool OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& )
}
if( bModified )
{
- SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
- pCfg->SetModified();
- pCfg->Commit();
+ SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get();
+ rCfg.SetModified();
+ rCfg.Commit();
}
return sal_True;
}
void OfaAutoCompleteTabPage::Reset( const SfxItemSet& )
{
- SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
+ SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags();
aCBActiv.Check( 0 != pOpt->bAutoCompleteWords );
@@ -2676,7 +2676,7 @@ IMPL_LINK(OfaSmartTagOptionsTabPage, SelectHdl, SvxCheckListBox*, EMPTYARG)
*/
sal_Bool OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& )
{
- SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
+ SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags();
SmartTagMgr* pSmartTagMgr = pOpt->pSmartTagMgr;
@@ -2719,7 +2719,7 @@ sal_Bool OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& )
*/
void OfaSmartTagOptionsTabPage::Reset( const SfxItemSet& )
{
- SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
+ SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags();
const SmartTagMgr* pSmartTagMgr = pOpt->pSmartTagMgr;
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 87a0a6a01efe..517ae4c0bfcc 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -207,302 +207,20 @@ SvxCharBasePage::~SvxCharBasePage()
// -----------------------------------------------------------------------
-//void SvxCharBasePage::SetPrevFontAttributes( const SfxItemSet& rSet )
void SvxCharBasePage::ActivatePage( const SfxItemSet& rSet )
{
- SvxFont& rFont = GetPreviewFont();
- SvxFont& rCJKFont = GetPreviewCJKFont();
- SvxFont& rCTLFont = GetPreviewCTLFont();
- sal_uInt16 nWhich;
-
- nWhich = GetWhich( SID_CHAR_DLG_PREVIEW_STRING );
- if( ISITEMSET )
- {
- const SfxStringItem& rItem = ( SfxStringItem& ) rSet.Get( nWhich );
- ::rtl::OUString aString = rItem.GetValue();
- if( aString.getLength() != 0 )
- m_aPreviewWin.SetPreviewText( aString );
- else
- m_aPreviewWin.SetFontNameAsPreviewText();
- }
-
- // Underline
- FontUnderline eUnderline;
- nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE );
- if( ISITEMSET )
- {
- const SvxUnderlineItem& rItem = ( SvxUnderlineItem& ) rSet.Get( nWhich );
- eUnderline = ( FontUnderline ) rItem.GetValue();
- m_aPreviewWin.SetTextLineColor( rItem.GetColor() );
- }
- else
- eUnderline = UNDERLINE_NONE;
-
- rFont.SetUnderline( eUnderline );
- rCJKFont.SetUnderline( eUnderline );
- rCTLFont.SetUnderline( eUnderline );
-
- // Overline
- FontUnderline eOverline;
- nWhich = GetWhich( SID_ATTR_CHAR_OVERLINE );
- if( ISITEMSET )
- {
- const SvxOverlineItem& rItem = ( SvxOverlineItem& ) rSet.Get( nWhich );
- eOverline = ( FontUnderline ) rItem.GetValue();
- m_aPreviewWin.SetOverlineColor( rItem.GetColor() );
- }
- else
- eOverline = UNDERLINE_NONE;
-
- rFont.SetOverline( eOverline );
- rCJKFont.SetOverline( eOverline );
- rCTLFont.SetOverline( eOverline );
-
- // Strikeout
- FontStrikeout eStrikeout;
- nWhich = GetWhich( SID_ATTR_CHAR_STRIKEOUT );
- if( ISITEMSET )
- {
- const SvxCrossedOutItem& rItem = ( SvxCrossedOutItem& ) rSet.Get( nWhich );
- eStrikeout = ( FontStrikeout ) rItem.GetValue();
- }
- else
- eStrikeout = STRIKEOUT_NONE;
-
- rFont.SetStrikeout( eStrikeout );
- rCJKFont.SetStrikeout( eStrikeout );
- rCTLFont.SetStrikeout( eStrikeout );
-
- // WordLineMode
- nWhich = GetWhich( SID_ATTR_CHAR_WORDLINEMODE );
- if( ISITEMSET )
- {
- const SvxWordLineModeItem& rItem = ( SvxWordLineModeItem& ) rSet.Get( nWhich );
- rFont.SetWordLineMode( rItem.GetValue() );
- rCJKFont.SetWordLineMode( rItem.GetValue() );
- rCTLFont.SetWordLineMode( rItem.GetValue() );
- }
-
- // Emphasis
- nWhich = GetWhich( SID_ATTR_CHAR_EMPHASISMARK );
- if( ISITEMSET )
- {
- const SvxEmphasisMarkItem& rItem = ( SvxEmphasisMarkItem& ) rSet.Get( nWhich );
- FontEmphasisMark eMark = rItem.GetEmphasisMark();
- rFont.SetEmphasisMark( eMark );
- rCJKFont.SetEmphasisMark( eMark );
- rCTLFont.SetEmphasisMark( eMark );
- }
-
- // Relief
- nWhich = GetWhich( SID_ATTR_CHAR_RELIEF );
- if( ISITEMSET )
- {
- const SvxCharReliefItem& rItem = ( SvxCharReliefItem& ) rSet.Get( nWhich );
- FontRelief eFontRelief = ( FontRelief ) rItem.GetValue();
- rFont.SetRelief( eFontRelief );
- rCJKFont.SetRelief( eFontRelief );
- rCTLFont.SetRelief( eFontRelief );
- }
-
- // Effects
- nWhich = GetWhich( SID_ATTR_CHAR_CASEMAP );
- if( ISITEMSET )
- {
- const SvxCaseMapItem& rItem = ( SvxCaseMapItem& ) rSet.Get( nWhich );
- SvxCaseMap eCaseMap = ( SvxCaseMap ) rItem.GetValue();
- rFont.SetCaseMap( eCaseMap );
- rCJKFont.SetCaseMap( eCaseMap );
- // #i78474# small caps do not exist in CTL fonts
- rCTLFont.SetCaseMap( eCaseMap == SVX_CASEMAP_KAPITAELCHEN ? SVX_CASEMAP_NOT_MAPPED : eCaseMap );
- }
-
- // Outline
- nWhich = GetWhich( SID_ATTR_CHAR_CONTOUR );
- if( ISITEMSET )
- {
- const SvxContourItem& rItem = ( SvxContourItem& ) rSet.Get( nWhich );
- sal_Bool bOutline = rItem.GetValue();
- rFont.SetOutline( bOutline );
- rCJKFont.SetOutline( bOutline );
- rCTLFont.SetOutline( bOutline );
- }
-
- // Shadow
- nWhich = GetWhich( SID_ATTR_CHAR_SHADOWED );
- if( ISITEMSET )
- {
- const SvxShadowedItem& rItem = ( SvxShadowedItem& ) rSet.Get( nWhich );
- sal_Bool bShadow = rItem.GetValue();
- rFont.SetShadow( bShadow );
- rCJKFont.SetShadow( bShadow );
- rCTLFont.SetShadow( bShadow );
- }
-
- // Background
- sal_Bool bTransparent;
- nWhich = GetWhich( m_bPreviewBackgroundToCharacter ? SID_ATTR_BRUSH : SID_ATTR_BRUSH_CHAR );
- if( ISITEMSET )
- {
- const SvxBrushItem& rBrush = ( SvxBrushItem& ) rSet.Get( nWhich );
- const Color& rColor = rBrush.GetColor();
- bTransparent = rColor.GetTransparency() > 0;
- rFont.SetFillColor( rColor );
- rCJKFont.SetFillColor( rColor );
- rCTLFont.SetFillColor( rColor );
- }
- else
- bTransparent = sal_True;
-
- rFont.SetTransparent( bTransparent );
- rCJKFont.SetTransparent( bTransparent );
- rCTLFont.SetTransparent( bTransparent );
-
- Color aBackCol( COL_TRANSPARENT );
- if( !m_bPreviewBackgroundToCharacter )
- {
- nWhich = GetWhich( SID_ATTR_BRUSH );
- if( ISITEMSET )
- {
- const SvxBrushItem& rBrush = ( SvxBrushItem& ) rSet.Get( nWhich );
- if( GPOS_NONE == rBrush.GetGraphicPos() )
- aBackCol = rBrush.GetColor();
- }
- }
- m_aPreviewWin.SetBackColor( aBackCol );
-
- // Font
- SetPrevFont( rSet, SID_ATTR_CHAR_FONT, rFont );
- SetPrevFont( rSet, SID_ATTR_CHAR_CJK_FONT, rCJKFont );
- SetPrevFont( rSet, SID_ATTR_CHAR_CTL_FONT, rCTLFont );
-
- // Style
- SetPrevFontStyle( rSet, SID_ATTR_CHAR_POSTURE, SID_ATTR_CHAR_WEIGHT, rFont );
- SetPrevFontStyle( rSet, SID_ATTR_CHAR_CJK_POSTURE, SID_ATTR_CHAR_CJK_WEIGHT, rCJKFont );
- SetPrevFontStyle( rSet, SID_ATTR_CHAR_CTL_POSTURE, SID_ATTR_CHAR_CTL_WEIGHT, rCTLFont );
-
- // Size
- SetPrevFontSize( rSet, SID_ATTR_CHAR_FONTHEIGHT, rFont );
- SetPrevFontSize( rSet, SID_ATTR_CHAR_CJK_FONTHEIGHT, rCJKFont );
- SetPrevFontSize( rSet, SID_ATTR_CHAR_CTL_FONTHEIGHT, rCTLFont );
-
- // Color
- nWhich = GetWhich( SID_ATTR_CHAR_COLOR );
- if( ISITEMSET )
- {
- const SvxColorItem& rItem = ( SvxColorItem& ) rSet.Get( nWhich );
- Color aCol( rItem.GetValue() );
- rFont.SetColor( aCol );
- rCJKFont.SetColor( aCol );
- rCTLFont.SetColor( aCol );
-
- m_aPreviewWin.AutoCorrectFontColor(); // handle color COL_AUTO
- }
-
- // Kerning
- nWhich = GetWhich( SID_ATTR_CHAR_KERNING );
- if( ISITEMSET )
- {
- const SvxKerningItem& rItem = ( SvxKerningItem& ) rSet.Get( nWhich );
- short nKern = ( short )
- LogicToLogic( rItem.GetValue(), ( MapUnit ) rSet.GetPool()->GetMetric( nWhich ), MAP_TWIP );
- rFont.SetFixKerning( nKern );
- rCJKFont.SetFixKerning( nKern );
- rCTLFont.SetFixKerning( nKern );
- }
-
- // Escapement
- nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT );
- const sal_uInt8 nProp = 100;
- short nEsc;
- sal_uInt8 nEscProp;
- if( ISITEMSET )
- {
- const SvxEscapementItem& rItem = ( SvxEscapementItem& ) rSet.Get( nWhich );
- nEsc = rItem.GetEsc();
- nEscProp = rItem.GetProp();
-
- if( nEsc == DFLT_ESC_AUTO_SUPER )
- nEsc = DFLT_ESC_SUPER;
- else if( nEsc == DFLT_ESC_AUTO_SUB )
- nEsc = DFLT_ESC_SUB;
- }
- else
- {
- nEsc = 0;
- nEscProp = 100;
- }
-
- SetPrevFontEscapement( nProp, nEscProp, nEsc );
-
- // Font width scale
- SetPrevFontWidthScale( rSet );
-
- m_aPreviewWin.Invalidate();
+ m_aPreviewWin.SetFromItemSet( rSet, m_bPreviewBackgroundToCharacter );
}
-// -----------------------------------------------------------------------
-
-void SvxCharBasePage::SetPrevFontSize( const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont )
-{
- sal_uInt16 nWhich = GetWhich( nSlot );
- long nH;
- if( rSet.GetItemState( nWhich ) >= SFX_ITEM_SET )
- {
- nH = LogicToLogic( ( ( SvxFontHeightItem& ) rSet.Get( nWhich ) ).GetHeight(),
- ( MapUnit ) rSet.GetPool()->GetMetric( nWhich ),
- MAP_TWIP );
- }
- else
- nH = 240; // as default 12pt
-
- rFont.SetSize( Size( 0, nH ) );
-}
-
-// -----------------------------------------------------------------------
-
-void SvxCharBasePage::SetPrevFont( const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont )
-{
- sal_uInt16 nWhich = GetWhich( nSlot );
- if( ISITEMSET )
- {
- const SvxFontItem& rFontItem = ( SvxFontItem& ) rSet.Get( nWhich );
- rFont.SetFamily( rFontItem.GetFamily() );
- rFont.SetName( rFontItem.GetFamilyName() );
- rFont.SetPitch( rFontItem.GetPitch() );
- rFont.SetCharSet( rFontItem.GetCharSet() );
- rFont.SetStyleName( rFontItem.GetStyleName() );
- }
-}
-
-// -----------------------------------------------------------------------
-
-void SvxCharBasePage::SetPrevFontStyle( const SfxItemSet& rSet, sal_uInt16 nPosture, sal_uInt16 nWeight, SvxFont& rFont )
-{
- sal_uInt16 nWhich = GetWhich( nPosture );
- if( ISITEMSET )
- {
- const SvxPostureItem& rItem = ( SvxPostureItem& ) rSet.Get( nWhich );
- rFont.SetItalic( ( FontItalic ) rItem.GetValue() != ITALIC_NONE ? ITALIC_NORMAL : ITALIC_NONE );
- }
-
- nWhich = GetWhich( nWeight );
- if( ISITEMSET )
- {
- SvxWeightItem& rItem = ( SvxWeightItem& ) rSet.Get( nWhich );
- rFont.SetWeight( ( FontWeight ) rItem.GetValue() != WEIGHT_NORMAL ? WEIGHT_BOLD : WEIGHT_NORMAL );
- }
-}
// -----------------------------------------------------------------------
void SvxCharBasePage::SetPrevFontWidthScale( const SfxItemSet& rSet )
{
- sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH );
+ sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH );
if( ISITEMSET )
{
- const SvxCharScaleWidthItem& rItem = ( SvxCharScaleWidthItem& ) rSet.Get( nWhich );
-
+ const SvxCharScaleWidthItem &rItem = ( SvxCharScaleWidthItem& ) rSet.Get( nWhich );
m_aPreviewWin.SetFontWidthScale( rItem.GetValue() );
}
}
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 5586714da17d..42cde8c17fb2 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -3586,13 +3586,10 @@ void SvxNumOptionsTabPage::PageCreated(SfxAllItemSet aSet)
if (pListItem)
{
ListBox& myCharFmtLB = GetCharFmtListBox();
- const List *pList = (pListItem)->GetList();
- sal_uInt32 nCount = pList->Count();;
+ const std::vector<String> &aList = (pListItem)->GetList();
+ sal_uInt32 nCount = aList.size();;
for(sal_uInt32 i = 0; i < nCount; i++)
- {
- myCharFmtLB.InsertEntry(*(const String*)(pList->GetObject(i)) );
-
- }
+ myCharFmtLB.InsertEntry(aList[i]);
}
if (pMetricItem)
SetMetric(static_cast<FieldUnit>(pMetricItem->GetValue()));
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index ef1fff0de271..59977eba1251 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -560,11 +560,6 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet )
bool bOrientationSupport =
pImpl->mpDefPrinter->HasSupport( SUPPORT_SET_ORIENTATION );
-#ifdef OS2
- // unter OS/2 wird bei HasSupport() immer sal_True returned
- // aber nur als Dummy, deshalb FALSE
- bOrientationSupport = sal_False;
-#endif
if ( !bOrientationSupport &&
aPaperSize.Width() > aPaperSize.Height() )
@@ -1645,13 +1640,13 @@ IMPL_LINK_INLINE_END( SvxPageDescPage, CenterHdl_Impl, CheckBox *, EMPTYARG )
// -----------------------------------------------------------------------
-void SvxPageDescPage::SetCollectionList(const List* pList)
+void SvxPageDescPage::SetCollectionList(const std::vector<String> &aList)
{
- sStandardRegister = *(String*)pList->GetObject(0);
- for( sal_uInt16 i = 1; i < pList->Count(); i++ )
- {
- aRegisterLB.InsertEntry(*(String*)pList->GetObject(i));
- }
+ OSL_ENSURE(!aList.empty(), "Empty string list");
+
+ sStandardRegister = aList[0];
+ for( sal_uInt16 i = 1; i < aList.size(); i++ )
+ aRegisterLB.InsertEntry(aList[i]);
aRegisterCB .Show();
aRegisterFT .Show();
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 2b5e57e5d8bd..2b44a9ebd136 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -266,12 +266,11 @@ SvxLineTabPage::~SvxLineTabPage()
if(pSymbolList)
delete aSymbolMB.GetPopupMenu()->GetPopupMenu( MN_SYMBOLS );
- SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)aGrfBrushItems.First();
- while( pInfo )
+ for ( size_t i = 0, n = aGrfBrushItems.size(); i < n; ++i )
{
+ SvxBmpItemInfo* pInfo = aGrfBrushItems[ i ];
delete pInfo->pBrushItem;
delete pInfo;
- pInfo = (SvxBmpItemInfo*)aGrfBrushItems.Next();
}
}
void SvxLineTabPage::Construct()
@@ -1485,7 +1484,11 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton )
SvxBmpItemInfo* pInfo = new SvxBmpItemInfo();
pInfo->pBrushItem = pBrushItem;
pInfo->nItemId = (sal_uInt16)(MN_GALLERY_ENTRY + i);
- aGrfBrushItems.Insert(pInfo, i);
+ if ( i < aGrfBrushItems.size() ) {
+ aGrfBrushItems.insert( aGrfBrushItems.begin() + i, pInfo );
+ } else {
+ aGrfBrushItems.push_back( pInfo );
+ }
const Graphic* pGraphic = pBrushItem->GetGraphic();
if(pGraphic)
@@ -1564,7 +1567,11 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton )
SvxBmpItemInfo* pInfo = new SvxBmpItemInfo();
pInfo->pBrushItem = pBrushItem;
pInfo->nItemId = (sal_uInt16)(MN_GALLERY_ENTRY + i + nNumMenuGalleryItems);
- aGrfBrushItems.Insert(pInfo, nNumMenuGalleryItems + i);
+ if ( (size_t)(nNumMenuGalleryItems + i) < aGrfBrushItems.size() ) {
+ aGrfBrushItems.insert( aGrfBrushItems.begin() + nNumMenuGalleryItems + i, pInfo );
+ } else {
+ aGrfBrushItems.push_back( pInfo );
+ }
Size aSize(aBitmap.GetSizePixel());
if(aSize.Width() > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT)
@@ -1596,9 +1603,9 @@ IMPL_STATIC_LINK(SvxLineTabPage, GraphicArrivedHdl_Impl, SvxBrushItem*, pItem)
PopupMenu* pPopup = pThis->aSymbolMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY );
SvxBmpItemInfo* pBmpInfo = 0;
- for ( sal_uInt16 i = 0; i < pThis->aGrfBrushItems.Count(); i++ )
+ for ( size_t i = 0; i < pThis->aGrfBrushItems.size(); i++ )
{
- SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)pThis->aGrfBrushItems.GetObject(i);
+ SvxBmpItemInfo* pInfo = pThis->aGrfBrushItems[ i ];
if( pInfo->pBrushItem == pItem )
{
pBmpInfo = pInfo; break;
@@ -1650,7 +1657,7 @@ IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton )
nSymbolType=SVX_SYMBOLTYPE_BRUSHITEM;
bResetSize = sal_True;
}
- SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)aGrfBrushItems.GetObject(nItemId - MN_GALLERY_ENTRY);
+ SvxBmpItemInfo* pInfo = aGrfBrushItems[ nItemId - MN_GALLERY_ENTRY ];
pGraphic = pInfo->pBrushItem->GetGraphic();
}
else switch(nItemId)