summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r--sfx2/source/dialog/alienwarn.cxx2
-rw-r--r--sfx2/source/dialog/basedlgs.cxx4
-rw-r--r--sfx2/source/dialog/dialog.hrc2
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx377
-rw-r--r--sfx2/source/dialog/dinfdlg.hrc22
-rw-r--r--sfx2/source/dialog/dinfdlg.src222
-rw-r--r--sfx2/source/dialog/dockwin.cxx2
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx22
-rw-r--r--sfx2/source/dialog/filedlgimpl.hxx2
-rw-r--r--sfx2/source/dialog/intro.cxx4
-rw-r--r--sfx2/source/dialog/itemconnect.cxx2
-rw-r--r--sfx2/source/dialog/mailmodel.cxx102
-rw-r--r--sfx2/source/dialog/mailmodelapi.cxx32
-rw-r--r--sfx2/source/dialog/mgetempl.cxx8
-rw-r--r--sfx2/source/dialog/newstyle.cxx2
-rw-r--r--sfx2/source/dialog/passwd.cxx28
-rw-r--r--sfx2/source/dialog/printopt.cxx4
-rw-r--r--sfx2/source/dialog/recfloat.cxx2
-rw-r--r--sfx2/source/dialog/splitwin.cxx4
-rw-r--r--sfx2/source/dialog/srchdlg.cxx4
-rw-r--r--sfx2/source/dialog/styledlg.cxx4
-rw-r--r--sfx2/source/dialog/tabdlg.cxx4
-rw-r--r--sfx2/source/dialog/templdlg.cxx12
-rw-r--r--sfx2/source/dialog/tplcitem.cxx2
-rw-r--r--sfx2/source/dialog/versdlg.cxx14
25 files changed, 668 insertions, 215 deletions
diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx
index 5ed5569ea3..f7f3f7b14e 100644
--- a/sfx2/source/dialog/alienwarn.cxx
+++ b/sfx2/source/dialog/alienwarn.cxx
@@ -38,7 +38,7 @@
#include "alienwarn.hrc"
#include "dialog.hrc"
#include <vcl/msgbox.hxx>
-#include <svtools/saveopt.hxx>
+#include <unotools/saveopt.hxx>
// class SfxAlienWarningDialog -------------------------------------------
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index d93a4884c1..432e2ed173 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -37,8 +37,8 @@
#include <vcl/fixed.hxx>
#include <vcl/help.hxx>
#include <vcl/msgbox.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/viewoptions.hxx>
+#include <svl/eitem.hxx>
+#include <unotools/viewoptions.hxx>
#include <svtools/fixedhyper.hxx>
#include <svtools/controldims.hrc>
diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc
index e41fbc0746..1d0e4c9066 100644
--- a/sfx2/source/dialog/dialog.hrc
+++ b/sfx2/source/dialog/dialog.hrc
@@ -109,6 +109,8 @@
#define STR_PDF_EXPORT_SEND ( RC_DIALOG_BEGIN + 120 )
#define STR_RECHECK_DOCUMENT ( RC_DIALOG_BEGIN + 121 )
#define IMG_INFO ( RC_DIALOG_BEGIN + 122 )
+#define RID_EDIT_DURATIONS ( RC_DIALOG_BEGIN + 123 )
+#define SFX_PB_EDIT ( RC_DIALOG_BEGIN + 124 )
#endif // #ifndef _SFX_DIALOG_HRC
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index d59d36855c..e5b555d977 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -32,13 +32,13 @@
#include "precompiled_sfx2.hxx"
#include <tools/urlobj.hxx>
#include <vcl/msgbox.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <vcl/svapp.hxx>
#include <sfx2/filedlghelper.hxx>
#include <unotools/localedatawrapper.hxx>
#include <comphelper/processfactory.hxx>
-#include <svtools/urihelper.hxx>
-#include <svtools/useroptions.hxx>
+#include <svl/urihelper.hxx>
+#include <unotools/useroptions.hxx>
#include <svtools/imagemgr.hxx>
#include <tools/datetime.hxx>
@@ -49,12 +49,15 @@
#include <com/sun/star/security/DocumentSignatureInformation.hpp>
#include <com/sun/star/security/XDocumentDigitalSignatures.hpp>
#include <unotools/localedatawrapper.hxx>
-#include <svtools/syslocale.hxx>
+#include <unotools/syslocale.hxx>
#include <rtl/math.hxx>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/XPropertyContainer.hpp>
+#include <com/sun/star/util/DateTime.hpp>
#include <com/sun/star/util/Date.hpp>
+#include <com/sun/star/util/Time.hpp>
+#include <com/sun/star/util/Duration.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <vcl/timer.hxx>
@@ -73,6 +76,8 @@
#include <sfx2/sfx.hrc>
#include "dinfdlg.hrc"
#include "sfxlocal.hrc"
+#include <dialog.hrc>
+#include <vcl/help.hxx>
#include <algorithm>
@@ -269,8 +274,12 @@ SfxDocumentInfoItem::SfxDocumentInfoItem( const String& rFile,
for ( sal_Int32 i = 0; i < nCount; ++i )
{
// "fix" property? => not a custom property => ignore it!
- if ( !(pProps[i].Attributes & ::com::sun::star::beans::PropertyAttribute::REMOVABLE) )
+ if (!(pProps[i].Attributes &
+ ::com::sun::star::beans::PropertyAttribute::REMOVABLE))
+ {
+ DBG_ASSERT(false, "non-removable user-defined property?");
continue;
+ }
uno::Any aValue = xSet->getPropertyValue(pProps[i].Name);
CustomProperty* pProp = new CustomProperty( pProps[i].Name, aValue );
@@ -424,7 +433,13 @@ void SfxDocumentInfoItem::UpdateDocumentInfo(
const beans::Property* pProps = lProps.getConstArray();
sal_Int32 nCount = lProps.getLength();
for ( sal_Int32 j = 0; j < nCount; ++j )
- xContainer->removeProperty( pProps[j].Name );
+ {
+ if ((pProps[j].Attributes &
+ ::com::sun::star::beans::PropertyAttribute::REMOVABLE))
+ {
+ xContainer->removeProperty( pProps[j].Name );
+ }
+ }
for ( sal_uInt32 k = 0; k < m_aCustomProperties.size(); ++k )
{
@@ -1567,7 +1582,168 @@ CustomPropertiesYesNoButton::CustomPropertiesYesNoButton( Window* pParent, const
m_aYesButton.SetBackground( aWall );
m_aNoButton.SetBackground( aWall );
}
+class DurationDialog_Impl : public ModalDialog
+{
+ FixedLine aDurationFL;
+
+ OKButton aOKPB;
+ CancelButton aCancelPB;
+ HelpButton aHelpPB;
+
+ CheckBox aNegativeCB;
+ FixedText aYearFT;
+ NumericField aYearNF;
+ FixedText aMonthFT;
+ NumericField aMonthNF;
+ FixedText aDayFT;
+ NumericField aDayNF;
+ FixedText aHourFT;
+ NumericField aHourNF;
+ FixedText aMinuteFT;
+ NumericField aMinuteNF;
+ FixedText aSecondFT;
+ NumericField aSecondNF;
+ FixedText aHSecondFT;
+ NumericField aHSecondNF;
+
+public:
+
+ DurationDialog_Impl( Window* pParent, const util::Duration& rDuration );
+ ~DurationDialog_Impl();
+
+ util::Duration GetDuration() const;
+};
+/*-- 20.11.2009 15:40:46---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+DurationDialog_Impl::DurationDialog_Impl( Window* pParent, const util::Duration& rDuration ) :
+ ModalDialog( pParent, SfxResId( RID_EDIT_DURATIONS ) ),
+ aDurationFL(this, SfxResId( FL_DURATION )),
+ aOKPB( this, SfxResId( PB_OK )),
+ aCancelPB( this, SfxResId( PB_CANCEL )),
+ aHelpPB( this, SfxResId( PB_HELP )),
+ aNegativeCB(this, SfxResId( CB_NEGATIVE )),
+ aYearFT( this, SfxResId( FT_YEAR )),
+ aYearNF( this, SfxResId( ED_YEAR )),
+ aMonthFT( this, SfxResId( FT_MONTH )),
+ aMonthNF( this, SfxResId( ED_MONTH )),
+ aDayFT( this, SfxResId( FT_DAY )),
+ aDayNF( this, SfxResId( ED_DAY )),
+ aHourFT( this, SfxResId( FT_HOUR )),
+ aHourNF( this, SfxResId( ED_HOUR )),
+ aMinuteFT( this, SfxResId( FT_MINUTE )),
+ aMinuteNF( this, SfxResId( ED_MINUTE )),
+ aSecondFT( this, SfxResId( FT_SECOND )),
+ aSecondNF( this, SfxResId( ED_SECOND )),
+ aHSecondFT( this, SfxResId( FT_HSECOND )),
+ aHSecondNF( this, SfxResId( ED_HSECOND ))
+{
+ FreeResource();
+ aNegativeCB.Check(rDuration.Negative);
+ aYearNF.SetValue(rDuration.Years);
+ aMonthNF.SetValue(rDuration.Months );
+ aDayNF.SetValue(rDuration.Days );
+ aHourNF.SetValue(rDuration.Hours );
+ aMinuteNF.SetValue(rDuration.Minutes);
+ aSecondNF.SetValue(rDuration.Seconds);
+ aHSecondNF.SetValue(rDuration.HundredthSeconds);
+}
+/*-- 20.11.2009 16:08:55---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+DurationDialog_Impl::~DurationDialog_Impl()
+{
+}
+/*-- 20.11.2009 15:41:47---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+util::Duration DurationDialog_Impl::GetDuration() const
+{
+ util::Duration aRet;
+ aRet.Negative = aNegativeCB.IsChecked();
+ aRet.Years = aYearNF.GetValue();
+ aRet.Months = aMonthNF.GetValue( );
+ aRet.Days = aDayNF.GetValue( );
+ aRet.Hours = aHourNF.GetValue( );
+ aRet.Minutes = aMinuteNF.GetValue();
+ aRet.Seconds = aSecondNF.GetValue();
+ aRet.HundredthSeconds = aHSecondNF.GetValue();
+ return aRet;
+}
+
+/*-- 20.11.2009 15:30:58---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+CustomPropertiesDurationField::CustomPropertiesDurationField( Window* pParent, const ResId& rResId, CustomPropertyLine* pLine ) :
+ Edit( pParent, rResId ), m_pLine( pLine )
+
+{
+ SetDuration( util::Duration(false, 0, 0, 0, 0, 0, 0, 0) );
+}
+/*-- 23.11.2009 08:46:02---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+CustomPropertiesDurationField::~CustomPropertiesDurationField()
+{
+}
+/*-- 23.11.2009 09:23:35---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+void CustomPropertiesDurationField::RequestHelp( const HelpEvent& rHEvt )
+{
+ if( rHEvt.GetMode() & HELPMODE_QUICK )
+ {
+ Size aSize( GetSizePixel() );
+ Rectangle aItemRect( rHEvt.GetMousePosPixel(), aSize );
+ if(Help::IsBalloonHelpEnabled())
+ Help::ShowBalloon( this, rHEvt.GetMousePosPixel(), GetText() );
+ else
+ Help::ShowQuickHelp( this, aItemRect, GetText(),
+ QUICKHELP_LEFT|QUICKHELP_VCENTER );
+ }
+}
+/*-- 20.11.2009 15:30:58---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+void CustomPropertiesDurationField::SetDuration( const util::Duration& rDuration )
+{
+ m_aDuration = rDuration;
+ String sText(rDuration.Negative ? '-' : '+');
+ sText += m_pLine->m_sDurationFormat;
+ sText.SearchAndReplace(String::CreateFromAscii( "%1"), String::CreateFromInt32( rDuration.Years ) );
+ sText.SearchAndReplace(String::CreateFromAscii( "%2"), String::CreateFromInt32( rDuration.Months ) );
+ sText.SearchAndReplace(String::CreateFromAscii( "%3"), String::CreateFromInt32( rDuration.Days ) );
+ sText.SearchAndReplace(String::CreateFromAscii( "%4"), String::CreateFromInt32( rDuration.Hours ) );
+ sText.SearchAndReplace(String::CreateFromAscii( "%5"), String::CreateFromInt32( rDuration.Minutes) );
+ sText.SearchAndReplace(String::CreateFromAscii( "%6"), String::CreateFromInt32( rDuration.Seconds) );
+ SetText( sText );
+}
+/*-- 23.11.2009 08:51:15---------------------------------------------------
+ -----------------------------------------------------------------------*/
+CustomPropertiesEditButton::CustomPropertiesEditButton( Window* pParent, const ResId& rResId, CustomPropertyLine* pLine ) :
+ PushButton( pParent, rResId ), m_pLine( pLine )
+{
+ SetClickHdl( LINK( this, CustomPropertiesEditButton, ClickHdl ));
+}
+/*-- 23.11.2009 08:51:15---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+CustomPropertiesEditButton::~CustomPropertiesEditButton()
+{
+}
+/*-- 23.11.2009 08:47:37---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+IMPL_LINK( CustomPropertiesEditButton, ClickHdl, PushButton*, EMPTYARG )
+{
+ DurationDialog_Impl* pDurationDlg = new DurationDialog_Impl( this, m_pLine->m_aDurationField.GetDuration() );
+ if( RET_OK == pDurationDlg->Execute() )
+ m_pLine->m_aDurationField.SetDuration( pDurationDlg->GetDuration() );
+ delete pDurationDlg;
+ return 1;
+}
+//--------------------------------------------------------------------------
void CustomPropertiesYesNoButton::Resize()
{
const long nWidth = GetSizePixel().Width();
@@ -1588,12 +1764,20 @@ CustomPropertyLine::CustomPropertyLine( Window* pParent ) :
m_aNameBox ( pParent, SfxResId( SFX_CB_PROPERTY_NAME ) ),
m_aTypeBox ( pParent, SfxResId( SFX_LB_PROPERTY_TYPE ), this ),
m_aValueEdit ( pParent, SfxResId( SFX_ED_PROPERTY_VALUE ), this ),
+ m_aDateField ( pParent, SfxResId( SFX_FLD_DATE), this),
+ m_aTimeField ( pParent, SfxResId( SFX_FLD_TIME), this),
+ m_sDurationFormat( SfxResId( SFX_ST_DURATION_FORMAT )),
+ m_aDurationField( pParent, SfxResId( SFX_FLD_DURATION), this),
+ m_aEditButton( pParent, SfxResId( SFX_PB_EDIT ), this),
m_aYesNoButton ( pParent, SfxResId( SFX_WIN_PROPERTY_YESNO ) ),
m_aRemoveButton ( pParent, SfxResId( SFX_PB_PROPERTY_REMOVE ), this ),
m_bIsRemoved ( false ),
m_bTypeLostFocus( false )
{
+ 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 );
}
@@ -1605,6 +1789,10 @@ void CustomPropertyLine::SetRemoved()
m_aNameBox.Hide();
m_aTypeBox.Hide();
m_aValueEdit.Hide();
+ m_aDateField.Hide();
+ m_aTimeField.Hide();
+ m_aDurationField.Hide();
+ m_aEditButton.Hide();
m_aYesNoButton.Hide();
m_aRemoveButton.Hide();
}
@@ -1617,6 +1805,10 @@ CustomPropertiesWindow::CustomPropertiesWindow( Window* pParent, const ResId& rR
m_aNameBox ( this, SfxResId( SFX_CB_PROPERTY_NAME ) ),
m_aTypeBox ( this, SfxResId( SFX_LB_PROPERTY_TYPE ) ),
m_aValueEdit ( this, SfxResId( SFX_ED_PROPERTY_VALUE ) ),
+ m_aDateField ( this, SfxResId( SFX_FLD_DATE) ),
+ m_aTimeField ( this, SfxResId( SFX_FLD_TIME) ),
+ m_aDurationField( this, SfxResId( SFX_FLD_DURATION) ),
+ m_aEditButton( this, SfxResId( SFX_PB_EDIT )),
m_aYesNoButton ( this, SfxResId( SFX_WIN_PROPERTY_YESNO ) ),
m_aRemoveButton ( this, SfxResId( SFX_PB_PROPERTY_REMOVE ) ),
m_nScrollPos (0),
@@ -1641,9 +1833,23 @@ IMPL_LINK( CustomPropertiesWindow, TypeHdl, CustomPropertiesTypeBox*, pBox )
{
sal_Int64 nType = sal_Int64( (long)pBox->GetEntryData( pBox->GetSelectEntryPos() ) );
CustomPropertyLine* pLine = pBox->GetLine();
- BOOL bBooleanType = ( CUSTOM_TYPE_BOOLEAN == nType );
- pLine->m_aValueEdit.Show( !bBooleanType );
- pLine->m_aYesNoButton.Show( bBooleanType );
+ pLine->m_aValueEdit.Show( (CUSTOM_TYPE_TEXT == nType) || (CUSTOM_TYPE_NUMBER == nType) );
+ pLine->m_aDateField.Show( (CUSTOM_TYPE_DATE == nType) || (CUSTOM_TYPE_DATETIME == nType) );
+ pLine->m_aTimeField.Show( CUSTOM_TYPE_DATETIME == nType );
+ pLine->m_aDurationField.Show( CUSTOM_TYPE_DURATION == nType );
+ pLine->m_aEditButton.Show( CUSTOM_TYPE_DURATION == nType );
+ pLine->m_aYesNoButton.Show( CUSTOM_TYPE_BOOLEAN == nType );
+ //adjust positions of date and time controls
+ if( nType == CUSTOM_TYPE_DATE )
+ {
+ pLine->m_aDateField.SetPosSizePixel(pLine->m_aValueEdit.GetPosPixel(), pLine->m_aValueEdit.GetSizePixel());
+ }
+ else if( nType == CUSTOM_TYPE_DATETIME)
+ {
+ pLine->m_aDateField.SetPosSizePixel( pLine->m_aDatePos, pLine->m_aDateTimeSize );
+ pLine->m_aTimeField.SetPosSizePixel(pLine->m_aTimePos, pLine->m_aDateTimeSize );
+ }
+
return 0;
}
@@ -1665,6 +1871,8 @@ IMPL_LINK( CustomPropertiesWindow, RemoveHdl, CustomPropertiesRemoveButton*, pBu
continue;
Window* pWindows[] = { &pLine->m_aNameBox, &pLine->m_aTypeBox, &pLine->m_aValueEdit,
+ &pLine->m_aDateField, &pLine->m_aTimeField,
+ &pLine->m_aDurationField, &pLine->m_aEditButton,
&pLine->m_aYesNoButton, &pLine->m_aRemoveButton, NULL };
Window** pCurrent = pWindows;
while ( *pCurrent )
@@ -1774,6 +1982,10 @@ void CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa
m_aNameBox.Hide();
m_aTypeBox.Hide();
m_aValueEdit.Hide();
+ m_aDateField.Hide();
+ m_aTimeField.Hide();
+ m_aDurationField.Hide();
+ m_aEditButton.Hide();
m_aYesNoButton.Hide();
m_aRemoveButton.Hide();
@@ -1805,11 +2017,23 @@ void CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa
if ( *pCurrent == &m_aValueEdit )
{
+ Point aDurationPos( aPos );
+ m_aDurationField.SetPosPixel( aDurationPos );
+ Size aDurationSize(aSize);
+ aDurationSize.Width() -= (m_aEditButton.GetSizePixel().Width() + 3 );
+ m_aDurationField.SetSizePixel(aDurationSize);
+ aDurationPos.X() = aPos.X() - m_aEditButton.GetSizePixel().Width() + aSize.Width();
+ m_aEditButton.SetPosPixel(aDurationPos);
aSize = m_aYesNoButton.GetSizePixel();
aPos = m_aYesNoButton.GetPosPixel();
aSize.Width() = nWidth;
aPos.X() = aRect.getX() + ( nOffset / 2 );
m_aYesNoButton.SetPosSizePixel( aPos, aSize );
+ aSize.Width() /= 2;
+ aSize.Width() -= 2;
+ m_aDateField.SetPosSizePixel( aPos, aSize );
+ aPos.X() += aSize.Width() + 4;
+ m_aTimeField.SetPosSizePixel( aPos, aSize );
}
pCurrent++;
@@ -1839,13 +2063,19 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny )
pNewLine->m_aTypeBox.SetSelectHdl( LINK( this, CustomPropertiesWindow, TypeHdl ) );
pNewLine->m_aRemoveButton.SetClickHdl( LINK( this, CustomPropertiesWindow, RemoveHdl ) );
pNewLine->m_aValueEdit.SetLoseFocusHdl( LINK( this, CustomPropertiesWindow, EditLoseFocusHdl ) );
+ //add lose focus handlers of date/time fields
+
pNewLine->m_aTypeBox.SetLoseFocusHdl( LINK( this, CustomPropertiesWindow, BoxLoseFocusHdl ) );
long nPos = GetVisibleLineCount() * GetLineHeight();
m_aCustomPropertiesLines.push_back( pNewLine );
Window* pWindows[] = { &m_aNameBox, &m_aTypeBox, &m_aValueEdit,
+ &m_aDateField, &m_aTimeField,
+ &m_aDurationField, &m_aEditButton,
&m_aYesNoButton, &m_aRemoveButton, NULL };
Window* pNewWindows[] =
{ &pNewLine->m_aNameBox, &pNewLine->m_aTypeBox, &pNewLine->m_aValueEdit,
+ &pNewLine->m_aDateField, &pNewLine->m_aTimeField,
+ &pNewLine->m_aDurationField, &pNewLine->m_aEditButton,
&pNewLine->m_aYesNoButton, &pNewLine->m_aRemoveButton, NULL };
Window** pCurrent = pWindows;
Window** pNewCurrent = pNewWindows;
@@ -1860,11 +2090,17 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny )
pCurrent++;
pNewCurrent++;
}
+ //
+ pNewLine->m_aDatePos = pNewLine->m_aDateField.GetPosPixel();
+ pNewLine->m_aTimePos = pNewLine->m_aTimeField.GetPosPixel();
+ pNewLine->m_aDateTimeSize = pNewLine->m_aDateField.GetSizePixel();
double nTmpValue = 0;
bool bTmpValue = false;
::rtl::OUString sTmpValue;
- util::DateTime aTmpDate;
+ util::DateTime aTmpDateTime;
+ util::Date aTmpDate;
+ util::Duration aTmpDuration;
SvtSysLocale aSysLocale;
const LocaleDataWrapper& rLocaleWrapper = aSysLocale.GetLocaleData();
pNewLine->m_aNameBox.SetText( sName );
@@ -1875,6 +2111,7 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny )
{
sal_uInt32 nIndex = m_aNumberFormatter.GetFormatIndex( NF_NUMBER_SYSTEM );
m_aNumberFormatter.GetInputLineString( nTmpValue, nIndex, sValue );
+ pNewLine->m_aValueEdit.SetText( sValue );
nType = CUSTOM_TYPE_NUMBER;
}
else if ( rAny >>= bTmpValue )
@@ -1884,50 +2121,26 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny )
}
else if ( rAny >>= sTmpValue )
{
- sValue = String( sTmpValue );
+ pNewLine->m_aValueEdit.SetText( sTmpValue );
nType = CUSTOM_TYPE_TEXT;
}
else if ( rAny >>= aTmpDate )
{
- DateFormat eFormat = rLocaleWrapper.getDateFormat();
- sal_Unicode cDateSep = rLocaleWrapper.getDateSep().GetChar(0);
- switch ( eFormat )
- {
- case MDY :
- {
- sValue = String::CreateFromInt32( aTmpDate.Month );
- sValue += cDateSep;
- sValue += String::CreateFromInt32( aTmpDate.Day );
- sValue += cDateSep;
- if ( aTmpDate.Year < 10 )
- sValue += '0';
- sValue += String::CreateFromInt32( aTmpDate.Year );
- break;
- }
- case DMY :
- {
- sValue = String::CreateFromInt32( aTmpDate.Day );
- sValue += cDateSep;
- sValue += String::CreateFromInt32( aTmpDate.Month );
- sValue += cDateSep;
- if ( aTmpDate.Year < 10 )
- sValue += '0';
- sValue += String::CreateFromInt32( aTmpDate.Year );
- break;
- }
- case YMD :
- {
- if ( aTmpDate.Year < 10 )
- sValue += '0';
- sValue += String::CreateFromInt32( aTmpDate.Year );
- sValue += cDateSep;
- sValue += String::CreateFromInt32( aTmpDate.Month );
- sValue += cDateSep;
- sValue += String::CreateFromInt32( aTmpDate.Day );
- break;
- }
- }
nType = CUSTOM_TYPE_DATE;
+ pNewLine->m_aDateField.SetDate( Date( aTmpDate.Day, aTmpDate.Month, aTmpDate.Year ) );
+
+ }
+ else if ( rAny >>= aTmpDuration )
+ {
+ nType = CUSTOM_TYPE_DURATION;
+ pNewLine->m_aDurationField.SetDuration( aTmpDuration );
+ }
+ else if ( rAny >>= aTmpDateTime )
+ {
+ pNewLine->m_aDateField.SetDate( Date( aTmpDateTime.Day, aTmpDateTime.Month, aTmpDateTime.Year ) );
+ pNewLine->m_aTimeField.SetTime( Time( aTmpDateTime.Hours, aTmpDateTime.Minutes, aTmpDateTime.Seconds, aTmpDateTime.HundredthSeconds ) );
+
+ nType = CUSTOM_TYPE_DATETIME;
}
if ( nType != CUSTOM_TYPE_UNKNOWN )
@@ -1939,8 +2152,6 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny )
else
pNewLine->m_aYesNoButton.CheckNo();
}
- else
- pNewLine->m_aValueEdit.SetText( sValue );
pNewLine->m_aTypeBox.SelectEntryPos( m_aTypeBox.GetEntryPos( (void*)nType ) );
}
@@ -1991,7 +2202,7 @@ void CustomPropertiesWindow::DoScroll( sal_Int32 nNewPos )
if ( pLine->m_bIsRemoved )
continue;
- Window* pWindows[] = { &pLine->m_aNameBox, &pLine->m_aTypeBox, &pLine->m_aValueEdit,
+ Window* pWindows[] = { &pLine->m_aNameBox, &pLine->m_aTypeBox, &pLine->m_aValueEdit, &pLine->m_aDurationField,
&pLine->m_aYesNoButton, &pLine->m_aRemoveButton, NULL };
Window** pCurrent = pWindows;
while ( *pCurrent )
@@ -2055,52 +2266,24 @@ Sequence< beans::PropertyValue > CustomPropertiesWindow::GetCustomProperties() c
bool bValue = pLine->m_aYesNoButton.IsYesChecked();
aPropertiesSeq[i].Value <<= makeAny( bValue );
}
+ else if ( CUSTOM_TYPE_DATETIME == nType )
+ {
+ Date aTmpDate = pLine->m_aDateField.GetDate();
+ Time aTmpTime = pLine->m_aTimeField.GetTime();
+ util::DateTime aDateTime(aTmpTime.Get100Sec(), aTmpTime.GetSec(), aTmpTime.GetMin(), aTmpTime.GetHour(),
+ aTmpDate.GetDay(), aTmpDate.GetMonth(), aTmpDate.GetYear() );
+ aPropertiesSeq[i].Value <<= aDateTime;
+ }
+ else if ( CUSTOM_TYPE_DURATION == nType )
+ {
+ aPropertiesSeq[i].Value <<= pLine->m_aDurationField.GetDuration();
+ }
else if ( CUSTOM_TYPE_DATE == nType )
{
- const LocaleDataWrapper& rLocaleWrapper = SvtSysLocale().GetLocaleData();
- DateFormat eFormat = rLocaleWrapper.getDateFormat();
- sal_Unicode cDateSep = rLocaleWrapper.getDateSep().GetChar(0);
- String sValue( pLine->m_aValueEdit.GetText() );
- if ( sValue.GetTokenCount( cDateSep ) == 3 )
- {
- xub_StrLen nTokenDay = STRING_NOTFOUND;
- xub_StrLen nTokenMonth = STRING_NOTFOUND;
- xub_StrLen nTokenYear = STRING_NOTFOUND;
-
- switch ( eFormat )
- {
- case MDY :
- {
- nTokenDay = 1;
- nTokenMonth = 0;
- nTokenYear = 2;
- break;
- }
- case DMY :
- {
- nTokenDay = 0;
- nTokenMonth = 1;
- nTokenYear = 2;
- break;
- }
- case YMD :
- {
- nTokenDay = 2;
- nTokenMonth = 1;
- nTokenYear = 0;
- break;
- }
- }
-
- if ( nTokenDay != STRING_NOTFOUND )
- {
- util::DateTime aDateTime( 0, 0, 0, 0,
- sal_uInt16( sValue.GetToken( nTokenDay, cDateSep ).ToInt32() ),
- sal_uInt16( sValue.GetToken( nTokenMonth, cDateSep ).ToInt32() ),
- sal_uInt16( sValue.GetToken( nTokenYear, cDateSep ).ToInt32() ) );
- aPropertiesSeq[i].Value <<= makeAny( aDateTime );
- }
- }
+ Date aTmpDate = pLine->m_aDateField.GetDate();
+ util::Date aDate(aTmpDate.GetDay(), aTmpDate.GetMonth(), aTmpDate.GetYear());
+ aPropertiesSeq[i].Value <<= aDate;
+
}
else
{
diff --git a/sfx2/source/dialog/dinfdlg.hrc b/sfx2/source/dialog/dinfdlg.hrc
index ba2b30ecc3..6f3be56b59 100644
--- a/sfx2/source/dialog/dinfdlg.hrc
+++ b/sfx2/source/dialog/dinfdlg.hrc
@@ -39,6 +39,8 @@
#define CUSTOM_TYPE_NUMBER 2
#define CUSTOM_TYPE_DATE 3
#define CUSTOM_TYPE_BOOLEAN 4
+#define CUSTOM_TYPE_DURATION 5
+#define CUSTOM_TYPE_DATETIME 6
// 4 TP_DOCINFORELOAD
#define PAGE_WIDTH 260
@@ -154,5 +156,25 @@
#define STR_HEADER_VALUE 92
#define STR_HEADER_ACTION 93
+#define PB_OK 100
+#define PB_CANCEL 101
+#define PB_HELP 102
+#define CB_NEGATIVE 103
+#define FT_YEAR 104
+#define ED_YEAR 105
+#define FT_MONTH 106
+#define ED_MONTH 107
+#define FT_DAY 108
+#define ED_DAY 109
+#define FT_HOUR 110
+#define ED_HOUR 111
+#define FT_MINUTE 112
+#define ED_MINUTE 113
+#define FT_SECOND 114
+#define ED_SECOND 115
+#define FT_HSECOND 116
+#define ED_HSECOND 117
+#define FL_DURATION 118
+
#endif
diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src
index d5c57d56ab..429124b9bf 100644
--- a/sfx2/source/dialog/dinfdlg.src
+++ b/sfx2/source/dialog/dinfdlg.src
@@ -34,6 +34,7 @@
#include "helpid.hrc"
#include "sfxlocal.hrc"
#include "dinfdlg.hrc"
+#include <dialog.hrc>
// TP_DOCINFODESC --------------------------------------------------------
String STR_SFX_NEWOFFICEDOC
@@ -579,14 +580,16 @@ ComboBox SFX_CB_PROPERTY_NAME
ListBox SFX_LB_PROPERTY_TYPE
{
Pos = MAP_APPFONT ( 63 , 2 ) ;
- Size = MAP_APPFONT ( 60 , 50 ) ;
+ Size = MAP_APPFONT ( 60 , 80 ) ;
DropDown = TRUE;
Border = TRUE;
CurPos = 0;
StringList [ en-US ] =
{
< "Text" ; CUSTOM_TYPE_TEXT ; > ;
+ < "DateTime" ; CUSTOM_TYPE_DATETIME ; > ;
< "Date" ; CUSTOM_TYPE_DATE ; > ;
+ < "Duration" ; CUSTOM_TYPE_DURATION ; > ;
< "Number" ; CUSTOM_TYPE_NUMBER ; > ;
< "Yes or no" ; CUSTOM_TYPE_BOOLEAN ; > ;
};
@@ -599,6 +602,44 @@ Edit SFX_ED_PROPERTY_VALUE
TabStop = TRUE ;
Left = TRUE ;
};
+DateField SFX_FLD_DATE
+{
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 127 , 2 ) ;
+ Size = MAP_APPFONT ( 29 , RSC_CD_TEXTBOX_HEIGHT ) ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Spin = TRUE;
+};
+TimeField SFX_FLD_TIME
+{
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 159 , 2 ) ;
+ Size = MAP_APPFONT ( 29 , RSC_CD_TEXTBOX_HEIGHT ) ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Spin = TRUE;
+};
+
+Edit SFX_FLD_DURATION
+{
+ Readonly = TRUE;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 159 , 2 ) ;
+ Size = MAP_APPFONT ( 61 - RSC_CD_TEXTBOX_HEIGHT - 2, RSC_CD_TEXTBOX_HEIGHT ) ;
+ TabStop = TRUE ;
+};
+PushButton SFX_PB_EDIT
+{
+ Pos = MAP_APPFONT ( 159 , 2 ) ;
+ Size = MAP_APPFONT ( RSC_CD_TEXTBOX_HEIGHT , RSC_CD_TEXTBOX_HEIGHT ) ;
+ Text = "...";
+};
+String SFX_ST_DURATION_FORMAT
+{
+ Text [en-US] = " Y: %1 M: %2 D: %3 H: %4 M: %5 S: %6";
+};
+
Control SFX_WIN_PROPERTY_YESNO
{
HelpId = HID_CTRL_CUSTOMPROPS_YES_NO;
@@ -684,3 +725,182 @@ TabDialog SID_DOCINFO
};
};
+ModalDialog RID_EDIT_DURATIONS
+{
+ HelpId = HID_DLG_CUSTOMPROPS_DURATION;
+ OutputSize = TRUE ;
+ Size = MAP_APPFONT ( 176 , 140 ) ;
+ Text [ en-US ] = "Edit Duration" ;
+ Moveable = TRUE ;
+ OKButton PB_OK
+ {
+ Pos = MAP_APPFONT ( 120 , 7 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ DefButton = TRUE;
+ };
+ CancelButton PB_CANCEL
+ {
+ Pos = MAP_APPFONT ( 120 , 24 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ HelpButton PB_HELP
+ {
+ Pos = MAP_APPFONT ( 120 , 48 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ FixedLine FL_DURATION
+ {
+ Pos = MAP_APPFONT ( 6 , 8 ) ;
+ Size = MAP_APPFONT ( 108 , 8 ) ;
+ Text [ en-US ] = "Duration" ;
+ };
+ CheckBox CB_NEGATIVE
+ {
+ Pos = MAP_APPFONT ( 6 , 21 ) ;
+ Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
+ Text [ en-US ] = "~Negative" ;
+ };
+ FixedText FT_YEAR
+ {
+ Pos = MAP_APPFONT ( 6 , 38 ) ;
+ Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
+ Left = TRUE ;
+ Text [ en-US ] = "~Years" ;
+ };
+ NumericField ED_YEAR
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 70 , 36 ) ;
+ Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ First = 1 ;
+ Last = 100 ;
+ SpinSize = 1 ;
+ Value = 0 ;
+ };
+ FixedText FT_MONTH
+ {
+ Pos = MAP_APPFONT ( 6 , 52 ) ;
+ Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
+ Left = TRUE ;
+ Text [ en-US ] = "~Months" ;
+ };
+ NumericField ED_MONTH
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 70 , 50 ) ;
+ Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ First = 1 ;
+ Last = 100 ;
+ SpinSize = 1 ;
+ Value = 0 ;
+ };
+ FixedText FT_DAY
+ {
+ Pos = MAP_APPFONT ( 6 , 66 ) ;
+ Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
+ Left = TRUE ;
+ Text [ en-US ] = "~Days" ;
+ };
+ NumericField ED_DAY
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 70 , 64 ) ;
+ Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ First = 1 ;
+ Last = 100 ;
+ SpinSize = 1 ;
+ Value = 0 ;
+ };
+ FixedText FT_HOUR
+ {
+ Pos = MAP_APPFONT ( 6 , 80 ) ;
+ Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
+ Left = TRUE ;
+ Text [ en-US ] = "H~ours" ;
+ };
+ NumericField ED_HOUR
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 70 , 78 ) ;
+ Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ First = 1 ;
+ Last = 100 ;
+ SpinSize = 1 ;
+ Value = 0 ;
+ };
+ FixedText FT_MINUTE
+ {
+ Pos = MAP_APPFONT ( 6 , 94 ) ;
+ Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
+ Left = TRUE ;
+ Text [ en-US ] = "Min~utes" ;
+ };
+ NumericField ED_MINUTE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 70, 92) ;
+ Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ First = 1 ;
+ Last = 100 ;
+ SpinSize = 1 ;
+ Value = 0 ;
+ };
+ FixedText FT_SECOND
+ {
+ Pos = MAP_APPFONT ( 6, 108 ) ;
+ Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
+ Left = TRUE ;
+ Text [ en-US ] = "~Seconds" ;
+ };
+ NumericField ED_SECOND
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 70 , 106 ) ;
+ Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ First = 1 ;
+ Last = 100 ;
+ SpinSize = 1 ;
+ Value = 0 ;
+ };
+ FixedText FT_HSECOND
+ {
+ Pos = MAP_APPFONT ( 6 , 122 ) ;
+ Size = MAP_APPFONT ( 60 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
+ Left = TRUE ;
+ Text [ en-US ] = "1/100 se~conds" ;
+ };
+ NumericField ED_HSECOND
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 70 , 120 ) ;
+ Size = MAP_APPFONT ( 40, RSC_CD_TEXTBOX_HEIGHT ) ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ First = 1 ;
+ Last = 100 ;
+ SpinSize = 1 ;
+ Value = 0 ;
+ };
+
+
+
+};
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 89aaf2a240..987f619392 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <vcl/decoview.hxx>
#include <vcl/svapp.hxx>
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 4bf2a95cc4..cad9014c0a 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -71,17 +71,17 @@
#include <vcl/cvtgrf.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/mnemonic.hxx>
-#include <svtools/pathoptions.hxx>
-#include <svtools/securityoptions.hxx>
-#include <svtools/itemset.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/intitem.hxx>
-#include <svtools/stritem.hxx>
+#include <unotools/pathoptions.hxx>
+#include <unotools/securityoptions.hxx>
+#include <svl/itemset.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/stritem.hxx>
#include <svtools/filter.hxx>
-#include <svtools/viewoptions.hxx>
-#include <svtools/moduleoptions.hxx>
+#include <unotools/viewoptions.hxx>
+#include <unotools/moduleoptions.hxx>
#include <svtools/helpid.hrc>
-#include <svtools/pickerhelper.hxx>
+#include <svl/pickerhelper.hxx>
#include <comphelper/docpasswordrequest.hxx>
#include <ucbhelper/content.hxx>
#include <ucbhelper/commandenvironment.hxx>
@@ -2612,7 +2612,7 @@ Sequence< ::rtl::OUString > FileDialogHelper::GetSelectedFiles() const
if ( nFiles > 1 )
{
aResultSeq = Sequence< ::rtl::OUString >( nFiles-1 );
-
+
INetURLObject aPath( lFiles[0] );
aPath.setFinalSlash();
@@ -2629,7 +2629,7 @@ Sequence< ::rtl::OUString > FileDialogHelper::GetSelectedFiles() const
else
aResultSeq = lFiles;
}
-
+
return aResultSeq;
}
diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx
index 09ddcfa868..abcd3125a1 100644
--- a/sfx2/source/dialog/filedlgimpl.hxx
+++ b/sfx2/source/dialog/filedlgimpl.hxx
@@ -41,7 +41,7 @@
#include <sfx2/fcontnr.hxx>
#define _SVSTDARR_STRINGSDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <sfx2/filedlghelper.hxx>
#include <comphelper/sequenceasvector.hxx>
diff --git a/sfx2/source/dialog/intro.cxx b/sfx2/source/dialog/intro.cxx
index 5ad3254a87..07f20b0801 100644
--- a/sfx2/source/dialog/intro.cxx
+++ b/sfx2/source/dialog/intro.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,7 +38,7 @@
#include <tools/stream.hxx>
#include <tools/urlobj.hxx>
-#include <svtools/pathoptions.hxx>
+#include <unotools/pathoptions.hxx>
#include <unotools/configmgr.hxx>
#include <com/sun/star/uno/Any.h>
diff --git a/sfx2/source/dialog/itemconnect.cxx b/sfx2/source/dialog/itemconnect.cxx
index ddf97257bc..add294746a 100644
--- a/sfx2/source/dialog/itemconnect.cxx
+++ b/sfx2/source/dialog/itemconnect.cxx
@@ -34,7 +34,7 @@
#include <boost/shared_ptr.hpp>
#include <list>
-#include <svtools/itempool.hxx>
+#include <svl/itempool.hxx>
// ============================================================================
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 5d812751e8..d2f47233e5 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -78,7 +78,7 @@
#include <unotools/configitem.hxx>
#include <ucbhelper/content.hxx>
#include <tools/urlobj.hxx>
-#include <svtools/useroptions.hxx>
+#include <unotools/useroptions.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/extract.hxx>
#include <comphelper/storagehelper.hxx>
@@ -176,7 +176,7 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog(
try
{
uno::Sequence < beans::PropertyValue > aProps;
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xFilterCFG =
+ ::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 );
@@ -184,7 +184,7 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog(
if ( !xFilterCFG.is() )
return eRet;
-
+
uno::Any aAny = xFilterCFG->getByName( rFilterName );
if ( aAny >>= aProps )
@@ -207,26 +207,26 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog(
{
uno::Sequence< beans::PropertyValue > aPropsForDialog(1);
uno::Reference< document::XExporter > xExporter( xFilterDialog, uno::UNO_QUERY );
-
+
if ( rType.equalsAsciiL( PDF_DOCUMENT_TYPE, PDF_DOCUMENT_TYPE_LEN ))
{
//add an internal property, used to tell the dialog we want to set a different
//string for the ok button
//used in filter/source/pdf/impdialog.cxx
String aOkSendText( SfxResId( STR_PDF_EXPORT_SEND ));
-
+
uno::Sequence< beans::PropertyValue > aFilterDataValue(1);
aFilterDataValue[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_OkButtonString" ));
aFilterDataValue[0].Value = css::uno::makeAny( ::rtl::OUString( aOkSendText ));
-
+
//add to the filterdata property, the only one the PDF export filter dialog will care for
aPropsForDialog[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterData" ));
aPropsForDialog[0].Value = css::uno::makeAny( aFilterDataValue );
-
+
//when executing the dialog will merge the persistent FilterData properties
xFilterProperties->setPropertyValues( aPropsForDialog );
}
-
+
if( xExporter.is() )
xExporter->setSourceDocument(
uno::Reference< lang::XComponent >( xModel, uno::UNO_QUERY ) );
@@ -235,7 +235,7 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog(
{
//get the filter data
uno::Sequence< beans::PropertyValue > aPropsFromDialog = xFilterProperties->getPropertyValues();
-
+
//add them to the args
for ( sal_Int32 nInd = 0; nInd < aPropsFromDialog.getLength(); nInd++ )
{
@@ -251,7 +251,7 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog(
eRet = SAVE_SUCCESSFULL;
}
else
- {
+ {
// cancel from dialog, then do not send
// If the model is not modified, it could be modified by the dispatch calls.
// Therefore set back to modified = false. This should not hurt if we call
@@ -280,26 +280,26 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog(
throw;
}
catch( uno::Exception& )
- {
+ {
}
return eRet;
}
sal_Int32 SfxMailModel::GetCount() const
-{
+{
return maAttachedDocuments.size();
}
sal_Bool SfxMailModel::IsEmpty() const
-{
+{
return maAttachedDocuments.empty();
}
-SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
+SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
const rtl::OUString& aSaveFileName,
- const css::uno::Reference< css::uno::XInterface >& xFrameOrModel,
- const rtl::OUString& rType,
+ const css::uno::Reference< css::uno::XInterface >& xFrameOrModel,
+ const rtl::OUString& rType,
rtl::OUString& rFileNamePath )
{
SaveResult eRet( SAVE_ERROR );
@@ -335,7 +335,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
if ( xController.is() )
xModel = xController->getModel();
}
-
+
// We need at least a valid module name and model reference
if (( aModule.getLength() > 0 ) && xModel.is() )
{
@@ -345,7 +345,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
css::uno::Reference< css::util::XModifiable > xModifiable( xModel, css::uno::UNO_QUERY );
css::uno::Reference< css::frame::XStorable > xStorable( xModel, css::uno::UNO_QUERY );
-
+
if ( xModifiable.is() )
bModified = xModifiable->isModified();
if ( xStorable.is() )
@@ -367,12 +367,12 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
rtl::OUString aTypeName( rType );
rtl::OUString aFileName;
rtl::OUString aExtension;
-
+
css::uno::Reference< css::container::XContainerQuery > xContainerQuery(
- xSMGR->createInstance( rtl::OUString(
+ xSMGR->createInstance( rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" ))),
css::uno::UNO_QUERY );
-
+
if ( bStoreTo )
{
// Retrieve filter from type
@@ -391,10 +391,10 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
aQuery[2].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Flags" ));
aQuery[2].Value = css::uno::makeAny( sal_Int32(0x80042) ); // EXPORT ALIEN 3RDPARTY
}
-
- css::uno::Reference< css::container::XEnumeration > xEnumeration =
+
+ css::uno::Reference< css::container::XEnumeration > xEnumeration =
xContainerQuery->createSubSetEnumerationByProperties( aQuery );
-
+
if ( xEnumeration->hasMoreElements() )
{
::comphelper::SequenceAsHashMap aFilterPropsHM( xEnumeration->nextElement() );
@@ -402,7 +402,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
::rtl::OUString::createFromAscii( "Name" ),
::rtl::OUString() );
}
-
+
if ( bHasLocation )
{
// Retrieve filter from media descriptor
@@ -415,7 +415,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
// We should save the document in the original format. Therefore this
// is not a storeTo operation. To support signing in this case, reset
// bStoreTo flag.
- bStoreTo = false;
+ bStoreTo = false;
}
}
}
@@ -440,7 +440,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
aFilterName = aFilterPropsHM.getUnpackedValueOrDefault(
::rtl::OUString::createFromAscii( "ooSetupFactoryDefaultFilter" ),
::rtl::OUString() );
- css::uno::Reference< css::container::XNameAccess > xNameAccess2(
+ css::uno::Reference< css::container::XNameAccess > xNameAccess2(
xContainerQuery, css::uno::UNO_QUERY );
if ( xNameAccess2.is() )
{
@@ -461,7 +461,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
// No filter found => error
// No type and no location => error
- if (( aFilterName.getLength() == 0 ) ||
+ if (( aFilterName.getLength() == 0 ) ||
(( aTypeName.getLength() == 0 ) && !bHasLocation ))
return eRet;
@@ -474,10 +474,10 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
else
{
css::uno::Reference< container::XNameAccess > xTypeDetection(
- xSMGR->createInstance( ::rtl::OUString(
+ xSMGR->createInstance( ::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.TypeDetection" ))),
css::uno::UNO_QUERY );
-
+
if ( xTypeDetection.is() )
{
@@ -495,7 +495,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
}
}
}
-
+
// Use provided save file name. If empty determine file name
aFileName = aSaveFileName;
if ( aFileName.getLength() == 0 )
@@ -513,14 +513,14 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
aFileName = aFileObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::NO_DECODE );
}
}
-
+
// No file name => error
if ( aFileName.getLength() == 0 )
return eRet;
-
+
OSL_ASSERT( aFilterName.getLength() > 0 );
OSL_ASSERT( aFileName.getLength() > 0 );
-
+
// Creates a temporary directory to store a predefined file into it.
// This makes it possible to store the file for "send document as e-mail"
// with the original file name. We cannot use the original file as
@@ -532,7 +532,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
aFilePathObj.setExtension( aExtension );
rtl::OUString aFileURL = aFilePathObj.GetMainURL( INetURLObject::NO_DECODE );
-
+
sal_Int32 nNumArgs(0);
const rtl::OUString aPasswordPropName( RTL_CONSTASCII_USTRINGPARAM( "Password" ));
css::uno::Sequence< css::beans::PropertyValue > aArgs( ++nNumArgs );
@@ -561,7 +561,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( xFrame, css::uno::UNO_QUERY );
css::uno::Reference< css::frame::XDispatch > xDispatch;
-
+
css::util::URL aURL;
css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs;
@@ -575,7 +575,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
if ( xDispatchProvider.is() )
{
- xDispatch = css::uno::Reference< css::frame::XDispatch >(
+ xDispatch = css::uno::Reference< css::frame::XDispatch >(
xDispatchProvider->queryDispatch( aURL, ::rtl::OUString(), 0 ));
if ( xDispatch.is() )
{
@@ -597,14 +597,14 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
//check if this is the pdf otput filter (i#64555)
if( bSendAsPDF )
{
- SaveResult eShowPDFFilterDialog = ShowFilterOptionsDialog(
+ SaveResult eShowPDFFilterDialog = ShowFilterOptionsDialog(
xSMGR, xModel, aFilterName, rType, bModified, nNumArgs, aArgs );
-
+
// don't continue on dialog cancel or error
if ( eShowPDFFilterDialog != SAVE_SUCCESSFULL )
return eShowPDFFilterDialog;
}
-
+
xStorable->storeToURL( aFileURL, aArgs );
rFileNamePath = aFileURL;
eRet = SAVE_SUCCESSFULL;
@@ -617,10 +617,10 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
aURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:MailExportFinished" ));
xURLTransformer->parseStrict( aURL );
}
-
+
if ( xDispatchProvider.is() )
{
- xDispatch = css::uno::Reference< css::frame::XDispatch >(
+ xDispatch = css::uno::Reference< css::frame::XDispatch >(
xDispatchProvider->queryDispatch( aURL, ::rtl::OUString(), 0 ));
if ( xDispatch.is() )
{
@@ -637,7 +637,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
}
}
}
- }
+ }
// If the model is not modified, it could be modified by the dispatch calls.
// Therefore set back to modified = false. This should not hurt if we call
// on a non-modified model.
@@ -741,9 +741,9 @@ void SfxMailModel::AddAddress( const String& rAddress, AddressRole eRole )
}
}
-SfxMailModel::SendMailResult SfxMailModel::AttachDocument(
- const ::rtl::OUString& sDocumentType,
- const css::uno::Reference< css::uno::XInterface >& xFrameOrModel,
+SfxMailModel::SendMailResult SfxMailModel::AttachDocument(
+ const ::rtl::OUString& sDocumentType,
+ const css::uno::Reference< css::uno::XInterface >& xFrameOrModel,
const ::rtl::OUString& sAttachmentTitle )
{
rtl::OUString sFileName;
@@ -752,7 +752,7 @@ SfxMailModel::SendMailResult SfxMailModel::AttachDocument(
if ( eSaveResult == SAVE_SUCCESSFULL && ( sFileName.getLength() > 0 ) )
maAttachedDocuments.push_back(sFileName);
return eSaveResult == SAVE_SUCCESSFULL ? SEND_MAIL_OK : SEND_MAIL_ERROR;
-}
+}
SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css::frame::XFrame >& xFrame )
{
@@ -850,7 +850,7 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css:
}
Sequence< OUString > aAttachmentSeq(&(maAttachedDocuments[0]),maAttachedDocuments.size());
-
+
xSimpleMailMessage->setSubject( maSubject );
xSimpleMailMessage->setAttachement( aAttachmentSeq );
@@ -873,7 +873,7 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css:
::vos::OGuard aGuard( Application::GetSolarMutex() );
Window* pParentWindow = VCLUnoHelper::GetWindow( xParentWindow );
-
+
ErrorBox aBox( pParentWindow, SfxResId( RID_ERRBOX_MAIL_CONFIG ));
aBox.Execute();
eResult = SEND_MAIL_CANCELLED;
@@ -946,7 +946,7 @@ BOOL CreateFromAddress_Impl( String& rFrom )
rFrom.EraseAllChars( '@' );
}
String aEmailName = aUserCFG.GetEmail();
-
+
// unerlaubte Zeichen entfernen
aEmailName.EraseAllChars( '<' );
aEmailName.EraseAllChars( '>' );
diff --git a/sfx2/source/dialog/mailmodelapi.cxx b/sfx2/source/dialog/mailmodelapi.cxx
index d2158c3dad..3abfb114a8 100644
--- a/sfx2/source/dialog/mailmodelapi.cxx
+++ b/sfx2/source/dialog/mailmodelapi.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -73,9 +73,9 @@
#include <unotools/tempfile.hxx>
#include <vcl/svapp.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/useroptions.hxx>
+#include <svl/stritem.hxx>
+#include <svl/eitem.hxx>
+#include <unotools/useroptions.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/extract.hxx>
#include <ucbhelper/content.hxx>
@@ -284,7 +284,7 @@ namespace
String aLeadingStr;
if ( xStor.is() )
{
- sal_Bool bHasName = xStor->hasLocation();
+ sal_Bool bHasName = xStor->hasLocation();
if ( !bHasName )
{
@@ -342,12 +342,12 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocument( const ::rtl::OUString& _sAt
// detect filter
const SfxFilter* pFilter = SfxFilter::GetDefaultFilter(lcl_getFactoryName(_xModel));
// sal_Bool bHasFilter = pFilter != NULL;
-
+
sal_Bool bRet = sal_False;
// create temp file name with leading chars and extension
Reference < XStorable > xStor( _xModel, UNO_QUERY );
if ( xStor.is() )
- {
+ {
String* pExt = NULL;
INetURLObject aFileObj(_xModel->getURL());
if ( aFileObj.hasExtension() )
@@ -363,12 +363,12 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocument( const ::rtl::OUString& _sAt
}
{
- ::utl::TempFile aTempFile( aLeadingStr, pExt );
+ ::utl::TempFile aTempFile( aLeadingStr, pExt );
rFileName = aTempFile.GetURL();
}
delete pExt;
// save document to temp file
-
+
// save document to temp file
Sequence < PropertyValue > aArgs( _xModel->getArgs() );
::comphelper::MediaDescriptor aMedia(aArgs);
@@ -392,8 +392,8 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocument( const ::rtl::OUString& _sAt
::rtl::OUString sReadOnly(RTL_CONSTASCII_USTRINGPARAM("ReadOnly"));
if ( !aMedia.createItemIfMissing(sReadOnly,sal_False) )
aMedia[sReadOnly] <<= sal_False;
-
- aMedia >> aArgs;
+
+ aMedia >> aArgs;
try
{
@@ -407,7 +407,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocument( const ::rtl::OUString& _sAt
{
}
}
-
+
// restore old settings
/* TODO
if ( !bModified && xDocShell->IsEnableSetModified() )
@@ -460,7 +460,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocAsPDF( const ::rtl::OUString& _sAt
// save document to temp file
Sequence < PropertyValue > aArgs( _xModel->getArgs() );
::comphelper::MediaDescriptor aMedia(aArgs);
-
+
::rtl::OUString sMediaType(RTL_CONSTASCII_USTRINGPARAM("MediaType"));
if ( !aMedia.createItemIfMissing(sMediaType,sPDFMediaType) )
aMedia[sMediaType] <<= sPDFMediaType;
@@ -468,7 +468,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocAsPDF( const ::rtl::OUString& _sAt
::rtl::OUString sURL(RTL_CONSTASCII_USTRINGPARAM("URL"));
if ( !aMedia.createItemIfMissing(sURL,::rtl::OUString(rFileName)) )
aMedia[sURL] <<= ::rtl::OUString(rFileName);
- aMedia >> aArgs;
+ aMedia >> aArgs;
try
{
@@ -596,7 +596,7 @@ SfxMailModel::SendMailResult SfxMailModel::Send( )
SendMailResult eResult = SEND_MAIL_ERROR;
if ( !maAttachedDocuments.empty() )
{
-
+
Reference < XMultiServiceFactory > xMgr = ::comphelper::getProcessServiceFactory();
if ( xMgr.is() )
{
@@ -606,7 +606,7 @@ SfxMailModel::SendMailResult SfxMailModel::Send( )
xSimpleMailClientSupplier = Reference< XSimpleMailClientSupplier >(
xMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SimpleSystemMail" ))),
UNO_QUERY );
-
+
if ( ! xSimpleMailClientSupplier.is() )
{
xSimpleMailClientSupplier = Reference< XSimpleMailClientSupplier >(
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index 24d08ee3e4..5a69e4e2fe 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -37,9 +37,9 @@
#include <vcl/msgbox.hxx>
#endif
#include <vcl/field.hxx>
-#include <svtools/eitem.hxx>
-#include <svtools/intitem.hxx>
-#include <svtools/style.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/style.hxx>
#ifndef GCC
#endif
@@ -57,7 +57,7 @@
#include "mgetempl.hrc"
#ifndef _SFX_STYLE_HRC
-#include <svtools/style.hrc>
+#include <svl/style.hrc>
#endif
// SfxManageStyleSheetPage -----------------------------------------------
diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
index 192f5917f3..642c87d75a 100644
--- a/sfx2/source/dialog/newstyle.cxx
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -32,7 +32,7 @@
#include "precompiled_sfx2.hxx"
// INCLUDE ---------------------------------------------------------------
-#include <svtools/style.hxx>
+#include <svl/style.hxx>
#ifndef GCC
#endif
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index 628258eb13..23fe8c98ba 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -43,10 +43,35 @@
#include "dialog.hrc"
#include "passwd.hrc"
+#include "vcl/sound.hxx"
+
// -----------------------------------------------------------------------
IMPL_LINK_INLINE_START( SfxPasswordDialog, EditModifyHdl, Edit *, EMPTYARG )
{
+ if( mbAsciiOnly )
+ {
+ rtl::OUString aTest( maPasswordED.GetText() );
+ const sal_Unicode* pTest = aTest.getStr();
+ sal_Int32 nLen = aTest.getLength();
+ rtl::OUStringBuffer aFilter( nLen );
+ bool bReset = false;
+ for( sal_Int32 i = 0; i < nLen; i++ )
+ {
+ if( *pTest > 0x007f )
+ bReset = true;
+ else
+ aFilter.append( *pTest );
+ pTest++;
+ }
+ if( bReset )
+ {
+ Sound::Beep( SOUND_ERROR );
+ maPasswordED.SetSelection( Selection( 0, nLen ) );
+ maPasswordED.ReplaceSelected( aFilter.makeStringAndClear() );
+ }
+
+ }
maOKBtn.Enable( maPasswordED.GetText().Len() >= mnMinLen );
return 0;
}
@@ -88,7 +113,8 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
maConfirmStr ( SfxResId( STR_PASSWD_CONFIRM ) ),
mnMinLen ( 5 ),
- mnExtras ( 0 )
+ mnExtras ( 0 ),
+ mbAsciiOnly ( false )
{
FreeResource();
diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx
index fbfc43bc90..c73874f646 100644
--- a/sfx2/source/dialog/printopt.cxx
+++ b/sfx2/source/dialog/printopt.cxx
@@ -34,9 +34,9 @@
#ifndef GCC
#endif
#include <vcl/msgbox.hxx>
-#include <svtools/printwarningoptions.hxx>
+#include <unotools/printwarningoptions.hxx>
#include <svtools/printoptions.hxx>
-#include <svtools/flagitem.hxx>
+#include <svl/flagitem.hxx>
#include "printopt.hrc"
diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx
index bb9ad7b9a5..fc95e472a8 100644
--- a/sfx2/source/dialog/recfloat.cxx
+++ b/sfx2/source/dialog/recfloat.cxx
@@ -38,7 +38,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <svtools/generictoolboxcontroller.hxx>
#include <vcl/msgbox.hxx>
#include <comphelper/processfactory.hxx>
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index e35859a946..0dac077921 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,7 +41,7 @@
#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
#endif
-#include <svtools/viewoptions.hxx>
+#include <unotools/viewoptions.hxx>
#ifndef GCC
#endif
diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx
index 4a97f85a9d..1abd1ffa36 100644
--- a/sfx2/source/dialog/srchdlg.cxx
+++ b/sfx2/source/dialog/srchdlg.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,7 +38,7 @@
#include "srchdlg.hrc"
#include "dialog.hrc"
#include <tools/debug.hxx>
-#include <svtools/viewoptions.hxx>
+#include <unotools/viewoptions.hxx>
using namespace ::com::sun::star::uno;
diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx
index dfb7076089..bedb46152b 100644
--- a/sfx2/source/dialog/styledlg.cxx
+++ b/sfx2/source/dialog/styledlg.cxx
@@ -32,8 +32,8 @@
#include "precompiled_sfx2.hxx"
// include ---------------------------------------------------------------
-#include <svtools/whiter.hxx>
-#include <svtools/style.hxx>
+#include <svl/whiter.hxx>
+#include <svl/style.hxx>
#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
#endif
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 6e52807a5c..51a3ce757a 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -34,10 +34,10 @@
#include <limits.h>
#include <stdlib.h>
#include <vcl/msgbox.hxx>
-#include <svtools/viewoptions.hxx>
+#include <unotools/viewoptions.hxx>
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include "appdata.hxx"
#include "sfxtypes.hxx"
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 2cc7b52d25..9195925359 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -34,14 +34,14 @@
#ifndef _MENU_HXX //autogen
#include <vcl/menu.hxx>
#endif
-#include <svtools/intitem.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/style.hxx>
+#include <svl/intitem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/style.hxx>
#ifndef GCC
#endif
#define _SVSTDARR_STRINGSDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <unotools/intlwrapper.hxx>
@@ -2407,7 +2407,7 @@ void SfxTemplateDialog_Impl::updateFamilyImages()
return;
// let the families collection update the images
- sal_Bool bIsHighContrast = m_pFloat->GetDisplayBackground().GetColor().IsDark();
+ sal_Bool bIsHighContrast = m_pFloat->GetSettings().GetStyleSettings().GetHighContrastMode();
pStyleFamilies->updateImages( *m_pStyleFamiliesId, bIsHighContrast ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL );
// and set the new images on our toolbox
@@ -2424,7 +2424,7 @@ void SfxTemplateDialog_Impl::updateFamilyImages()
void SfxTemplateDialog_Impl::updateNonFamilyImages()
{
m_aActionTbR.SetImageList( ImageList( SfxResId(
- m_pFloat->GetDisplayBackground().GetColor().IsDark() ? IMG_LST_STYLE_DESIGNER_HC
+ m_pFloat->GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_LST_STYLE_DESIGNER_HC
: DLG_STYLE_DESIGNER ) ) );
}
diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx
index 03103837b2..fa0e93d1d0 100644
--- a/sfx2/source/dialog/tplcitem.cxx
+++ b/sfx2/source/dialog/tplcitem.cxx
@@ -33,7 +33,7 @@
// INCLUDE ---------------------------------------------------------------
-#include <svtools/intitem.hxx>
+#include <svl/intitem.hxx>
#include <vcl/svapp.hxx>
#ifndef GCC
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 64e7fcda94..fe75d4d0c1 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,17 +34,17 @@
#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
#include <comphelper/processfactory.hxx>
#endif
-#include <svtools/eitem.hxx>
-#include <svtools/intitem.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/itemset.hxx>
-#include <svtools/useroptions.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/itemset.hxx>
+#include <unotools/useroptions.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
#include <tools/datetime.hxx>
#define _SVSTDARR_STRINGSDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include "versdlg.hrc"
#include "versdlg.hxx"