summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r--sfx2/source/dialog/about.cxx89
-rw-r--r--sfx2/source/dialog/alienwarn.cxx5
-rw-r--r--sfx2/source/dialog/basedlgs.cxx4
-rw-r--r--sfx2/source/dialog/dialog.hrc2
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx53
-rwxr-xr-x[-rw-r--r--]sfx2/source/dialog/dinfdlg.src5
-rw-r--r--sfx2/source/dialog/dinfedt.cxx2
-rw-r--r--sfx2/source/dialog/dockwin.cxx21
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx88
-rw-r--r--sfx2/source/dialog/filedlghelper.src5
-rw-r--r--sfx2/source/dialog/filedlgimpl.hxx2
-rw-r--r--sfx2/source/dialog/filtergrouping.cxx20
-rw-r--r--sfx2/source/dialog/filtergrouping.hxx2
-rw-r--r--sfx2/source/dialog/intro.cxx5
-rw-r--r--sfx2/source/dialog/itemconnect.cxx2
-rw-r--r--sfx2/source/dialog/mailmodel.cxx72
-rw-r--r--sfx2/source/dialog/mgetempl.cxx25
-rw-r--r--sfx2/source/dialog/navigat.cxx5
-rw-r--r--sfx2/source/dialog/newstyle.cxx4
-rw-r--r--sfx2/source/dialog/partwnd.cxx4
-rw-r--r--sfx2/source/dialog/passwd.cxx24
-rw-r--r--sfx2/source/dialog/passwd.hrc1
-rw-r--r--sfx2/source/dialog/passwd.src16
-rw-r--r--sfx2/source/dialog/printopt.cxx73
-rw-r--r--sfx2/source/dialog/recfloat.cxx5
-rw-r--r--sfx2/source/dialog/recfloat.src1
-rwxr-xr-xsfx2/source/dialog/sfxdlg.cxx7
-rw-r--r--sfx2/source/dialog/splitwin.cxx13
-rw-r--r--sfx2/source/dialog/srchdlg.cxx2
-rw-r--r--sfx2/source/dialog/styfitem.cxx49
-rw-r--r--sfx2/source/dialog/styledlg.cxx5
-rw-r--r--sfx2/source/dialog/tabdlg.cxx26
-rw-r--r--sfx2/source/dialog/taskpane.src47
-rw-r--r--sfx2/source/dialog/templdlg.cxx193
-rw-r--r--sfx2/source/dialog/templdlg.src15
-rw-r--r--sfx2/source/dialog/titledockwin.src39
-rw-r--r--sfx2/source/dialog/tplcitem.cxx6
-rw-r--r--sfx2/source/dialog/tplpitem.cxx16
-rw-r--r--sfx2/source/dialog/versdlg.cxx59
39 files changed, 390 insertions, 622 deletions
diff --git a/sfx2/source/dialog/about.cxx b/sfx2/source/dialog/about.cxx
index 0d1ece34d4..e4bce1dc1b 100644
--- a/sfx2/source/dialog/about.cxx
+++ b/sfx2/source/dialog/about.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,14 +31,8 @@
// include ---------------------------------------------------------------
-#ifndef _SV_APP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
-#ifndef GCC
-#endif
#include <tools/stream.hxx>
#include <tools/urlobj.hxx>
@@ -57,16 +52,16 @@
#include <sfx2/sfxcommands.h>
#include "dialog.hrc"
+using namespace ::com::sun::star;
+
// defines ---------------------------------------------------------------
#define SCROLL_OFFSET 1
#define SPACE_OFFSET 5
#define SCROLL_TIMER 30
-#define WELCOME_URL DEFINE_CONST_UNICODE( "http://www.openoffice.org/welcome/credits.html" )
-
-// class AboutDialog -----------------------------------------------------
-static void layoutText( FixedInfo &rText, long &nY, long nTextWidth, Size a6Size )
+/** loads the application logo as used in the about dialog and impress slideshow pause screen */
+Image SfxApplication::GetApplicationLogo()
{
Point aTextPos = rText.GetPosPixel();
aTextPos.X() = a6Size.Width() * 2;
@@ -180,10 +175,15 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
SetFont( aFont );
// if necessary more info
- String sVersion = aVersionText.GetText();
+ String sVersion = aVersionTextStr;
sVersion.SearchAndReplaceAscii( "$(VER)", Application::GetDisplayName() );
sVersion += '\n';
sVersion += rVerStr;
+#ifdef BUILD_VER_STRING
+ String aBuildString( DEFINE_CONST_UNICODE( BUILD_VER_STRING ) );
+ sVersion += '\n';
+ sVersion += aBuildString;
+#endif
aVersionText.SetText( sVersion );
// Initialisierung fuer Aufruf Entwickler
@@ -196,7 +196,7 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
{
pPrevAccel = pAccel;
pAccel = new Accelerator;
- aAccelList.Insert( pAccel, LIST_APPEND );
+ aAccelList.push_back( pAccel );
USHORT nKey = aAccelStr.GetChar(i) - 'A' + KEY_A;
pAccel->InsertItem( 1, KeyCode( nKey, KEY_MOD1 ) );
if ( i > 0 )
@@ -221,26 +221,15 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
aVersionText.SetBackground();
aCopyrightText.SetBackground();
+ aInfoLink.SetURL( aLinkStr );
+ aInfoLink.SetBackground();
+ aInfoLink.SetClickHdl( LINK( this, AboutDialog, HandleHyperlink ) );
Color aTextColor( rSettings.GetWindowTextColor() );
aVersionText.SetControlForeground( aTextColor );
aCopyrightText.SetControlForeground( aTextColor );
- aBuildData.SetBackground( aWall );
-
- Font aSmallFont = rSettings.GetInfoFont();
- Size aSmaller = aNewFont.GetSize();
- aSmaller.Width() = (long) (aSmaller.Width() * 0.75);
- aSmaller.Height() = (long) (aSmaller.Height() * 0.75);
- aNewFont.SetSize( aSmaller );
- aBuildData.SetFont( aNewFont );
- aBuildData.SetBackground( aWall );
-#ifdef BUILD_VER_STRING
- String aBuildString( DEFINE_CONST_UNICODE( BUILD_VER_STRING ) );
-#else
- String aBuildString;
-#endif
- aBuildData.SetText( aBuildString );
- aBuildData.Show();
+
+ aCopyrightText.SetText( aCopyrightTextStr );
// determine size and position of the dialog & elements
Size aAppLogoSiz = aAppLogo.GetSizePixel();
@@ -290,16 +279,13 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
AboutDialog::~AboutDialog()
{
// L"oschen des Entwickleraufrufs
- if ( aAccelList.Count() )
+ if ( !aAccelList.empty() )
{
- GetpApp()->RemoveAccel( aAccelList.First() );
- Accelerator* pAccel = aAccelList.Last();
+ GetpApp()->RemoveAccel( aAccelList.front() );
- while ( pAccel )
- {
- delete pAccel;
- pAccel = aAccelList.Prev();
- }
+ for ( size_t i = 0, n = aAccelList.size(); i < n; ++i )
+ delete aAccelList[ i ];
+ aAccelList.clear();
}
}
@@ -340,6 +326,35 @@ IMPL_LINK( AboutDialog, AccelSelectHdl, Accelerator *, pAccelerator )
// -----------------------------------------------------------------------
+IMPL_LINK( AboutDialog, HandleHyperlink, svt::FixedHyperlink*, pHyperlink )
+{
+ rtl::OUString sURL=pHyperlink->GetURL();
+ rtl::OUString sTitle=GetText();
+
+ if ( ! sURL.getLength() ) // Nothing to do, when the URL is empty
+ return 1;
+ try
+ {
+ uno::Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute(
+ ::comphelper::getProcessServiceFactory()->createInstance(
+ DEFINE_CONST_UNICODE("com.sun.star.system.SystemShellExecute") ), uno::UNO_QUERY_THROW );
+ xSystemShellExecute->execute( sURL, rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::DEFAULTS );
+ }
+ catch ( uno::Exception& )
+ {
+ uno::Any exc( ::cppu::getCaughtException() );
+ rtl::OUString msg( ::comphelper::anyToString( exc ) );
+ const SolarMutexGuard guard;
+ ErrorBox aErrorBox( NULL, WB_OK, msg );
+ aErrorBox.SetText( sTitle );
+ aErrorBox.Execute();
+ }
+
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
BOOL AboutDialog::Close()
{
// stop Timer and finish the dialog
@@ -421,3 +436,5 @@ void AboutDialog::Paint( const Rectangle& rRect )
Close();
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx
index 601cd7dad5..14df5beece 100644
--- a/sfx2/source/dialog/alienwarn.cxx
+++ b/sfx2/source/dialog/alienwarn.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,6 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
+#include <sal/macros.h>
#include "alienwarn.hxx"
#include "sfx2/sfxresid.hxx"
#include <sfx2/sfxuno.hxx>
@@ -143,7 +145,7 @@ void SfxAlienWarningDialog::InitSize()
&m_aSaveODFBtn, &m_aKeepCurrentBtn, &m_aMoreInfoBtn, &m_aOptionLine, &m_aWarningOnBox
};
Window** pCurrent = pWins;
- for ( sal_uInt32 i = 0; i < sizeof( pWins ) / sizeof( pWins[ 0 ] ); ++i, ++pCurrent )
+ for ( sal_uInt32 i = 0; i < SAL_N_ELEMENTS( pWins ); ++i, ++pCurrent )
{
Point aNewPos = (*pCurrent)->GetPosPixel();
aNewPos.Y() -= nDelta;
@@ -175,3 +177,4 @@ void SfxAlienWarningDialog::InitSize()
m_aSaveODFBtn.SetPosSizePixel( aPos, aNewSize );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index edb58bb478..d5590dcb27 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,7 +56,7 @@
using namespace ::com::sun::star::uno;
using namespace ::rtl;
-#define USERITEM_NAME OUString::createFromAscii( "UserItem" )
+#define USERITEM_NAME OUString(RTL_CONSTASCII_USTRINGPARAM("UserItem"))
class SfxModelessDialog_Impl : public SfxListener
{
@@ -1057,3 +1058,4 @@ const sal_uInt16* SfxSingleTabDialog::GetInputRanges( const SfxItemPool& rPool )
return pRanges;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc
index 9664ff19ef..13aba81d3e 100644
--- a/sfx2/source/dialog/dialog.hrc
+++ b/sfx2/source/dialog/dialog.hrc
@@ -65,8 +65,6 @@
#define RID_ERRBOX_MAIL_CONFIG ( RC_DIALOG_BEGIN + 92 )
-#define IMG_LST_STYLE_DESIGNER_HC ( RC_DIALOG_BEGIN + 99 )
-
// 100-106 in tbxcust.hrc
#define STR_MACRO_LOSS ( RC_DIALOG_BEGIN + 107 )
#define STR_CANCEL_RECORDING ( RC_DIALOG_BEGIN + 108 )
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 6c596bea3d..49be693ba4 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,7 +68,6 @@
#include <sfx2/frame.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/request.hxx>
-//#include "exptypes.hxx"
#include "helper.hxx"
#include <sfx2/objsh.hxx>
#include <sfx2/docfile.hxx>
@@ -163,7 +163,8 @@ String CreateSizeText( ULONG nSize, BOOL bExtraBytes, BOOL bSmartExtraBytes )
fSize /= nGiga;
nDec = 3;
}
- const LocaleDataWrapper& rLocaleWrapper = SvtSysLocale().GetLocaleData();
+ const SvtSysLocale aSysLocale;
+ const LocaleDataWrapper& rLocaleWrapper = aSysLocale.GetLocaleData();
String aSizeStr( rLocaleWrapper.getNum( nSize1, 0 ) );
aSizeStr += aUnitStr;
if ( bExtraBytes && ( nSize1 < nSize2 ) )
@@ -402,7 +403,6 @@ void SfxDocumentInfoItem::UpdateDocumentInfo(
i_xDocProps->setAutoloadURL(::rtl::OUString());
}
i_xDocProps->setDefaultTarget(getDefaultTarget());
-// i_xDocProps->setTemplateName(getTemplateName());
i_xDocProps->setAuthor(getAuthor());
i_xDocProps->setCreationDate(getCreationDate());
i_xDocProps->setModifiedBy(getModifiedBy());
@@ -510,7 +510,7 @@ void SfxDocumentInfoItem::AddCustomProperty( const ::rtl::OUString& sName, const
m_aCustomProperties.push_back( pProp );
}
-sal_Bool SfxDocumentInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const
+bool SfxDocumentInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const
{
String aValue;
sal_Int32 nValue = 0;
@@ -568,15 +568,15 @@ sal_Bool SfxDocumentInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const
rVal <<= nValue;
else
rVal <<= bValue;
- return sal_True;
+ return true;
}
-sal_Bool SfxDocumentInfoItem::PutValue( const Any& rVal, BYTE nMemberId )
+bool SfxDocumentInfoItem::PutValue( const Any& rVal, BYTE nMemberId )
{
::rtl::OUString aValue;
sal_Int32 nValue=0;
sal_Bool bValue = sal_False;
- sal_Bool bRet = sal_False;
+ bool bRet = false;
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
{
@@ -633,7 +633,7 @@ sal_Bool SfxDocumentInfoItem::PutValue( const Any& rVal, BYTE nMemberId )
break;
default:
DBG_ERROR("Wrong MemberId!");
- return sal_False;
+ return false;
}
return bRet;
@@ -977,20 +977,6 @@ BOOL SfxDocumentPage::FillItemSet( SfxItemSet& rSet )
SfxDocumentInfoItem* pInfoItem = (SfxDocumentInfoItem*)pItem;
BOOL bUseData = ( STATE_CHECK == aUseUserDataCB.GetState() );
pInfoItem->SetUseUserData( bUseData );
-/*
- if ( !bUseData )
- {
- // "Benutzerdaten verwenden" ausgeschaltet ->
- // den Benutzer aus den Stamps l"oschen
- String aEmptyUser;
- aInfo.SetCreated(
- SfxStamp( aEmptyUser, aInfo.GetCreated().GetTime() ) );
- aInfo.SetChanged(
- SfxStamp( aEmptyUser, aInfo.GetChanged().GetTime() ) );
- aInfo.SetPrinted(
- SfxStamp( aEmptyUser, aInfo.GetPrinted().GetTime() ) );
- }
-*/
rSet.Put( SfxDocumentInfoItem( *pInfoItem ) );
bRet = TRUE;
}
@@ -1126,12 +1112,10 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet )
aCreateValFt.SetText( ConvertDateTime_Impl( pInfoItem->getAuthor(),
pInfoItem->getCreationDate(), aLocaleWrapper ) );
util::DateTime aTime( pInfoItem->getModificationDate() );
-// if ( aTime.IsValid() )
if ( aTime.Month > 0 )
aChangeValFt.SetText( ConvertDateTime_Impl(
pInfoItem->getModifiedBy(), aTime, aLocaleWrapper ) );
aTime = pInfoItem->getPrintDate();
-// if ( aTime.IsValid())
if ( aTime.Month > 0 )
aPrintValFt.SetText( ConvertDateTime_Impl( pInfoItem->getPrintedBy(),
aTime, aLocaleWrapper ) );
@@ -1196,10 +1180,10 @@ SfxInternetPage::SfxInternetPage( Window* pParent, const SfxItemSet& rItemSet )
{
pFrame->GetTargetList( aList );
- String* pObj;
- for( USHORT nPos = ( USHORT ) aList.Count() ; nPos ; )
+ String* pObj;
+ for( size_t nPos = aList.size() ; nPos ; )
{
- pObj = aList.GetObject( --nPos );
+ pObj = aList[ --nPos ];
aCBFrame.InsertEntry( *pObj );
delete pObj;
}
@@ -1776,8 +1760,7 @@ CustomPropertyLine::CustomPropertyLine( Window* pParent ) :
m_aTimeField.SetExtFormat( EXTTIMEF_24H_LONG );
m_aDateField.SetExtDateFormat( XTDATEF_SYSTEM_SHORT_YYYY );
- m_aRemoveButton.SetModeImage( SfxResId( SFX_IMG_PROPERTY_REMOVE ), BMP_COLOR_NORMAL );
- m_aRemoveButton.SetModeImage( SfxResId( SFX_IMG_PROPERTY_REMOVE_HC ), BMP_COLOR_HIGHCONTRAST );
+ m_aRemoveButton.SetModeImage( SfxResId( SFX_IMG_PROPERTY_REMOVE ) );
}
void CustomPropertyLine::SetRemoved()
@@ -2027,8 +2010,8 @@ void CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa
aSize.Width() = nWidth;
aPos.X() = aRect.getX() + ( nOffset / 2 );
m_aYesNoButton.SetPosSizePixel( aPos, aSize );
- aSize.Width() /= 2;
- aSize.Width() -= 2;
+ aSize.Width() /= 2;
+ aSize.Width() -= 2;
m_aDateField.SetPosSizePixel( aPos, aSize );
aPos.X() += aSize.Width() + 4;
m_aTimeField.SetPosSizePixel( aPos, aSize );
@@ -2102,7 +2085,7 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny )
SvtSysLocale aSysLocale;
const LocaleDataWrapper& rLocaleWrapper = aSysLocale.GetLocaleData();
pNewLine->m_aNameBox.SetText( sName );
- sal_Int32 nType = CUSTOM_TYPE_UNKNOWN;
+ sal_IntPtr nType = CUSTOM_TYPE_UNKNOWN;
String sValue;
if ( rAny >>= nTmpValue )
@@ -2125,7 +2108,7 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny )
else if ( rAny >>= aTmpDate )
{
nType = CUSTOM_TYPE_DATE;
- pNewLine->m_aDateField.SetDate( Date( aTmpDate.Day, aTmpDate.Month, aTmpDate.Year ) );
+ pNewLine->m_aDateField.SetDate( Date( aTmpDate.Day, aTmpDate.Month, aTmpDate.Year ) );
}
else if ( rAny >>= aTmpDuration )
@@ -2268,7 +2251,7 @@ Sequence< beans::PropertyValue > CustomPropertiesWindow::GetCustomProperties() c
{
Date aTmpDate = pLine->m_aDateField.GetDate();
Time aTmpTime = pLine->m_aTimeField.GetTime();
- util::DateTime aDateTime(aTmpTime.Get100Sec(), aTmpTime.GetSec(), aTmpTime.GetMin(), aTmpTime.GetHour(),
+ util::DateTime aDateTime(aTmpTime.Get100Sec(), aTmpTime.GetSec(), aTmpTime.GetMin(), aTmpTime.GetHour(),
aTmpDate.GetDay(), aTmpDate.GetMonth(), aTmpDate.GetYear() );
aPropertiesSeq[i].Value <<= aDateTime;
}
@@ -2343,7 +2326,6 @@ CustomPropertiesControl::CustomPropertiesControl( Window* pParent, const ResId&
Link aScrollLink = LINK( this, CustomPropertiesControl, ScrollHdl );
m_aVertScroll.SetScrollHdl( aScrollLink );
-// m_aVertScroll.SetEndScrollHdl( aScrollLink );
}
CustomPropertiesControl::~CustomPropertiesControl()
@@ -2464,3 +2446,4 @@ SfxTabPage* SfxCustomPropertiesPage::Create( Window* pParent, const SfxItemSet&
return new SfxCustomPropertiesPage( pParent, rItemSet );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src
index 9a45eac92d..17ec71c4fd 100644..100755
--- a/sfx2/source/dialog/dinfdlg.src
+++ b/sfx2/source/dialog/dinfdlg.src
@@ -705,11 +705,6 @@ Image SFX_IMG_PROPERTY_REMOVE
ImageBitmap = Bitmap { File = "deleterow.bmp" ; };
MaskColor = Color { Red=0xffff; Green=0x0000; Blue=0xffff; };
};
-Image SFX_IMG_PROPERTY_REMOVE_HC
-{
- ImageBitmap = Bitmap { File = "deleterow_h.bmp" ; };
- MaskColor = Color { Red=0xffff; Green=0x0000; Blue=0xffff; };
-};
QueryBox SFX_QB_WRONG_TYPE
{
diff --git a/sfx2/source/dialog/dinfedt.cxx b/sfx2/source/dialog/dinfedt.cxx
index 8281290e74..ea6db7fd3f 100644
--- a/sfx2/source/dialog/dinfedt.cxx
+++ b/sfx2/source/dialog/dinfedt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,3 +65,4 @@ SfxDocInfoEditDlg::SfxDocInfoEditDlg( Window* pParent ) :
FreeResource();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 36be016832..ef46c63ce9 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -104,9 +105,6 @@ namespace
};
}
-static uno::WeakReference< container::XNameAccess > m_xWindowStateConfiguration;
-static uno::WeakReference< frame::XModuleManager > m_xModuleManager;
-
static bool lcl_getWindowState( const uno::Reference< container::XNameAccess >& xWindowStateMgr, const ::rtl::OUString& rResourceURL, WindowState& rWindowState )
{
bool bResult = false;
@@ -120,7 +118,7 @@ static bool lcl_getWindowState( const uno::Reference< container::XNameAccess >&
{
for ( sal_Int32 n = 0; n < aWindowState.getLength(); n++ )
{
- if ( aWindowState[n].Name.equalsAscii( "UIName" ))
+ if ( aWindowState[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UIName" ) ))
{
aWindowState[n].Value >>= rWindowState.sTitle;
}
@@ -191,6 +189,8 @@ SfxDockingWrapper::SfxDockingWrapper( Window* pParentWnd ,
uno::UNO_QUERY );
}
+ static uno::WeakReference< frame::XModuleManager > m_xModuleManager;
+
uno::Reference< frame::XModuleManager > xModuleManager( m_xModuleManager );
if ( !xModuleManager.is() )
{
@@ -201,6 +201,8 @@ SfxDockingWrapper::SfxDockingWrapper( Window* pParentWnd ,
m_xModuleManager = xModuleManager;
}
+ static uno::WeakReference< container::XNameAccess > m_xWindowStateConfiguration;
+
uno::Reference< container::XNameAccess > xWindowStateConfiguration( m_xWindowStateConfiguration );
if ( !xWindowStateConfiguration.is() )
{
@@ -248,7 +250,8 @@ SfxDockingWrapper::SfxDockingWrapper( Window* pParentWnd ,
SfxChildWindow* SfxDockingWrapper::CreateImpl(
Window *pParent, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo* pInfo )
{
- SfxChildWindow *pWin = new SfxDockingWrapper(pParent, nId, pBindings, pInfo); return pWin;
+ SfxChildWindow *pWin = new SfxDockingWrapper(pParent, nId, pBindings, pInfo);
+ return pWin;
}
sal_uInt16 SfxDockingWrapper::GetChildWindowId ()
@@ -390,7 +393,7 @@ static SfxWorkWindow* lcl_getWorkWindowFromXFrame( const uno::Reference< frame::
*/
void SAL_CALL SfxDockingWindowFactory( const uno::Reference< frame::XFrame >& rFrame, const rtl::OUString& rDockingWindowName )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
USHORT nID = USHORT(rDockingWindowName.toInt32());
// Check the range of the provided ID otherwise nothing will happen
@@ -416,7 +419,7 @@ void SAL_CALL SfxDockingWindowFactory( const uno::Reference< frame::XFrame >& rF
*/
bool SAL_CALL IsDockingWindowVisible( const uno::Reference< frame::XFrame >& rFrame, const rtl::OUString& rDockingWindowName )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
USHORT nID = USHORT(rDockingWindowName.toInt32());
@@ -821,11 +824,8 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
BOOL bReArrange = FALSE;
- SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW;
if ( pImp->bSplitable )
{
- eIdent = SFX_CHILDWIN_SPLITWINDOW;
-
// Wenn sich das Alignment "andert und das Fenster befindet sich
// im angedockten Zustand in einem SplitWindow, mu\s umgemeldet werden
// Wenn neu angedockt wird, machen PrepareToggleFloatingMode()
@@ -2019,3 +2019,4 @@ IMPL_LINK( SfxDockingWindow, TimerHdl, Timer*, EMPTYARG)
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index fba909e74d..09545e479d 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,9 +64,9 @@
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/ucbhelper.hxx>
#include <unotools/localfilehelper.hxx>
-#include <vos/thread.hxx>
-#include <vos/mutex.hxx>
-#include <vos/security.hxx>
+#include <osl/mutex.hxx>
+#include <osl/security.hxx>
+#include <osl/thread.hxx>
#include <vcl/cvtgrf.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/mnemonic.hxx>
@@ -154,35 +155,35 @@ String DecodeSpaces_Impl( const String& rSource );
// ------------------------------------------------------------------------
void SAL_CALL FileDialogHelper_Impl::fileSelectionChanged( const FilePickerEvent& aEvent ) throw ( RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
mpAntiImpl->FileSelectionChanged( aEvent );
}
// ------------------------------------------------------------------------
void SAL_CALL FileDialogHelper_Impl::directoryChanged( const FilePickerEvent& aEvent ) throw ( RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
mpAntiImpl->DirectoryChanged( aEvent );
}
// ------------------------------------------------------------------------
OUString SAL_CALL FileDialogHelper_Impl::helpRequested( const FilePickerEvent& aEvent ) throw ( RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
return mpAntiImpl->HelpRequested( aEvent );
}
// ------------------------------------------------------------------------
void SAL_CALL FileDialogHelper_Impl::controlStateChanged( const FilePickerEvent& aEvent ) throw ( RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
mpAntiImpl->ControlStateChanged( aEvent );
}
// ------------------------------------------------------------------------
void SAL_CALL FileDialogHelper_Impl::dialogSizeChanged() throw ( RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
mpAntiImpl->DialogSizeChanged();
}
@@ -191,7 +192,7 @@ void SAL_CALL FileDialogHelper_Impl::dialogSizeChanged() throw ( RuntimeExceptio
// ------------------------------------------------------------------------
void SAL_CALL FileDialogHelper_Impl::dialogClosed( const DialogClosedEvent& _rEvent ) throw ( RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
mpAntiImpl->DialogClosed( _rEvent );
postExecute( _rEvent.DialogResult );
}
@@ -314,7 +315,7 @@ void FileDialogHelper_Impl::handleDialogSizeChanged()
// ------------------------------------------------------------------------
void SAL_CALL FileDialogHelper_Impl::disposing( const EventObject& ) throw ( RuntimeException )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
dispose();
}
@@ -530,7 +531,7 @@ void FileDialogHelper_Impl::updateSelectionBox()
Sequence< ::rtl::OUString > aCtrlList = xCtrlInfo->getSupportedControls();
sal_uInt32 nCount = aCtrlList.getLength();
for ( sal_uInt32 nCtrl = 0; nCtrl < nCount; ++nCtrl )
- if ( aCtrlList[ nCtrl ].equalsAscii("SelectionBox") )
+ if ( aCtrlList[ nCtrl ].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SelectionBox")) )
{
bSelectionBoxFound = sal_False;
break;
@@ -706,22 +707,6 @@ void FileDialogHelper_Impl::updateVersions()
}
// -----------------------------------------------------------------------
-class OReleaseSolarMutex
-{
-private:
- const sal_Int32 m_nAquireCount;
-public:
- OReleaseSolarMutex( )
- :m_nAquireCount( Application::ReleaseSolarMutex() )
- {
- }
- ~OReleaseSolarMutex( )
- {
- Application::AcquireSolarMutex( m_nAquireCount );
- }
-};
-
-// -----------------------------------------------------------------------
IMPL_LINK( FileDialogHelper_Impl, TimeOutHdl_Impl, Timer*, EMPTYARG )
{
if ( !mbHasPreview )
@@ -786,7 +771,7 @@ IMPL_LINK( FileDialogHelper_Impl, TimeOutHdl_Impl, Timer*, EMPTYARG )
try
{
- OReleaseSolarMutex aReleaseForCallback;
+ SolarMutexReleaser aReleaseForCallback;
// clear the preview window
xFilePicker->setImage( FilePreviewImageFormats::BITMAP, aAny );
}
@@ -1171,10 +1156,10 @@ FileDialogHelper_Impl::~FileDialogHelper_Impl()
#define nMagic -1
-class PickerThread_Impl : public ::vos::OThread
+class PickerThread_Impl : public ::osl::Thread
{
uno::Reference < XFilePicker > mxPicker;
- ::vos::OMutex maMutex;
+ ::osl::Mutex maMutex;
virtual void SAL_CALL run();
sal_Int16 mnRet;
public:
@@ -1182,10 +1167,10 @@ public:
: mxPicker( rPicker ), mnRet(nMagic) {}
sal_Int16 GetReturnValue()
- { ::vos::OGuard aGuard( maMutex ); return mnRet; }
+ { ::osl::MutexGuard aGuard( maMutex ); return mnRet; }
void SetReturnValue( sal_Int16 aRetValue )
- { ::vos::OGuard aGuard( maMutex ); mnRet = aRetValue; }
+ { ::osl::MutexGuard aGuard( maMutex ); mnRet = aRetValue; }
};
void SAL_CALL PickerThread_Impl::run()
@@ -1349,7 +1334,7 @@ sal_Int16 FileDialogHelper_Impl::implDoExecute()
#ifdef WNT
if ( mbSystemPicker )
{
- OReleaseSolarMutex aSolarMutex;
+ SolarMutexReleaser aSolarMutex;
nRet = mxFileDlg->execute();
}
else
@@ -1636,7 +1621,7 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList,
if ( ( aValue >>= bPassWord ) && bPassWord )
{
// ask for a password
- uno::Reference < ::com::sun::star::task::XInteractionHandler > xInteractionHandler( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.comp.uui.UUIInteractionHandler")), UNO_QUERY );
+ uno::Reference < ::com::sun::star::task::XInteractionHandler > xInteractionHandler( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.uui.UUIInteractionHandler"))), UNO_QUERY );
if( xInteractionHandler.is() )
{
@@ -1874,7 +1859,7 @@ void FileDialogHelper_Impl::addFilters( sal_Int64 nFlags,
uno::Reference< XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
uno::Reference< XContainerQuery > xFilterCont(
- xSMGR->createInstance(::rtl::OUString::createFromAscii("com.sun.star.document.FilterFactory")),
+ xSMGR->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.FilterFactory"))),
UNO_QUERY);
if ( ! xFilterCont.is() )
return;
@@ -2049,11 +2034,7 @@ void FileDialogHelper_Impl::saveConfig()
try
{
- aValue = xDlg->getValue( ExtendedFilePickerElementIds::CHECKBOX_LINK, 0 );
sal_Bool bValue = sal_False;
- aValue >>= bValue;
- aUserData.SetToken( 0, ' ', String::CreateFromInt32( (sal_Int32) bValue ) );
-
aValue = xDlg->getValue( ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0 );
bValue = sal_False;
aValue >>= bValue;
@@ -2193,14 +2174,6 @@ void FileDialogHelper_Impl::loadConfig()
{
try
{
- // respect the last "insert as link" state
- sal_Bool bLink = (sal_Bool) aUserData.GetToken( 0, ' ' ).ToInt32();
- if ( !xDlg->getValue( ExtendedFilePickerElementIds::CHECKBOX_LINK, 0 ).hasValue() )
- {
- aValue <<= bLink;
- xDlg->setValue( ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, aValue );
- }
-
// respect the last "show preview" state
sal_Bool bShowPreview = (sal_Bool) aUserData.GetToken( 1, ' ' ).ToInt32();
if ( !xDlg->getValue( ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0 ).hasValue() )
@@ -2351,25 +2324,7 @@ void FileDialogHelper_Impl::SetContext( FileDialogHelper::Context _eNewContext )
{
meContext = _eNewContext;
- sal_Int32 nNewHelpId = 0;
- OUString aConfigId;
-
- switch( _eNewContext )
- {
-// #104952# dependency to SVX not allowed! When used again, another solution has to be found
-// case FileDialogHelper::SW_INSERT_GRAPHIC:
-// case FileDialogHelper::SC_INSERT_GRAPHIC:
-// case FileDialogHelper::SD_INSERT_GRAPHIC: nNewHelpId = SID_INSERT_GRAPHIC; break;
- case FileDialogHelper::SW_INSERT_SOUND:
- case FileDialogHelper::SC_INSERT_SOUND:
- case FileDialogHelper::SD_INSERT_SOUND: nNewHelpId = SID_INSERT_SOUND; break;
- case FileDialogHelper::SW_INSERT_VIDEO:
- case FileDialogHelper::SC_INSERT_VIDEO:
- case FileDialogHelper::SD_INSERT_VIDEO: nNewHelpId = SID_INSERT_VIDEO; break;
- default: break;
- }
-
- const OUString* pConfigId = GetLastFilterConfigId( _eNewContext );
+ const OUString* pConfigId = GetLastFilterConfigId( _eNewContext );
if( pConfigId )
LoadLastUsedFilter( *pConfigId );
}
@@ -2919,3 +2874,4 @@ String DecodeSpaces_Impl( const String& rSource )
} // end of namespace sfx2
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/filedlghelper.src b/sfx2/source/dialog/filedlghelper.src
index 2b071a2f78..e25fa400f4 100644
--- a/sfx2/source/dialog/filedlghelper.src
+++ b/sfx2/source/dialog/filedlghelper.src
@@ -25,14 +25,9 @@
*
************************************************************************/
-// includes ******************************************************************
-
#include "sfxlocal.hrc"
#include "filedlghelper.hrc"
-//#include "helpid.hrc"
-
-// strings *******************************************************************
String STR_SFX_FILEDLG_ACTUALVERSION
{
diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx
index e2d2bfbf40..5e6f4e9219 100644
--- a/sfx2/source/dialog/filedlgimpl.hxx
+++ b/sfx2/source/dialog/filedlgimpl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -236,3 +237,4 @@ namespace sfx2
#endif // _SFX_FILEDLGIMPL_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index 86456faed1..1ae58c13ca 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -919,7 +920,7 @@ namespace sfx2
{
::comphelper::SequenceAsHashMap lFilterProps (xFilterList->nextElement());
::rtl::OUString sFilterName = lFilterProps.getUnpackedValueOrDefault(
- ::rtl::OUString::createFromAscii("Name"),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")),
::rtl::OUString());
if (sFilterName.getLength())
m_lFilters.push_back(sFilterName);
@@ -967,10 +968,9 @@ namespace sfx2
// retrieve the default filter for this application module.
// It must be set as first of the generated filter list.
const SfxFilter* pDefaultFilter = SfxFilterContainer::GetDefaultFilter_Impl(_rFactory);
- // --> PB 2004-11-01 #i32434# only use one extension
+ // Only use one extension (#i32434#)
// (and always the first if there are more than one)
sExtension = pDefaultFilter->GetWildcard().GetWildCard().GetToken( 0, ';' );
- // <--
sUIName = addExtension( pDefaultFilter->GetUIName(), sExtension, sal_False, _rFileDlgImpl );
try
{
@@ -992,10 +992,9 @@ namespace sfx2
if (pFilter->GetName() == pDefaultFilter->GetName())
continue;
- // --> PB 2004-09-21 #i32434# only use one extension
+ // Only use one extension (#i32434#)
// (and always the first if there are more than one)
sExtension = pFilter->GetWildcard().GetWildCard().GetToken( 0, ';' );
- // <--
sUIName = addExtension( pFilter->GetUIName(), sExtension, sal_False, _rFileDlgImpl );
try
{
@@ -1075,9 +1074,9 @@ namespace sfx2
{
std::vector< ExportFilter >::iterator aIter = aImportantFilterGroup.begin();
if ( nHTMLIndex != -1 )
- aIter++;
+ ++aIter;
if ( nXHTMLIndex != -1 )
- aIter++;
+ ++aIter;
aImportantFilterGroup.insert( aIter, aExportFilter );
nPDFIndex = 0;
}
@@ -1085,11 +1084,11 @@ namespace sfx2
{
std::vector< ExportFilter >::iterator aIter = aImportantFilterGroup.begin();
if ( nHTMLIndex != -1 )
- aIter++;
+ ++aIter;
if ( nXHTMLIndex != -1 )
- aIter++;
+ ++aIter;
if ( nPDFIndex != -1 )
- aIter++;
+ ++aIter;
aImportantFilterGroup.insert( aIter, aExportFilter );
nFlashIndex = 0;
}
@@ -1272,3 +1271,4 @@ namespace sfx2
//........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/filtergrouping.hxx b/sfx2/source/dialog/filtergrouping.hxx
index e65c64025c..d34ec4d615 100644
--- a/sfx2/source/dialog/filtergrouping.hxx
+++ b/sfx2/source/dialog/filtergrouping.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -104,3 +105,4 @@ namespace sfx2
#endif // SFX2_FILTERGROUPING_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/intro.cxx b/sfx2/source/dialog/intro.cxx
index b5926fdeb6..0583899880 100644
--- a/sfx2/source/dialog/intro.cxx
+++ b/sfx2/source/dialog/intro.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
-#ifndef GCC
-#endif
-
#include "intro.hxx"
#include <tools/stream.hxx>
@@ -108,3 +106,4 @@ void IntroWindow_Impl::Slide()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/itemconnect.cxx b/sfx2/source/dialog/itemconnect.cxx
index 7662d2c276..9fb8990d5a 100644
--- a/sfx2/source/dialog/itemconnect.cxx
+++ b/sfx2/source/dialog/itemconnect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -406,3 +407,4 @@ bool ItemConnectionArray::FillItemSet( SfxItemSet& rDestSet, const SfxItemSet& r
} // namespace sfx
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index a3807486e5..3e229504f0 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -144,11 +145,6 @@ void PrepareListener_Impl::disposing(const css::lang::EventObject& /*rEvent*/) t
{
}
-// class AddressList_Impl ------------------------------------------------
-
-typedef String* AddressItemPtr_Impl;
-DECLARE_LIST( AddressList_Impl, AddressItemPtr_Impl )
-
// class SfxMailModel -----------------------------------------------
static const char PDF_DOCUMENT_TYPE[] = "pdf_Portable_Document_Format";
@@ -158,10 +154,9 @@ void SfxMailModel::ClearList( AddressList_Impl* pList )
{
if ( pList )
{
- ULONG i, nCount = pList->Count();
- for ( i = 0; i < nCount; ++i )
- delete pList->GetObject(i);
- pList->Clear();
+ for( size_t i = 0, n = pList->size(); i < n; ++i )
+ delete pList->at(i);
+ pList->clear();
}
}
@@ -170,12 +165,11 @@ void SfxMailModel::MakeValueList( AddressList_Impl* pList, String& rValueList )
rValueList.Erase();
if ( pList )
{
- ULONG i, nCount = pList->Count();
- for ( i = 0; i < nCount; ++i )
+ for( size_t i = 0, n = pList->size(); i < n; ++i )
{
if ( rValueList.Len() > 0 )
rValueList += ',';
- rValueList += *pList->GetObject(i);
+ rValueList += *pList->at(i);
}
}
}
@@ -221,7 +215,7 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog(
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xFilterCFG =
uno::Reference< container::XNameAccess >(
xSMGR->createInstance(
- ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ) ), uno::UNO_QUERY );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.FilterFactory")) ), uno::UNO_QUERY );
css::uno::Reference< css::util::XModifiable > xModifiable( xModel, css::uno::UNO_QUERY );
if ( !xFilterCFG.is() )
@@ -234,7 +228,7 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog(
sal_Int32 nPropertyCount = aProps.getLength();
for( sal_Int32 nProperty=0; nProperty < nPropertyCount; ++nProperty )
{
- if( aProps[nProperty].Name.equals( ::rtl::OUString::createFromAscii( "UIComponent" )) )
+ if( aProps[nProperty].Name.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIComponent"))) )
{
::rtl::OUString aServiceName;
aProps[nProperty].Value >>= aServiceName;
@@ -281,7 +275,7 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog(
//add them to the args
for ( sal_Int32 nInd = 0; nInd < aPropsFromDialog.getLength(); nInd++ )
{
- if( aPropsFromDialog[ nInd ].Name.equals( ::rtl::OUString::createFromAscii( "FilterData" ) ) )
+ if( aPropsFromDialog[ nInd ].Name.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FilterData")) ) )
{
//found the filterdata, add to the storing argument
rArgs.realloc( ++rNumArgs );
@@ -441,7 +435,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
{
::comphelper::SequenceAsHashMap aFilterPropsHM( xEnumeration->nextElement() );
aFilterName = aFilterPropsHM.getUnpackedValueOrDefault(
- ::rtl::OUString::createFromAscii( "Name" ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")),
::rtl::OUString() );
}
@@ -480,7 +474,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
{
::comphelper::SequenceAsHashMap aFilterPropsHM( xNameAccess->getByName( aModule ) );
aFilterName = aFilterPropsHM.getUnpackedValueOrDefault(
- ::rtl::OUString::createFromAscii( "ooSetupFactoryDefaultFilter" ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupFactoryDefaultFilter")),
::rtl::OUString() );
css::uno::Reference< css::container::XNameAccess > xNameAccess2(
xContainerQuery, css::uno::UNO_QUERY );
@@ -488,7 +482,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
{
::comphelper::SequenceAsHashMap aFilterPropsHM2( xNameAccess2->getByName( aFilterName ) );
aTypeName = aFilterPropsHM2.getUnpackedValueOrDefault(
- ::rtl::OUString::createFromAscii( "Type" ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type")),
::rtl::OUString() );
}
}
@@ -527,7 +521,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
{
::comphelper::SequenceAsHashMap aTypeNamePropsHM( xTypeDetection->getByName( aTypeName ) );
uno::Sequence< ::rtl::OUString > aExtensions = aTypeNamePropsHM.getUnpackedValueOrDefault(
- ::rtl::OUString::createFromAscii( "Extensions" ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Extensions")),
::uno::Sequence< ::rtl::OUString >() );
if ( aExtensions.getLength() )
aExtension = aExtensions[0];
@@ -776,21 +770,21 @@ void SfxMailModel::AddAddress( const String& rAddress, AddressRole eRole )
{
if ( !mpToList )
// create the list
- mpToList = new AddressList_Impl;
+ mpToList = new AddressList_Impl();
pList = mpToList;
}
else if ( ROLE_CC == eRole )
{
if ( !mpCcList )
// create the list
- mpCcList = new AddressList_Impl;
+ mpCcList = new AddressList_Impl();
pList = mpCcList;
}
else if ( ROLE_BCC == eRole )
{
if ( !mpBccList )
// create the list
- mpBccList = new AddressList_Impl;
+ mpBccList = new AddressList_Impl();
pList = mpBccList;
}
else
@@ -802,7 +796,7 @@ void SfxMailModel::AddAddress( const String& rAddress, AddressRole eRole )
{
// add address to list
AddressItemPtr_Impl pAddress = new String( rAddress );
- pList->Insert( pAddress, LIST_APPEND );
+ pList->push_back( pAddress );
}
}
}
@@ -865,52 +859,52 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css:
}
xSimpleMailMessage->setOriginator( maFromAddress );
- sal_Int32 nToCount = mpToList ? mpToList->Count() : 0;
- sal_Int32 nCcCount = mpCcList ? mpCcList->Count() : 0;
- sal_Int32 nCcSeqCount = nCcCount;
+ size_t nToCount = mpToList ? mpToList->size() : 0;
+ size_t nCcCount = mpCcList ? mpCcList->size() : 0;
+ size_t nCcSeqCount = nCcCount;
// set recipient (only one) for this simple mail server!!
if ( nToCount > 1 )
{
nCcSeqCount = nToCount - 1 + nCcCount;
- xSimpleMailMessage->setRecipient( *mpToList->GetObject( 0 ));
+ xSimpleMailMessage->setRecipient( *mpToList->at( 0 ) );
nSendFlags = SimpleMailClientFlags::NO_USER_INTERFACE;
}
else if ( nToCount == 1 )
{
- xSimpleMailMessage->setRecipient( *mpToList->GetObject( 0 ));
+ xSimpleMailMessage->setRecipient( *mpToList->at( 0 ) );
nSendFlags = SimpleMailClientFlags::NO_USER_INTERFACE;
}
// all other recipient must be handled with CC recipients!
if ( nCcSeqCount > 0 )
{
- sal_Int32 nIndex = 0;
- Sequence< OUString > aCcRecipientSeq;
+ size_t nIndex = 0;
+ Sequence< OUString > aCcRecipientSeq;
aCcRecipientSeq.realloc( nCcSeqCount );
if ( nCcSeqCount > nCcCount )
{
- for ( sal_Int32 i = 1; i < nToCount; ++i )
+ for ( size_t i = 1; i < nToCount; ++i )
{
- aCcRecipientSeq[nIndex++] = *mpToList->GetObject(i);
+ aCcRecipientSeq[nIndex++] = *mpToList->at(i);
}
}
- for ( sal_Int32 i = 0; i < nCcCount; i++ )
+ for ( size_t i = 0; i < nCcCount; i++ )
{
- aCcRecipientSeq[nIndex++] = *mpCcList->GetObject(i);
+ aCcRecipientSeq[nIndex++] = *mpCcList->at(i);
}
xSimpleMailMessage->setCcRecipient( aCcRecipientSeq );
}
- sal_Int32 nBccCount = mpBccList ? mpBccList->Count() : 0;
+ size_t nBccCount = mpBccList ? mpBccList->size() : 0;
if ( nBccCount > 0 )
{
Sequence< OUString > aBccRecipientSeq( nBccCount );
- for ( sal_Int32 i = 0; i < nBccCount; ++i )
+ for ( size_t i = 0; i < nBccCount; ++i )
{
- aBccRecipientSeq[i] = *mpBccList->GetObject(i);
+ aBccRecipientSeq[i] = *mpBccList->at(i);
}
xSimpleMailMessage->setBccRecipient( aBccRecipientSeq );
}
@@ -937,7 +931,7 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css:
{
css::uno::Reference< css::awt::XWindow > xParentWindow = xFrame->getContainerWindow();
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
Window* pParentWindow = VCLUnoHelper::GetWindow( xParentWindow );
ErrorBox aBox( pParentWindow, SfxResId( RID_ERRBOX_MAIL_CONFIG ));
@@ -1027,3 +1021,5 @@ BOOL CreateFromAddress_Impl( String& rFrom )
rFrom.Erase();
return ( rFrom.Len() > 0 );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index bc630affac..fa663e745e 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,7 @@
// include ---------------------------------------------------------------
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <vcl/field.hxx>
#include <svl/eitem.hxx>
#include <svl/intitem.hxx>
@@ -208,24 +207,23 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
aBaseFt.Disable();
aBaseLb.Disable();
}
- USHORT nCount = pFamilies->Count();
- USHORT i;
+ size_t nCount = pFamilies->size();
+ size_t i;
for ( i = 0; i < nCount; ++i )
{
- pItem = pFamilies->GetObject(i);
+ pItem = pFamilies->at( i );
if ( pItem->GetFamily() == pStyle->GetFamily() )
break;
}
- USHORT nStyleFilterIdx = 0xffff;
-
if ( i < nCount )
{
+ USHORT nStyleFilterIdx = 0xffff;
// Filterflags
const SfxStyleFilter& rList = pItem->GetFilterList();
- nCount = (USHORT)rList.Count();
+ nCount = rList.size();
USHORT nIdx = 0;
USHORT nMask = pStyle->GetMask() & ~SFXSTYLEBIT_USERDEF;
@@ -234,11 +232,10 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
for ( i = 0; i < nCount; ++i )
{
- SfxFilterTupel* pTupel = rList.GetObject(i);
+ SfxFilterTupel* pTupel = rList[ i ];
if ( pTupel->nFlags != SFXSTYLEBIT_AUTO &&
pTupel->nFlags != SFXSTYLEBIT_USED &&
-// pTupel->nFlags != SFXSTYLEBIT_USERDEF &&
pTupel->nFlags != SFXSTYLEBIT_ALL )
{
aFilterLb.InsertEntry( pTupel->aName, nIdx );
@@ -454,12 +451,9 @@ BOOL SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet )
// geht nur bei Benutzervorlagen
#if OSL_DEBUG_LEVEL > 1
USHORT nIdx = (USHORT)(long)aFilterLb.GetEntryData( nFilterIdx );
- SfxFilterTupel* p;
- p = pItem->GetFilterList().GetObject( nIdx );
+ SfxFilterTupel* p = pItem->GetFilterList()[ nIdx ];
#endif
- USHORT nMask = pItem->GetFilterList().GetObject(
- (USHORT)(long)aFilterLb.GetEntryData( nFilterIdx ) )->nFlags |
- SFXSTYLEBIT_USERDEF;
+ USHORT nMask = pItem->GetFilterList()[ (size_t)aFilterLb.GetEntryData( nFilterIdx ) ]->nFlags | SFXSTYLEBIT_USERDEF;
pStyle->SetMask( nMask );
}
if(aAutoCB.IsVisible() &&
@@ -680,3 +674,4 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet )
return nRet;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx
index 76d43eb15b..20ed965611 100644
--- a/sfx2/source/dialog/navigat.cxx
+++ b/sfx2/source/dialog/navigat.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,6 @@
// includes *******************************************************************
-#ifndef GCC
-#endif
-
#include <sfx2/navigat.hxx>
#include <sfx2/sfx.hrc>
#include <sfx2/app.hxx>
@@ -98,3 +96,4 @@ BOOL SfxNavigator::Close()
return FALSE;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
index 07e27b9866..010662d764 100644
--- a/sfx2/source/dialog/newstyle.cxx
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -102,7 +103,8 @@ SfxNewStyleDlg::SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool& rInPool
// -----------------------------------------------------------------------
-__EXPORT SfxNewStyleDlg::~SfxNewStyleDlg()
+SfxNewStyleDlg::~SfxNewStyleDlg()
{
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx
index 747560edba..a38141a3af 100644
--- a/sfx2/source/dialog/partwnd.cxx
+++ b/sfx2/source/dialog/partwnd.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43,9 +44,7 @@
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/awt/PosSize.hpp>
-#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
#include <comphelper/processfactory.hxx>
-#endif
#include <toolkit/helper/vclunohelper.hxx>
@@ -255,3 +254,4 @@ void SfxPartDockWnd_Impl::FillInfo( SfxChildWinInfo& rInfo ) const
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index 2d5c4f97ae..30e661dcc4 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,8 +31,6 @@
// Include ---------------------------------------------------------------
#include <vcl/msgbox.hxx>
-#ifndef GCC
-#endif
#include <sfx2/passwd.hxx>
#include "sfxtypes.hxx"
@@ -186,6 +185,25 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
if ( pGroupText )
maPasswordBox.SetText( *pGroupText );
+
+//set the text to the pasword length
+ SetPasswdText();
+}
+
+// -----------------------------------------------------------------------
+
+void SfxPasswordDialog::SetPasswdText( )
+{
+//set the new string to the minimum password length
+ if( mnMinLen == 0 )
+ maMinLengthFT.SetText( maEmptyPwdStr );
+ else
+ {
+ maMainPwdStr = maMinLenPwdStr;
+ maMainPwdStr.SearchAndReplace( String::CreateFromAscii( "$(MINLEN)" ), String::CreateFromInt32((sal_Int32) mnMinLen ), 0);
+ maMinLengthFT.SetText( maMainPwdStr );
+ maMinLengthFT.Show();
+ }
}
// -----------------------------------------------------------------------
@@ -193,6 +211,7 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
void SfxPasswordDialog::SetMinLen( USHORT nLen )
{
mnMinLen = nLen;
+ SetPasswdText();
EditModifyHdl( NULL );
}
@@ -253,3 +272,4 @@ short SfxPasswordDialog::Execute()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/passwd.hrc b/sfx2/source/dialog/passwd.hrc
index 844de643f4..09a7fb6487 100644
--- a/sfx2/source/dialog/passwd.hrc
+++ b/sfx2/source/dialog/passwd.hrc
@@ -36,6 +36,7 @@
#define ED_PASSWD_PASSWORD 14
#define FT_PASSWD_CONFIRM 15
#define ED_PASSWD_CONFIRM 16
+#define FT_PASSWD_MINLEN 17
#define BTN_PASSWD_OK 20
#define BTN_PASSWD_CANCEL 21
diff --git a/sfx2/source/dialog/passwd.src b/sfx2/source/dialog/passwd.src
index 1d1000c9db..f05a10ddb0 100644
--- a/sfx2/source/dialog/passwd.src
+++ b/sfx2/source/dialog/passwd.src
@@ -80,6 +80,22 @@ ModalDialog DLG_PASSWD
Pos = MAP_APPFONT( 57, 44 );
Size = MAP_APPFONT( 75, 12 );
};
+
+ String STR_PASSWD_MIN_LEN
+ {
+ Text [ en-US ] = "(Minimum $(MINLEN) characters)" ;
+ };
+ String STR_PASSWD_EMPTY
+ {
+ Text [ en-US ] = "(The password can be empty)" ;
+ };
+
+ FixedText FT_PASSWD_MINLEN
+ {
+ Pos = MAP_APPFONT(12, 65 );
+ Size = MAP_APPFONT( 126, 10 );
+ };
+
FixedLine GB_PASSWD_PASSWORD
{
Pos = MAP_APPFONT( 6, 3 );
diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx
index fb81bf7a2e..25df40567c 100644
--- a/sfx2/source/dialog/printopt.cxx
+++ b/sfx2/source/dialog/printopt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,8 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
-#ifndef GCC
-#endif
+#include <sal/macros.h>
#include <vcl/msgbox.hxx>
#include <unotools/printwarningoptions.hxx>
#include <svtools/printoptions.hxx>
@@ -42,19 +42,9 @@
#include <sfx2/viewsh.hxx>
#include <sfx2/printopt.hxx>
-// -----------
-// - statics -
-// -----------
-
static USHORT aDPIArray[] = { 72, 96, 150, 200, 300, 600 };
static BOOL bOutputForPrinter = TRUE;
-#define DPI_COUNT (sizeof(aDPIArray)/sizeof(aDPIArray[0 ]))
-
-// --------------------------------
-// - SfxCommonPrintOptionsTabPage -
-// --------------------------------
-
SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage( Window* pParent, const SfxItemSet& rSet ) :
SfxTabPage( pParent, SfxResId( TP_COMMONPRINTOPTIONS ), rSet ),
@@ -107,8 +97,7 @@ SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage( Window* pParent, con
aReduceGradientsStripesRB.SetToggleHdl( LINK( this, SfxCommonPrintOptionsTabPage, ToggleReduceGradientsStripesRBHdl ) );
aReduceBitmapsResolutionRB.SetToggleHdl( LINK( this, SfxCommonPrintOptionsTabPage, ToggleReduceBitmapsResolutionRBHdl ) );
- // --> PB 2008-06-09 #i89164#
- // calculate dynamically the width of radiobutton and listbox
+ // #i89164# calculate dynamically the width of radiobutton and listbox
const long nOffset = 10;
Size aOldSize = aReduceBitmapsResolutionRB.GetSizePixel();
Size aNewSize = aReduceBitmapsResolutionRB.GetOptimalSize( WINDOWSIZE_PREFERRED );
@@ -123,24 +112,17 @@ SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage( Window* pParent, con
aNewSize.Width() += nOffset;
aNewSize.Height() = aOldSize.Height();
aReduceBitmapsResolutionLB.SetPosSizePixel( aPos, aNewSize );
- // <--
}
-// -----------------------------------------------------------------------------
-
SfxCommonPrintOptionsTabPage::~SfxCommonPrintOptionsTabPage()
{
}
-// -----------------------------------------------------------------------------
-
SfxTabPage* SfxCommonPrintOptionsTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet )
{
return( new SfxCommonPrintOptionsTabPage( pParent, rAttrSet ) );
}
-// -----------------------------------------------------------------------------
-
Window* SfxCommonPrintOptionsTabPage::GetParentLabeledBy( const Window* pWindow ) const
{
if ( pWindow == (Window *)&aReduceGradientsStepCountNF )
@@ -161,8 +143,6 @@ Window* SfxCommonPrintOptionsTabPage::GetParentLabelFor( const Window* pWindow )
return SfxTabPage::GetParentLabelFor( pWindow );
}
-// -----------------------------------------------------------------------------
-
BOOL SfxCommonPrintOptionsTabPage::FillItemSet( SfxItemSet& /*rSet*/ )
{
SvtPrintWarningOptions aWarnOptions;
@@ -187,8 +167,6 @@ BOOL SfxCommonPrintOptionsTabPage::FillItemSet( SfxItemSet& /*rSet*/ )
return bModified;
}
-// -----------------------------------------------------------------------------
-
void SfxCommonPrintOptionsTabPage::Reset( const SfxItemSet& /*rSet*/ )
{
SvtPrintWarningOptions aWarnOptions;
@@ -209,13 +187,10 @@ void SfxCommonPrintOptionsTabPage::Reset( const SfxItemSet& /*rSet*/ )
ImplUpdateControls( aPrinterOutputRB.IsChecked() ? &maPrinterOptions : &maPrintFileOptions );
- // --> OD 2008-06-25 #i63982#
+ // #i63982#
ImplSetAccessibleNames();
- // <--
}
-// -----------------------------------------------------------------------------
-
int SfxCommonPrintOptionsTabPage::DeactivatePage( SfxItemSet* pItemSet )
{
if( pItemSet )
@@ -224,8 +199,6 @@ int SfxCommonPrintOptionsTabPage::DeactivatePage( SfxItemSet* pItemSet )
return LEAVE_PAGE;
}
-// -----------------------------------------------------------------------------
-
void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCurrentOptions )
{
aReduceTransparencyCB.Check( pCurrentOptions->IsReduceTransparency() );
@@ -259,7 +232,7 @@ void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCu
aReduceBitmapsResolutionLB.SelectEntryPos( 0 );
else
{
- for( long i = ( DPI_COUNT - 1 ); i >= 0; i-- )
+ for( long i = ( SAL_N_ELEMENTS(aDPIArray) - 1 ); i >= 0; i-- )
{
if( nDPI >= aDPIArray[ i ] )
{
@@ -279,8 +252,6 @@ void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCu
ClickReduceBitmapsCBHdl( &aReduceBitmapsCB );
}
-// -----------------------------------------------------------------------------
-
void SfxCommonPrintOptionsTabPage::ImplSetAccessibleNames()
{
static const String cSeparator = String::CreateFromAscii( " - " );
@@ -379,8 +350,6 @@ void SfxCommonPrintOptionsTabPage::ImplSetAccessibleNames()
aTransparencyCB.SetAccessibleName( sAccessibleName );
}
-// -----------------------------------------------------------------------------
-
void SfxCommonPrintOptionsTabPage::ImplSaveControls( PrinterOptions* pCurrentOptions )
{
pCurrentOptions->SetReduceTransparency( aReduceTransparencyCB.IsChecked() );
@@ -392,13 +361,11 @@ void SfxCommonPrintOptionsTabPage::ImplSaveControls( PrinterOptions* pCurrentOpt
pCurrentOptions->SetReducedBitmapMode( aReduceBitmapsOptimalRB.IsChecked() ? PRINTER_BITMAP_OPTIMAL :
( aReduceBitmapsNormalRB.IsChecked() ? PRINTER_BITMAP_NORMAL : PRINTER_BITMAP_RESOLUTION ) );
pCurrentOptions->SetReducedBitmapResolution( aDPIArray[ Min( (USHORT) aReduceBitmapsResolutionLB.GetSelectEntryPos(),
- (USHORT)( sizeof( aDPIArray ) / sizeof( aDPIArray[ 0 ] ) - 1 ) ) ] );
+ (USHORT)( SAL_N_ELEMENTS( aDPIArray ) - 1 ) ) ] );
pCurrentOptions->SetReducedBitmapIncludesTransparency( aReduceBitmapsTransparencyCB.IsChecked() );
pCurrentOptions->SetConvertToGreyscales( aConvertToGreyscalesCB.IsChecked() );
}
-// -----------------------------------------------------------------------------
-
IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceTransparencyCBHdl, CheckBox*, pBox )
{
(void)pBox; //unused
@@ -412,8 +379,6 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceTransparencyCBHdl, CheckBox*
return 0;
}
-// -----------------------------------------------------------------------------
-
IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceGradientsCBHdl, CheckBox*, pBox )
{
(void)pBox; //unused
@@ -428,8 +393,6 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceGradientsCBHdl, CheckBox*, p
return 0;
}
-// -----------------------------------------------------------------------------
-
IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceBitmapsCBHdl, CheckBox*, pBox )
{
(void)pBox; //unused
@@ -446,8 +409,6 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceBitmapsCBHdl, CheckBox*, pBo
return 0;
}
-// -----------------------------------------------------------------------------
-
IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceGradientsStripesRBHdl, RadioButton*, pButton )
{
(void)pButton; //unused
@@ -458,8 +419,6 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceGradientsStripesRBHdl, Radi
return 0;
}
-// -----------------------------------------------------------------------------
-
IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceBitmapsResolutionRBHdl, RadioButton*, pButton )
{
(void)pButton; //unused
@@ -470,8 +429,6 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceBitmapsResolutionRBHdl, Rad
return 0;
}
-// -----------------------------------------------------------------------------
-
IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrinterRBHdl, RadioButton*, pButton )
{
if( pButton->IsChecked() )
@@ -479,9 +436,8 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrinterRBHdl, RadioButton*,
aOutputGB.SetText( OutputDevice::GetNonMnemonicString( pButton->GetText() ) );
ImplUpdateControls( &maPrinterOptions );
bOutputForPrinter = TRUE;
- // --> OD 2008-06-25 #i63982#
+ // #i63982#
ImplSetAccessibleNames();
- // <--
}
else
ImplSaveControls( &maPrinterOptions );
@@ -489,8 +445,6 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrinterRBHdl, RadioButton*,
return 0;
}
-// -----------------------------------------------------------------------------
-
IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrintFileRBHdl, RadioButton*, pButton )
{
if( pButton->IsChecked() )
@@ -498,9 +452,8 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrintFileRBHdl, RadioButton
aOutputGB.SetText( OutputDevice::GetNonMnemonicString( pButton->GetText() ) );
ImplUpdateControls( &maPrintFileOptions );
bOutputForPrinter = FALSE;
- // --> OD 2008-06-25 #i63982#
+ // #i63982#
ImplSetAccessibleNames();
- // <--
}
else
ImplSaveControls( &maPrintFileOptions );
@@ -508,10 +461,6 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrintFileRBHdl, RadioButton
return 0;
}
-// -------------------------------
-// - TransparencyPrintWarningBox -
-// -------------------------------
-
TransparencyPrintWarningBox::TransparencyPrintWarningBox( Window* pParent ) :
ModalDialog( pParent, SfxResId( RID_WARN_PRINTTRANSPARENCY ) ),
aWarnFI ( this, SfxResId( FI_PRINTTRANSWARN ) ),
@@ -529,17 +478,15 @@ TransparencyPrintWarningBox::TransparencyPrintWarningBox( Window* pParent ) :
aNoBtn.SetClickHdl( LINK( this, TransparencyPrintWarningBox, ClickNoBtn ) );
}
-// -----------------------------------------------------------------------------
-
TransparencyPrintWarningBox::~TransparencyPrintWarningBox()
{
}
-// -----------------------------------------------------------------------------
-
IMPL_LINK( TransparencyPrintWarningBox, ClickNoBtn, PushButton*, pButton )
{
(void)pButton; //unused
EndDialog( RET_NO );
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx
index 4c9bd6a815..83ccbe8453 100644
--- a/sfx2/source/dialog/recfloat.cxx
+++ b/sfx2/source/dialog/recfloat.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -128,7 +129,7 @@ static rtl::OUString GetLabelFromCommandURL( const rtl::OUString& rCommandURL, c
{
for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
{
- if ( aPropSeq[i].Name.equalsAscii( "Label" ))
+ if ( aPropSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Label" ) ))
{
aPropSeq[i].Value >>= aLabel;
break;
@@ -278,3 +279,5 @@ IMPL_LINK( SfxRecordingFloat_Impl, Select, ToolBox*, pToolBar )
return 1;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/recfloat.src b/sfx2/source/dialog/recfloat.src
index 0e55ac8170..0790accae7 100644
--- a/sfx2/source/dialog/recfloat.src
+++ b/sfx2/source/dialog/recfloat.src
@@ -30,7 +30,6 @@
// -----------------------------------------------------------------------
#define STD_MASKCOLOR Color { Red = 0xC000; Green = 0xC000; Blue = 0xC000; }
-#define STD_HC_MASKCOLOR Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }
FloatingWindow SID_RECORDING_FLOATWINDOW
{
diff --git a/sfx2/source/dialog/sfxdlg.cxx b/sfx2/source/dialog/sfxdlg.cxx
index 333c2b99e5..c9bc2c1f6b 100755
--- a/sfx2/source/dialog/sfxdlg.cxx
+++ b/sfx2/source/dialog/sfxdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,3 +43,9 @@ SfxAbstractDialogFactory* SfxAbstractDialogFactory::Create()
SfxAbstractDialogFactory::~SfxAbstractDialogFactory()
{
}
+
+SfxAbstractDialogFactory::~SfxAbstractDialogFactory()
+{
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index 2d5c98bd1b..f2f363394e 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,7 +36,6 @@
#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
#endif
#include <unotools/viewoptions.hxx>
@@ -60,7 +60,7 @@ using namespace ::rtl;
#define VERSION 1
#define nPixel 30L
-#define USERITEM_NAME OUString::createFromAscii( "UserItem" )
+#define USERITEM_NAME OUString(RTL_CONSTASCII_USTRINGPARAM("UserItem"))
struct SfxDock_Impl
{
@@ -618,6 +618,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
// Das Fenster mu\s vor dem ersten Fenster eingef"ugt werden, das die
// gleiche oder eine gr"o\sere Position hat als pDockWin.
USHORT nCount = pDockArr->Count();
+ USHORT nLastWindowIdx(0);
// Wenn gar kein Fenster gefunden wird, wird als erstes eingef"ugt
USHORT nInsertPos = 0;
@@ -631,6 +632,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
// Wenn kein geeignetes Fenster hinter der gew"unschten Einf"ugeposition
// gefunden wird, wird am Ende eingef"ugt
nInsertPos = nCount;
+ nLastWindowIdx = n;
USHORT nL=0, nP=0;
GetWindowPos( pD->pWin, nL, nP );
@@ -646,11 +648,15 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
pDock->bNewLine = TRUE;
}
- nInsertPos = n;
+ nInsertPos = n != 0 ? nLastWindowIdx + 1 : 0; // ignore all non-windows after the last window
break;
}
}
}
+ if (nCount != 0 && nInsertPos == nCount && nLastWindowIdx != nCount - 1)
+ {
+ nInsertPos = nLastWindowIdx + 1; // ignore all non-windows after the last window
+ }
pDockArr->Insert(pDock, nInsertPos);
InsertWindow_Impl( pDock, rSize, nLine, nPos, bNewLine );
@@ -1302,3 +1308,4 @@ void SfxSplitWindow::SetActiveWindow_Impl( SfxDockingWindow* pWin )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx
index a918580f5d..247bccbaf7 100644
--- a/sfx2/source/dialog/srchdlg.cxx
+++ b/sfx2/source/dialog/srchdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -200,3 +201,4 @@ void SearchDialog::Move()
// ============================================================================
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/styfitem.cxx b/sfx2/source/dialog/styfitem.cxx
index 6c5d9f9997..20b04f76f6 100644
--- a/sfx2/source/dialog/styfitem.cxx
+++ b/sfx2/source/dialog/styfitem.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,9 +31,6 @@
// INCLUDE ---------------------------------------------------------------
-#ifndef GCC
-#endif
-
#include <sfx2/styfitem.hxx>
#include <svtools/localresaccess.hxx>
#include <tools/debug.hxx>
@@ -65,7 +63,7 @@ SfxStyleFamilyItem::SfxStyleFamilyItem( const ResId &rResId ) :
pTupel->aName = ReadStringRes();
long lFlags = ReadLongRes();
pTupel->nFlags = (USHORT)lFlags;
- aFilterList.Insert(pTupel, LIST_APPEND);
+ aFilterList.push_back( pTupel );
}
}
if(nMask & RSC_SFX_STYLE_ITEM_BITMAP)
@@ -102,12 +100,9 @@ SfxStyleFamilyItem::SfxStyleFamilyItem( const ResId &rResId ) :
SfxStyleFamilyItem::~SfxStyleFamilyItem()
{
- SfxFilterTupel *pTupel = aFilterList.First();
- while(pTupel)
- {
- delete pTupel;
- pTupel = aFilterList.Next();
- }
+ for ( size_t i = 0, n = aFilterList.size(); i < n; ++i )
+ delete aFilterList[ i ];
+ aFilterList.clear();
}
// -----------------------------------------------------------------------
@@ -115,9 +110,7 @@ SfxStyleFamilyItem::~SfxStyleFamilyItem()
// Implementierung des Resource-Konstruktors
SfxStyleFamilies::SfxStyleFamilies( const ResId& rResId ) :
-
- Resource( rResId.SetRT( RSC_SFX_STYLE_FAMILIES ).SetAutoRelease( FALSE ) ),
- aEntryList( 4, 1 )
+ Resource( rResId.SetRT( RSC_SFX_STYLE_FAMILIES ).SetAutoRelease( FALSE ) )
{
ULONG nCount = ReadLongRes();
for( ULONG i = 0; i < nCount; i++ )
@@ -125,12 +118,12 @@ SfxStyleFamilies::SfxStyleFamilies( const ResId& rResId ) :
const ResId aResId((RSHEADER_TYPE *)GetClassRes(), *rResId.GetResMgr());
SfxStyleFamilyItem *pItem = new SfxStyleFamilyItem(aResId);
IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) );
- aEntryList.Insert(pItem, LIST_APPEND);
+ aEntryList.push_back( pItem );
}
FreeResource();
- updateImages( rResId, BMP_COLOR_NORMAL );
+ updateImages( rResId );
}
// -----------------------------------------------------------------------
@@ -139,19 +132,15 @@ SfxStyleFamilies::SfxStyleFamilies( const ResId& rResId ) :
SfxStyleFamilies::~SfxStyleFamilies()
{
- SfxStyleFamilyItem *pItem = aEntryList.First();
-
- while(pItem)
- {
- delete pItem;
- pItem = aEntryList.Next();
- }
+ for ( size_t i = 0, n = aEntryList.size(); i < n; ++i )
+ delete aEntryList[ i ];
+ aEntryList.clear();
}
// -----------------------------------------------------------------------
-sal_Bool SfxStyleFamilies::updateImages( const ResId& _rId, const BmpColorMode _eMode )
+sal_Bool SfxStyleFamilies::updateImages( const ResId& _rId )
{
sal_Bool bSuccess = sal_False;
@@ -159,7 +148,7 @@ sal_Bool SfxStyleFamilies::updateImages( const ResId& _rId, const BmpColorMode _
::svt::OLocalResourceAccess aLocalRes( _rId );
// check if the image list is present
- ResId aImageListId( (sal_uInt16)_eMode + 1, *_rId.GetResMgr() );
+ ResId aImageListId( (sal_uInt16) 1, *_rId.GetResMgr() );
aImageListId.SetRT( RSC_IMAGELIST );
if ( aLocalRes.IsAvailableRes( aImageListId ) )
@@ -168,14 +157,14 @@ sal_Bool SfxStyleFamilies::updateImages( const ResId& _rId, const BmpColorMode _
// number of styles items/images
sal_uInt16 nCount = aImages.GetImageCount( );
- DBG_ASSERT( Count() == nCount, "SfxStyleFamilies::updateImages: found the image list, but missing some bitmaps!" );
- if ( nCount > Count() )
- nCount = Count();
+ DBG_ASSERT( aEntryList.size() == nCount, "SfxStyleFamilies::updateImages: found the image list, but missing some bitmaps!" );
+ if ( nCount > aEntryList.size() )
+ nCount = aEntryList.size();
// set the images on the items
- for ( sal_uInt16 i = 0; i < nCount; ++i )
+ for ( size_t i = 0; i < nCount; ++i )
{
- SfxStyleFamilyItem* pItem = static_cast< SfxStyleFamilyItem* >( aEntryList.GetObject( i ) );
+ SfxStyleFamilyItem* pItem = aEntryList[ i ];
pItem->SetImage( aImages.GetImage( aImages.GetImageId( i ) ) );
}
@@ -185,3 +174,5 @@ sal_Bool SfxStyleFamilies::updateImages( const ResId& _rId, const BmpColorMode _
return bSuccess;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx
index 9461951700..c6d9908415 100644
--- a/sfx2/source/dialog/styledlg.cxx
+++ b/sfx2/source/dialog/styledlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,9 +34,6 @@
#include <svl/style.hxx>
#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
-#ifndef GCC
-#endif
#include <sfx2/styledlg.hxx>
#include <sfx2/mgetempl.hxx>
@@ -174,3 +172,4 @@ IMPL_LINK( SfxStyleDialog, CancelHdl, Button *, pButton )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index c1d250155f..af4ca80570 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,7 +63,7 @@
using namespace ::com::sun::star::uno;
using namespace ::rtl;
-#define USERITEM_NAME OUString::createFromAscii( "UserItem" )
+#define USERITEM_NAME OUString(RTL_CONSTASCII_USTRINGPARAM("UserItem"))
TYPEINIT1(LAYOUT_NS_SFX_TABDIALOG SfxTabDialogItem,SfxSetItem);
@@ -119,12 +120,12 @@ SfxTabDialogItem::SfxTabDialogItem( USHORT nId, const SfxItemSet& rItemSet )
{
}
-SfxPoolItem* __EXPORT SfxTabDialogItem::Clone(SfxItemPool* pToPool) const
+SfxPoolItem* SfxTabDialogItem::Clone(SfxItemPool* pToPool) const
{
return new SfxTabDialogItem( *this, pToPool );
}
-SfxPoolItem* __EXPORT SfxTabDialogItem::Create(SvStream& /*rStream*/, USHORT /*nVersion*/) const
+SfxPoolItem* SfxTabDialogItem::Create(SvStream& /*rStream*/, USHORT /*nVersion*/) const
{
DBG_ERROR( "Use it only in UI!" );
return NULL;
@@ -368,11 +369,6 @@ void SfxTabPage::FillUserData()
// -----------------------------------------------------------------------
BOOL SfxTabPage::IsReadOnly() const
-
-/* [Description]
-
-*/
-
{
return FALSE;
}
@@ -448,12 +444,11 @@ const SfxPoolItem* SfxTabPage::GetExchangeItem( const SfxItemSet& rSet,
return GetOldItem( rSet, nSlot );
}
-// add CHINA001 begin
+
void SfxTabPage::PageCreated( SfxAllItemSet /*aSet*/ )
{
DBG_ASSERT(0, "SfxTabPage::PageCreated should not be called");
-}//CHINA001
-// add CHINA001 end
+}
// -----------------------------------------------------------------------
@@ -1054,11 +1049,6 @@ SfxTabPage* SfxTabDialog::GetTabPage( USHORT nPageId ) const
// -----------------------------------------------------------------------
BOOL SfxTabDialog::IsInOK() const
-
-/* [Beschreibung]
-
-*/
-
{
return pImpl->bInOK;
}
@@ -1761,7 +1751,7 @@ void SfxTabDialog::SetInputSet( const SfxItemSet* pInSet )
*/
{
- FASTBOOL bSet = ( pSet != NULL );
+ bool bSet = ( pSet != NULL );
pSet = pInSet;
@@ -1796,3 +1786,5 @@ long SfxTabDialog::Notify( NotifyEvent& rNEvt )
}
END_NAMESPACE_LAYOUT_SFX_TABDIALOG
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/taskpane.src b/sfx2/source/dialog/taskpane.src
deleted file mode 100644
index 4d1a991c0c..0000000000
--- a/sfx2/source/dialog/taskpane.src
+++ /dev/null
@@ -1,47 +0,0 @@
-/*************************************************************************
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include <sfx2/sfx.hrc>
-#include "sfxlocal.hrc"
-
-String STR_SFX_DOCK
-{
- Text [ en-US ] = "Dock";
-};
-
-String STR_SFX_UNDOCK
-{
- Text [ en-US ] = "Undock";
-};
-
-String STR_SFX_TASK_PANE_VIEW
-{
- Text [ en-US ] = "View";
-};
-String STR_SFX_TASKS
-{
- Text [ en-US ] = "Tasks";
-};
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 9e4b488661..ebb29b98d1 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
-#ifndef _MENU_HXX //autogen
#include <vcl/menu.hxx>
#endif
#include <svl/intitem.hxx>
@@ -377,7 +377,7 @@ SfxActionListBox::SfxActionListBox( SfxCommonTemplateDialog_Impl* pParent,
PopupMenu* SfxActionListBox::CreateContextMenu( void )
{
- //added by BerryJia for fixing Bug102739 2002-9-9 17:00(Beijing Time)
+
if( !( GetSelectionCount() > 0 ) )
{
pDialog->EnableEdit( FALSE );
@@ -830,7 +830,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Mod
USHORT SfxCommonTemplateDialog_Impl::StyleNrToInfoOffset(USHORT nId)
{
- const SfxStyleFamilyItem *pItem=pStyleFamilies->GetObject(nId);
+ const SfxStyleFamilyItem *pItem = pStyleFamilies->at( nId );
return SfxFamilyIdToNId(pItem->GetFamily())-1;
}
@@ -848,8 +848,8 @@ void SfxTemplateDialog_Impl::EnableEdit(BOOL bEnable)
USHORT SfxCommonTemplateDialog_Impl::InfoOffsetToStyleNr(USHORT nId)
{
- for ( USHORT i=0;i<pStyleFamilies->Count();i++ )
- if ( SfxFamilyIdToNId(pStyleFamilies->GetObject(i)->GetFamily()) == nId+1 )
+ for ( size_t i = 0; i < pStyleFamilies->size(); i++ )
+ if ( SfxFamilyIdToNId(pStyleFamilies->at( i )->GetFamily()) == nId+1 )
return i;
DBG_ERROR("Style Nummer nicht gefunden");
return 0;
@@ -861,8 +861,7 @@ USHORT SfxCommonTemplateDialog_Impl::InfoOffsetToStyleNr(USHORT nId)
void SfxCommonTemplateDialog_Impl::ReadResource()
{
// globale Benutzer-Resource auslesen
- USHORT i;
- for(i = 0; i < MAX_FAMILIES; ++i)
+ for(USHORT i = 0; i < MAX_FAMILIES; ++i)
pFamilyState[i] = 0;
SfxViewFrame* pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
@@ -883,14 +882,15 @@ void SfxCommonTemplateDialog_Impl::ReadResource()
// Einfuegen in die Toolbox
// umgekehrte Reihenfolge, da immer vorne eingefuegt wird.
- USHORT nCount = pStyleFamilies->Count();
+ size_t nCount = pStyleFamilies->size();
pBindings->ENTERREGISTRATIONS();
+ size_t i;
for(i = 0; i < nCount; ++i)
{
USHORT nSlot = 0;
- switch((USHORT)pStyleFamilies->GetObject(i)->GetFamily())
+ switch( (USHORT)pStyleFamilies->at( i )->GetFamily() )
{
case SFX_STYLE_FAMILY_CHAR: nSlot = SID_STYLE_FAMILY1; break;
case SFX_STYLE_FAMILY_PARA: nSlot = SID_STYLE_FAMILY2; break;
@@ -941,7 +941,7 @@ void SfxCommonTemplateDialog_Impl::ReadResource()
for( ; nCount--; )
{
- const SfxStyleFamilyItem *pItem = pStyleFamilies->GetObject( nCount );
+ const SfxStyleFamilyItem *pItem = pStyleFamilies->at( nCount );
USHORT nId = SfxFamilyIdToNId( pItem->GetFamily() );
InsertFamilyItem( nId, pItem );
}
@@ -1055,11 +1055,10 @@ void SfxCommonTemplateDialog_Impl::SetAutomaticFilter()
// Hilfsfunktion: Zugriff auf aktuelles Family-Item
const SfxStyleFamilyItem *SfxCommonTemplateDialog_Impl::GetFamilyItem_Impl() const
{
- const USHORT nCount = pStyleFamilies->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ const size_t nCount = pStyleFamilies->size();
+ for(size_t i = 0; i < nCount; ++i)
{
- const SfxStyleFamilyItem *pItem = pStyleFamilies->GetObject(i);
-// if(!pItem)continue;
+ const SfxStyleFamilyItem *pItem = pStyleFamilies->at( i );
USHORT nId = SfxFamilyIdToNId(pItem->GetFamily());
if(nId == nActFamily)
return pItem;
@@ -1114,7 +1113,7 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr)
{
aFmtLb.MakeVisible( pEntry );
aFmtLb.Select( pEntry );
- bWaterDisabled = !HasSelectedStyle(); //added by BerryJia for fixing Bug76391 2003-1-22
+ bWaterDisabled = !HasSelectedStyle();
FmtSelectHdl( NULL );
}
}
@@ -1241,14 +1240,14 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // Flags
{
// Ist beim Vorlagenkatalog der Fall
SfxTemplateItem **ppItem = pFamilyState;
- const USHORT nFamilyCount = pStyleFamilies->Count();
- USHORT n;
- for(n=0;n<nFamilyCount;n++)
- if(ppItem[StyleNrToInfoOffset(n)])break;
+ const size_t nFamilyCount = pStyleFamilies->size();
+ size_t n;
+ for( n = 0; n < nFamilyCount; n++ )
+ if( ppItem[ StyleNrToInfoOffset(n) ] ) break;
if ( n == nFamilyCount )
// passiert gelegentlich bei Beichten, Formularen etc.; weiss der Teufel warum
return;
- ppItem+=StyleNrToInfoOffset(n);
+ ppItem += StyleNrToInfoOffset(n);
nAppFilter = (*ppItem)->GetValue();
FamilySelect( StyleNrToInfoOffset(n)+1 );
pItem = GetFamilyItem_Impl();
@@ -1256,8 +1255,8 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // Flags
const SfxStyleFamily eFam = pItem->GetFamily();
- SfxFilterTupel *pT = pItem->GetFilterList().GetObject(nActFilter);
- USHORT nFilter = pT ? pItem->GetFilterList().GetObject(nActFilter)->nFlags : 0;
+ SfxFilterTupel* pT = ( nActFilter < pItem->GetFilterList().size() ? pItem->GetFilterList()[nActFilter] : NULL );
+ USHORT nFilter = pT ? pT->nFlags : 0;
if(!nFilter) // automatisch
nFilter = nAppFilter;
@@ -1275,10 +1274,10 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // Flags
USHORT nPos = aFilterLb.InsertEntry(String(SfxResId(STR_STYLE_FILTER_HIERARCHICAL)), 0);
aFilterLb.SetEntryData( nPos, (void*)(ULONG)SFXSTYLEBIT_ALL );
const SfxStyleFilter& rFilter = pItem->GetFilterList();
- for(USHORT i = 0; i < rFilter.Count(); ++i)
+ for( size_t i = 0; i < rFilter.size(); ++i)
{
- ULONG nFilterFlags = rFilter.GetObject(i)->nFlags;
- nPos = aFilterLb.InsertEntry( rFilter.GetObject(i)->aName );
+ ULONG nFilterFlags = rFilter[ i ]->nFlags;
+ nPos = aFilterLb.InsertEntry( rFilter[ i ]->aName );
aFilterLb.SetEntryData( nPos, (void*)nFilterFlags );
}
if(nActFilter < aFilterLb.GetEntryCount() - 1)
@@ -1287,8 +1286,8 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // Flags
{
nActFilter = 0;
aFilterLb.SelectEntryPos(1);
- SfxFilterTupel *pActT = rFilter.GetObject(nActFilter);
- USHORT nFilterFlags = pActT ? rFilter.GetObject(nActFilter)->nFlags : 0;
+ SfxFilterTupel* pActT = ( nActFilter < rFilter.size() ) ? rFilter[ nActFilter ] : NULL;
+ USHORT nFilterFlags = pActT ? pActT->nFlags : 0;
pStyleSheetPool->SetSearchMask(eFam, nFilterFlags);
}
@@ -1313,7 +1312,6 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // Flags
if(nFlags & UPDATE_FAMILY_LIST)
{
-// EnableEdit(FALSE);
EnableItem(SID_STYLE_WATERCAN,FALSE);
SfxStyleSheetBase *pStyle = pStyleSheetPool->First();
@@ -1376,7 +1374,7 @@ void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem)
{
// EnableItem(SID_STYLE_WATERCAN, pItem != 0);
bWaterDisabled = pItem == 0;
-//added by BerryJia for fixing Bug76391 2003-1-7
+
if(!bWaterDisabled)
bWaterDisabled = !HasSelectedStyle();
@@ -1393,9 +1391,9 @@ void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem)
//Waehrend Giesskannenmodus Statusupdates ignorieren.
- USHORT nCount=pStyleFamilies->Count();
+ size_t nCount = pStyleFamilies->size();
pBindings->EnterRegistrations();
- for(USHORT n=0; n<nCount; n++)
+ for(size_t n = 0; n < nCount; n++)
{
SfxControllerItem *pCItem=pBoundItems[n];
BOOL bChecked = pItem && pItem->GetValue();
@@ -1462,7 +1460,6 @@ void SfxCommonTemplateDialog_Impl::Update_Impl()
pStyleSheetPool = pNewPool;
bDocChanged=TRUE;
}
-// InvalidateBindings();
}
if (bUpdateFamily)
@@ -1483,10 +1480,10 @@ void SfxCommonTemplateDialog_Impl::Update_Impl()
{
CheckItem(nActFamily, FALSE);
SfxTemplateItem **ppItem = pFamilyState;
- const USHORT nFamilyCount = pStyleFamilies->Count();
- USHORT n;
- for(n=0;n<nFamilyCount;n++)
- if(ppItem[StyleNrToInfoOffset(n)])break;
+ const size_t nFamilyCount = pStyleFamilies->size();
+ size_t n;
+ for( n = 0; n < nFamilyCount; n++ )
+ if( ppItem[ StyleNrToInfoOffset(n) ] ) break;
ppItem+=StyleNrToInfoOffset(n);
nAppFilter = (*ppItem)->GetValue();
@@ -1517,9 +1514,9 @@ void SfxCommonTemplateDialog_Impl::Update_Impl()
const SfxStyleFamilyItem *pStyleItem = GetFamilyItem_Impl();
#if OSL_DEBUG_LEVEL > 1
SfxFilterTupel *pT;
- pT = pStyleItem->GetFilterList().GetObject(nActFilter);
+ pT = pStyleItem->GetFilterList()[ nActFilter ];
#endif
- if(0 == pStyleItem->GetFilterList().GetObject(nActFilter)->nFlags
+ if ( 0 == pStyleItem->GetFilterList()[ nActFilter ]->nFlags
&& nAppFilter != pItem->GetValue())
{
nAppFilter = pItem->GetValue();
@@ -1739,18 +1736,17 @@ BOOL SfxCommonTemplateDialog_Impl::Execute_Impl(
if(!nFilterFlags) // Benutzervorlage?
nFilterFlags = pFilterItem->GetValue();
const SfxStyleFamilyItem *pFamilyItem = GetFamilyItem_Impl();
- const USHORT nFilterCount = (USHORT) pFamilyItem->GetFilterList().Count();
+ const size_t nFilterCount = pFamilyItem->GetFilterList().size();
- for ( USHORT i = 0; i < nFilterCount; ++i )
+ for ( size_t i = 0; i < nFilterCount; ++i )
{
- const SfxFilterTupel *pTupel =
- pFamilyItem->GetFilterList().GetObject(i);
+ const SfxFilterTupel *pTupel = pFamilyItem->GetFilterList()[ i ];
if ( ( pTupel->nFlags & nFilterFlags ) == nFilterFlags && pIdx )
*pIdx = i;
}
}
-
+
// Reset destroyed flag otherwise we use the pointer in the dtor
// where the local stack object is already destroyed. This would
// overwrite objects on the stack!! See #i100110
@@ -1805,7 +1801,6 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox )
// minus one since hierarchical is inserted at the start
FilterSelect(pBox->GetSelectEntryPos() - 1, bHierarchical );
bHierarchical=FALSE;
-// UpdateStyles_Impl(UPDATE_FAMILY_LIST); // Anzeige aktualisieren
}
return 0;
@@ -1866,13 +1861,11 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry)
if(pStyleSheetPool && nActFamily != 0xffff)
{
const SfxStyleFamily eFam=GetFamilyItem_Impl()->GetFamily();
-//pStyleSheetPool->GetSearchFamily();
const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
USHORT nFilter;
- if(pItem&&nActFilter!=0xffff)
+ if( pItem && nActFilter != 0xffff )
{
- nFilter = pItem->GetFilterList().GetObject(
- nActFilter)->nFlags;
+ nFilter = pItem->GetFilterList()[ nActFilter ]->nFlags;
if(!nFilter) // automatisch
nFilter = nAppFilter;
}
@@ -1880,9 +1873,8 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry)
nFilter=pStyleSheetPool->GetSearchMask();
pStyleSheetPool->SetSearchMask( eFam, SFXSTYLEBIT_USERDEF );
- SfxNewStyleDlg *pDlg =
+ SfxNewStyleDlg *pDlg = new SfxNewStyleDlg(pWindow, *pStyleSheetPool);
// why? : FloatingWindow must not be parent of a modal dialog
- new SfxNewStyleDlg(pWindow, *pStyleSheetPool);
if(RET_OK == pDlg->Execute())
{
pStyleSheetPool->SetSearchMask(eFam, nFilter);
@@ -2001,10 +1993,9 @@ void SfxCommonTemplateDialog_Impl::NewHdl(void *)
const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
const SfxStyleFamily eFam=pItem->GetFamily();
USHORT nMask;
- if(pItem&&nActFilter!=0xffff)
+ if( pItem && nActFilter != 0xffff )
{
- nMask = pItem->GetFilterList().GetObject(
- nActFilter)->nFlags;
+ nMask = pItem->GetFilterList()[ nActFilter ]->nFlags;
if(!nMask) // automatisch
nMask = nAppFilter;
}
@@ -2020,27 +2011,6 @@ void SfxCommonTemplateDialog_Impl::NewHdl(void *)
Application::SetDefDialogParent( pTmp );
-/* {
- DBG_ASSERT(nFilter < aFilterLb.GetEntryCount(),
- "Filter ueberindiziert");
-
- if(!pTreeBox)
- {
-// aFilterLb.SelectEntryPos(nFilter);
- FilterSelect(nActFilter, TRUE);
- }
- else
- {
- FillTreeBox();
- SfxTemplateItem *pState = pFamilyState[nActFamily-1];
- if(pState)
- {
- const String aStyle(pState->GetStyleName());
- SelectStyle(aStyle);
- }
- EnableDelete();
- }*/
-// }
}
}
@@ -2067,16 +2037,6 @@ void SfxCommonTemplateDialog_Impl::EditHdl(void *)
if ( Execute_Impl( SID_STYLE_EDIT, aTemplName, String(),
(USHORT)GetFamilyItem_Impl()->GetFamily(), 0, &nFilter ) )
{
-// DBG_ASSERT(nFilter < aFilterLb.GetEntryCount(), "Filter ueberindiziert");
-// aTemplName = pStyle->GetName();
-// kann durch Bearbeiten umbenannt worden sein
-/* if(!pTreeBox)
- {
- // aFilterLb.SelectEntryPos(nFilter);
- // FilterSelect(nFilter, TRUE);
- }
- else
- FillTreeBox();*/
}
Application::SetDefDialogParent( pTmp );
}
@@ -2137,13 +2097,13 @@ void SfxCommonTemplateDialog_Impl::EnableDelete()
const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
const SfxStyleFamily eFam = pItem->GetFamily();
USHORT nFilter = 0;
- if(pItem->GetFilterList().Count() > nActFilter)
- nFilter = pItem->GetFilterList().GetObject(nActFilter)->nFlags;
+ if(pItem->GetFilterList().size() > nActFilter)
+ nFilter = pItem->GetFilterList()[ nActFilter ]->nFlags;
if(!nFilter) // automatisch
nFilter = nAppFilter;
const SfxStyleSheetBase *pStyle =
- pStyleSheetPool->Find(aTemplName,eFam,
- pTreeBox? SFXSTYLEBIT_ALL: nFilter);
+ pStyleSheetPool->Find(aTemplName,eFam, pTreeBox? SFXSTYLEBIT_ALL: nFilter);
+
DBG_ASSERT(pStyle, "Style nicht gefunden");
if(pStyle && pStyle->IsUserDefined())
{
@@ -2158,8 +2118,6 @@ void SfxCommonTemplateDialog_Impl::EnableDelete()
{
EnableDel(FALSE);
}
-// rBindings.Invalidate( SID_STYLE_DELETE );
-// rBindings.Update( SID_STYLE_DELETE );
}
//-------------------------------------------------------------------------
@@ -2221,7 +2179,6 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FmtSelectHdl, SvTreeListBox *, pListBox
GetSelectedEntry(), aEmpty,
( USHORT )GetFamilyItem_Impl()->GetFamily());
}
-// EnableEdit(TRUE);
EnableItem(SID_STYLE_WATERCAN, !bWaterDisabled);
EnableDelete();
}
@@ -2378,14 +2335,13 @@ void SfxTemplateDialog_Impl::updateFamilyImages()
return;
// let the families collection update the images
- sal_Bool bIsHighContrast = m_pFloat->GetSettings().GetStyleSettings().GetHighContrastMode();
- pStyleFamilies->updateImages( *m_pStyleFamiliesId, bIsHighContrast ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL );
+ pStyleFamilies->updateImages( *m_pStyleFamiliesId );
// and set the new images on our toolbox
- USHORT nLoop = pStyleFamilies->Count();
+ size_t nLoop = pStyleFamilies->size();
for( ; nLoop--; )
{
- const SfxStyleFamilyItem *pItem = pStyleFamilies->GetObject( nLoop );
+ const SfxStyleFamilyItem *pItem = pStyleFamilies->at( nLoop );
USHORT nId = SfxFamilyIdToNId( pItem->GetFamily() );
m_aActionTbL.SetItemImage( nId, pItem->GetImage() );
}
@@ -2394,9 +2350,7 @@ void SfxTemplateDialog_Impl::updateFamilyImages()
// ------------------------------------------------------------------------
void SfxTemplateDialog_Impl::updateNonFamilyImages()
{
- m_aActionTbR.SetImageList( ImageList( SfxResId(
- m_pFloat->GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_LST_STYLE_DESIGNER_HC
- : DLG_STYLE_DESIGNER ) ) );
+ m_aActionTbR.SetImageList( ImageList( SfxResId( DLG_STYLE_DESIGNER ) ) );
}
// ------------------------------------------------------------------------
@@ -2426,14 +2380,6 @@ void SfxCommonTemplateDialog_Impl::InvalidateBindings()
SfxTemplateDialog_Impl::~SfxTemplateDialog_Impl()
{
-/*
- SfxImageManager* pImgMgr = pBindings->GetImageManager();
- if ( pImgMgr )
- {
- pImgMgr->ReleaseToolBox( &m_aActionTbL );
- pImgMgr->ReleaseToolBox( &m_aActionTbR );
- }
-*/
}
//-------------------------------------------------------------------------
@@ -2453,10 +2399,6 @@ void SfxTemplateDialog_Impl::Resize()
FloatingWindow *pF = m_pFloat->GetFloatingWindow();
if ( pF )
{
-// if(pF->IsZoomedIn() && m_bZoomIn==FALSE)
-// pF->SetText(String(SfxResId( DLG_STYLE_DESIGNER )));
-// if(!pF->IsZoomedIn() && m_bZoomIn==TRUE && GetFamilyItem_Impl())
-// UpdateStyles_Impl(UPDATE_FAMILY); //Bereich wieder in Titel schreiben
m_bZoomIn = pF->IsRollUp();
if ( m_bZoomIn )
return;
@@ -2607,7 +2549,7 @@ IMPL_LINK_INLINE_END( SfxTemplateDialog_Impl, ToolBoxLSelect, ToolBox *, pBox )
{
for( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
{
- if ( aPropSeq[i].Name.equalsAscii( "Label" ))
+ if ( aPropSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Label" ) ))
{
aPropSeq[i].Value >>= sRet;
break;
@@ -2637,12 +2579,12 @@ IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRClick, ToolBox *, pBox )
PopupMenu *pMenu = new PopupMenu;
uno::Reference< container::XNameAccess > xNameAccess(
::comphelper::getProcessServiceFactory()->
- createInstance( ::rtl::OUString::createFromAscii(
- "com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY );
+ createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.frame.UICommandDescription")) ), uno::UNO_QUERY );
uno::Reference< container::XNameAccess > xUICommands;
if ( xNameAccess.is() )
{
- rtl::OUString sTextDoc = ::rtl::OUString::createFromAscii("com.sun.star.text.TextDocument");
+ rtl::OUString sTextDoc(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextDocument"));
if(xNameAccess->hasByName(sTextDoc))
{
uno::Any a = xNameAccess->getByName( sTextDoc );
@@ -2654,18 +2596,18 @@ IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRClick, ToolBox *, pBox )
try
{
uno::Sequence< beans::PropertyValue > aPropSeq;
- uno::Any aCommand = xUICommands->getByName(::rtl::OUString::createFromAscii(".uno:StyleNewByExample"));
+ uno::Any aCommand = xUICommands->getByName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:StyleNewByExample")));
::rtl::OUString sLabel = lcl_GetLabel( aCommand );
pMenu->InsertItem( SID_STYLE_NEW_BY_EXAMPLE, sLabel );
pMenu->SetHelpId(SID_STYLE_NEW_BY_EXAMPLE, HID_TEMPLDLG_NEWBYEXAMPLE);
- aCommand = xUICommands->getByName(::rtl::OUString::createFromAscii(".uno:StyleUpdateByExample"));
+ aCommand = xUICommands->getByName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:StyleUpdateByExample")));
sLabel = lcl_GetLabel( aCommand );
pMenu->InsertItem( SID_STYLE_UPDATE_BY_EXAMPLE, sLabel );
pMenu->SetHelpId(SID_STYLE_UPDATE_BY_EXAMPLE, HID_TEMPLDLG_UPDATEBYEXAMPLE);
- aCommand = xUICommands->getByName(::rtl::OUString::createFromAscii(".uno:LoadStyles"));
+ aCommand = xUICommands->getByName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:LoadStyles")));
sLabel = lcl_GetLabel( aCommand );
pMenu->InsertItem( SID_TEMPLATE_LOAD, sLabel );
pMenu->SetHelpId(SID_TEMPLATE_LOAD, ".uno:LoadStyles");
@@ -2846,13 +2788,6 @@ void SfxTemplateCatalog_Impl::EnableItem( USHORT nMesId, BOOL bCheck )
aOkBtn.Enable( bCheck );
if ( nMesId > SFX_STYLE_FAMILY_PSEUDO || nMesId < SFX_STYLE_FAMILY_CHAR )
return;
-
-/* for(USHORT i=0;i<aFamIds.Count&&aFamIds[i]!=nMesId;i++);
- if(i!=aFamIds.Count())
- aFamList.SelectEntry(aFamIds[i]);
- else
- DBG_ERROR("Entry nicht gefunden");*/
-
}
//-------------------------------------------------------------------------
@@ -2992,24 +2927,17 @@ void SfxTemplateDialog::StateChanged( StateChangedType nStateChange )
SfxDockingWindow::StateChanged( nStateChange );
}
-/*-- 10.12.2003 11:44:35---------------------------------------------------
-
- -----------------------------------------------------------------------*/
DropToolBox_Impl::DropToolBox_Impl(Window* pParent, SfxTemplateDialog_Impl* pTemplateDialog) :
ToolBox(pParent),
DropTargetHelper(this),
rParent(*pTemplateDialog)
{
}
-/*-- 10.12.2003 11:44:35---------------------------------------------------
- -----------------------------------------------------------------------*/
DropToolBox_Impl::~DropToolBox_Impl()
{
}
-/*-- 10.12.2003 11:44:35---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int8 DropToolBox_Impl::AcceptDrop( const AcceptDropEvent& rEvt )
{
sal_Int8 nReturn = DND_ACTION_NONE;
@@ -3029,11 +2957,10 @@ sal_Int8 DropToolBox_Impl::AcceptDrop( const AcceptDropEvent& rEvt )
}
return nReturn;
}
-/*-- 10.12.2003 11:44:35---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int8 DropToolBox_Impl::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
return rParent.aFmtLb.ExecuteDrop(rEvt);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/templdlg.src b/sfx2/source/dialog/templdlg.src
index 31cf999d37..477e121b10 100644
--- a/sfx2/source/dialog/templdlg.src
+++ b/sfx2/source/dialog/templdlg.src
@@ -42,18 +42,7 @@ ImageList DLG_STYLE_DESIGNER
};
IdCount = { 3 ; };
};
-ImageList IMG_LST_STYLE_DESIGNER_HC
-{
- Prefix = "sch";
- MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
- IdList =
- {
- SID_STYLE_WATERCAN ;
- SID_STYLE_NEW_BY_EXAMPLE ;
- SID_STYLE_UPDATE_BY_EXAMPLE ;
- };
- IdCount = { 3 ; };
-};
+
// RID_STYLECATALOG ------------------------------------------------------
ModalDialog RID_STYLECATALOG
{
@@ -142,11 +131,13 @@ ModalDialog RID_STYLECATALOG
DropDown = TRUE ;
};
};
+
// Strings ---------------------------------------------------------------
String STR_STYLE_FILTER_HIERARCHICAL
{
Text [ en-US ] = "Hierarchical" ;
};
+
// DLG_STYLE_DESIGNER ----------------------------------------------------
DockingWindow DLG_STYLE_DESIGNER
{
diff --git a/sfx2/source/dialog/titledockwin.src b/sfx2/source/dialog/titledockwin.src
deleted file mode 100644
index 4abd7184a8..0000000000
--- a/sfx2/source/dialog/titledockwin.src
+++ /dev/null
@@ -1,39 +0,0 @@
-/*************************************************************************
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include <sfx2/sfx.hrc>
-#include "sfxlocal.hrc"
-
-Image SFX_IMG_CLOSE_DOC
-{
- ImageBitmap = Bitmap { File = "closedoc.png" ; };
-};
-
-Image SFX_IMG_CLOSE_DOC_HC
-{
- ImageBitmap = Bitmap { File = "closedochc.png" ; };
-};
-
diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx
index 3985cb2126..d712897e47 100644
--- a/sfx2/source/dialog/tplcitem.cxx
+++ b/sfx2/source/dialog/tplcitem.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79,7 +80,7 @@ void SfxTemplateControllerItem::StateChanged( USHORT nSID, SfxItemState eState,
case SID_STYLE_FAMILY4:
case SID_STYLE_FAMILY5:
{
- FASTBOOL bAvailable = SFX_ITEM_AVAILABLE == eState;
+ bool bAvailable = SFX_ITEM_AVAILABLE == eState;
if ( !bAvailable )
rTemplateDlg.SetFamilyState(GetId(), 0);
else {
@@ -163,9 +164,7 @@ void SfxTemplateControllerItem::StateChanged( USHORT nSID, SfxItemState eState,
}
}
}
-/* -----------------------------05.09.2001 10:48------------------------------
- ---------------------------------------------------------------------------*/
IMPL_STATIC_LINK(SfxTemplateControllerItem, SetWaterCanStateHdl_Impl,
SfxTemplateControllerItem*, EMPTYARG)
{
@@ -183,3 +182,4 @@ IMPL_STATIC_LINK(SfxTemplateControllerItem, SetWaterCanStateHdl_Impl,
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/tplpitem.cxx b/sfx2/source/dialog/tplpitem.cxx
index b283dac807..fcb9d6ee7f 100644
--- a/sfx2/source/dialog/tplpitem.cxx
+++ b/sfx2/source/dialog/tplpitem.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,19 +85,19 @@ SfxPoolItem* SfxTemplateItem::Clone( SfxItemPool *) const
}
//-------------------------------------------------------------------------
-sal_Bool SfxTemplateItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const
+bool SfxTemplateItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const
{
::com::sun::star::frame::status::Template aTemplate;
-
+
aTemplate.Value = GetValue();
aTemplate.StyleName = aStyle;
rVal <<= aTemplate;
- return sal_True;
+ return true;
}
//-------------------------------------------------------------------------
-sal_Bool SfxTemplateItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ )
+bool SfxTemplateItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ )
{
::com::sun::star::frame::status::Template aTemplate;
@@ -104,10 +105,10 @@ sal_Bool SfxTemplateItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /
{
SetValue( sal::static_int_cast< USHORT >( aTemplate.Value ) );
aStyle = aTemplate.StyleName;
- return sal_True;
+ return true;
}
-
- return sal_False;
+
+ return false;
}
//-------------------------------------------------------------------------
@@ -118,3 +119,4 @@ BYTE SfxTemplateItem::GetFlagCount() const
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index fa20b7dbb1..9ae9c09e76 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
#include <unotools/localedatawrapper.hxx>
-#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
#include <comphelper/processfactory.hxx>
#endif
#include <svl/eitem.hxx>
@@ -54,8 +54,10 @@
#include <sfx2/request.hxx>
#include <sfx2/sfxuno.hxx>
+#include <vector>
using namespace com::sun::star;
+using ::std::vector;
// **************************************************************************
struct SfxVersionInfo
@@ -78,16 +80,15 @@ struct SfxVersionInfo
return *this;
}
};
-DECLARE_LIST( _SfxVersionTable, SfxVersionInfo* )
-class SfxVersionTableDtor : public _SfxVersionTable
+
+typedef vector< SfxVersionInfo* > _SfxVersionTable;
+
+class SfxVersionTableDtor
{
+private:
+ _SfxVersionTable aTableList;
public:
- SfxVersionTableDtor( const sal_uInt16 nInitSz=0, const sal_uInt16 nReSz=1 )
- : _SfxVersionTable( nInitSz, nReSz )
- {}
-
- SfxVersionTableDtor( const SfxVersionTableDtor &rCpy ) :
- _SfxVersionTable( rCpy )
+ SfxVersionTableDtor( const SfxVersionTableDtor &rCpy )
{ *this = rCpy; }
SfxVersionTableDtor( const uno::Sequence < util::RevisionTag >& rInfo );
@@ -100,6 +101,12 @@ public:
SvStream& Read( SvStream & );
SvStream& Write( SvStream & ) const;
SvStringsDtor* GetVersions() const;
+
+ size_t size() const
+ { return aTableList.size(); }
+
+ SfxVersionInfo* at( size_t i ) const
+ { return aTableList[ i ]; }
};
SfxVersionTableDtor::SfxVersionTableDtor( const uno::Sequence < util::RevisionTag >& rInfo )
@@ -111,34 +118,28 @@ SfxVersionTableDtor::SfxVersionTableDtor( const uno::Sequence < util::RevisionTa
pInfo->aComment = rInfo[n].Comment;
pInfo->aAuthor = rInfo[n].Author;
- Date aDate ( rInfo[n].TimeStamp.Day, rInfo[n].TimeStamp.Month, rInfo[n].TimeStamp.Year );
+ Date aDate ( rInfo[n].TimeStamp.Day, rInfo[n].TimeStamp.Month, rInfo[n].TimeStamp.Year );
Time aTime ( rInfo[n].TimeStamp.Hours, rInfo[n].TimeStamp.Minutes, rInfo[n].TimeStamp.Seconds, rInfo[n].TimeStamp.HundredthSeconds );
pInfo->aCreationDate = DateTime( aDate, aTime );
- Insert( pInfo, Count() );
+ aTableList.push_back( pInfo );
}
}
void SfxVersionTableDtor::DelDtor()
{
- SfxVersionInfo* pTmp = First();
- while( pTmp )
- {
- delete pTmp;
- pTmp = Next();
- }
- Clear();
+ for ( size_t i = 0, n = aTableList.size(); i < n; ++i )
+ delete aTableList[ i ];
+ aTableList.clear();
}
SfxVersionTableDtor& SfxVersionTableDtor::operator=( const SfxVersionTableDtor& rTbl )
{
DelDtor();
- SfxVersionInfo* pTmp = ((SfxVersionTableDtor&)rTbl).First();
- while( pTmp )
+ for ( size_t i = 0, n = rTbl.size(); i < n; ++i )
{
- SfxVersionInfo *pNew = new SfxVersionInfo( *pTmp );
- Insert( pNew, LIST_APPEND );
- pTmp = ((SfxVersionTableDtor&)rTbl).Next();
+ SfxVersionInfo* pNew = new SfxVersionInfo( *(rTbl.at( i )) );
+ aTableList.push_back( pNew );
}
return *this;
}
@@ -162,17 +163,16 @@ static String ConvertDateTime_Impl(const DateTime& rTime, const LocaleDataWrappe
SvStringsDtor* SfxVersionTableDtor::GetVersions() const
{
SvStringsDtor *pList = new SvStringsDtor;
- SfxVersionInfo* pInfo = ((SfxVersionTableDtor*) this)->First();
LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
- while ( pInfo )
+
+ for ( size_t i = 0, n = aTableList.size(); i < n; ++i )
{
+ SfxVersionInfo* pInfo = aTableList[ i ];
String *pString = new String( pInfo->aComment );
(*pString) += DEFINE_CONST_UNICODE( "; " );
(*pString) += ConvertDateTime_Impl( pInfo->aCreationDate, aLocaleWrapper );
pList->Insert( pString, pList->Count() );
- pInfo = ((SfxVersionTableDtor*) this)->Next();
}
-
return pList;
}
@@ -285,9 +285,9 @@ void SfxVersionDialog::Init_Impl()
delete mpTable;
mpTable = new SfxVersionTableDtor( aVersions );
{
- for ( USHORT n = 0; n < mpTable->Count(); ++n )
+ for ( size_t n = 0; n < mpTable->size(); ++n )
{
- SfxVersionInfo *pInfo = mpTable->GetObject(n);
+ SfxVersionInfo *pInfo = mpTable->at( n );
String aEntry = ConvertDateTime_Impl( pInfo->aCreationDate, *mpLocaleWrapper );
aEntry += '\t';
aEntry += pInfo->aAuthor;
@@ -517,3 +517,4 @@ IMPL_LINK( SfxViewVersionDialog_Impl, ButtonHdl, Button*, pButton )
return 0L;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */