summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/new.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc/new.cxx')
-rwxr-xr-x[-rw-r--r--]sfx2/source/doc/new.cxx92
1 files changed, 46 insertions, 46 deletions
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index 897979a39c2f..8392022dff5b 100644..100755
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -51,8 +51,8 @@
#include <sfx2/objsh.hxx>
#include "fltfnc.hxx"
#include <sfx2/viewsh.hxx>
-#include "viewfac.hxx"
-#include "sfxresid.hxx"
+#include "sfx2/viewfac.hxx"
+#include "sfx2/sfxresid.hxx"
#include <sfx2/docfile.hxx>
#include "preview.hxx"
#include <sfx2/printer.hxx>
@@ -135,13 +135,13 @@ void SfxPreviewWin_Impl::ImpPaint(
Point aPoint;
if (dRatio>dRatioPreV)
{
- aSize=Size(nWidth, (USHORT)(nWidth/dRatio));
- aPoint=Point( 0, (USHORT)((nHeight-aSize.Height())/2));
+ aSize=Size(nWidth, (sal_uInt16)(nWidth/dRatio));
+ aPoint=Point( 0, (sal_uInt16)((nHeight-aSize.Height())/2));
}
else
{
- aSize=Size((USHORT)(nHeight*dRatio), nHeight);
- aPoint=Point((USHORT)((nWidth-aSize.Width())/2),0);
+ aSize=Size((sal_uInt16)(nHeight*dRatio), nHeight);
+ aPoint=Point((sal_uInt16)((nWidth-aSize.Width())/2),0);
}
Point bPoint=Point(nWidth,nHeight)-aPoint;
@@ -178,7 +178,7 @@ SfxPreviewWin::SfxPreviewWin(
// This preview window is for document previews. Therefore
// right-to-left mode should be off
- EnableRTL( FALSE );
+ EnableRTL( sal_False );
}
void SfxPreviewWin::Paint( const Rectangle& rRect )
@@ -198,7 +198,7 @@ void SfxPreviewWin::Paint( const Rectangle& rRect )
DBG_ASSERT( aTmpSize.Height() * aTmpSize.Width(), "size of first page is 0, overload GetFirstPageSize or set vis-area!" );
aMtf.SetPrefSize( aTmpSize );
- aDevice.EnableOutput( FALSE );
+ aDevice.EnableOutput( sal_False );
aDevice.SetMapMode( rDocShell->GetMapUnit() );
aDevice.SetDrawMode( GetDrawMode() );
aMtf.Record( &aDevice );
@@ -254,7 +254,7 @@ class SfxNewFileDialog_Impl
String aNone;
String sLoadTemplate;
- USHORT nFlags;
+ sal_uInt16 nFlags;
SfxDocumentTemplates aTemplates;
SfxObjectShellLock xDocShell;
SfxNewFileDialog* pAntiImpl;
@@ -269,23 +269,23 @@ class SfxNewFileDialog_Impl
DECL_LINK( Expand, MoreButton * );
DECL_LINK( PreviewClick, CheckBox * );
DECL_LINK( LoadFile, PushButton* );
- USHORT GetSelectedTemplatePos() const;
+ sal_uInt16 GetSelectedTemplatePos() const;
public:
- SfxNewFileDialog_Impl( SfxNewFileDialog* pAntiImplP, USHORT nFlags );
+ SfxNewFileDialog_Impl( SfxNewFileDialog* pAntiImplP, sal_uInt16 nFlags );
~SfxNewFileDialog_Impl();
- // Liefert FALSE, wenn '- Keine -' als Vorlage eingestellt ist
- // Nur wenn IsTemplate() TRUE liefert, koennen Vorlagennamen
+ // Liefert sal_False, wenn '- Keine -' als Vorlage eingestellt ist
+ // Nur wenn IsTemplate() sal_True liefert, koennen Vorlagennamen
// erfragt werden
- BOOL IsTemplate() const;
+ sal_Bool IsTemplate() const;
String GetTemplateRegion() const;
String GetTemplateName() const;
String GetTemplateFileName() const;
- USHORT GetTemplateFlags()const;
- void SetTemplateFlags(USHORT nSet);
+ sal_uInt16 GetTemplateFlags()const;
+ void SetTemplateFlags(sal_uInt16 nSet);
};
@@ -307,11 +307,11 @@ IMPL_LINK( SfxNewFileDialog_Impl, Update, void *, EMPTYARG )
if ( xDocShell.Is() )
{
if ( xDocShell->GetProgress() )
- return FALSE;
+ return sal_False;
xDocShell.Clear();
}
- const USHORT nEntry = GetSelectedTemplatePos();
+ const sal_uInt16 nEntry = GetSelectedTemplatePos();
if(!nEntry)
{
ClearInfo();
@@ -355,24 +355,24 @@ IMPL_LINK( SfxNewFileDialog_Impl, Update, void *, EMPTYARG )
Application::SetDefDialogParent( pAntiImpl );
SfxErrorContext eEC(ERRCTX_SFX_LOADTEMPLATE,pAntiImpl);
SfxApplication *pSfxApp = SFX_APP();
- ULONG lErr;
+ sal_uIntPtr lErr;
SfxItemSet* pSet = new SfxAllItemSet( pSfxApp->GetPool() );
- pSet->Put( SfxBoolItem( SID_TEMPLATE, TRUE ) );
- pSet->Put( SfxBoolItem( SID_PREVIEW, TRUE ) );
- lErr = pSfxApp->LoadTemplate( xDocShell, aFileName, TRUE, pSet );
+ pSet->Put( SfxBoolItem( SID_TEMPLATE, sal_True ) );
+ pSet->Put( SfxBoolItem( SID_PREVIEW, sal_True ) );
+ lErr = pSfxApp->LoadTemplate( xDocShell, aFileName, sal_True, pSet );
if( lErr )
ErrorHandler::HandleError(lErr);
Application::SetDefDialogParent( pParent );
if ( !xDocShell.Is() )
{
aPreviewWin.SetObjectShell( 0 );
- return FALSE;
+ return sal_False;
}
}
aPreviewWin.SetObjectShell( xDocShell );
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
@@ -382,20 +382,20 @@ IMPL_LINK( SfxNewFileDialog_Impl, RegionSelect, ListBox *, pBox )
if ( xDocShell.Is() && xDocShell->GetProgress() )
return 0;
- const USHORT nRegion = pBox->GetSelectEntryPos();
- const USHORT nCount = aTemplates.GetRegionCount()? aTemplates.GetCount(nRegion): 0;
- aTemplateLb.SetUpdateMode(FALSE);
+ const sal_uInt16 nRegion = pBox->GetSelectEntryPos();
+ const sal_uInt16 nCount = aTemplates.GetRegionCount()? aTemplates.GetCount(nRegion): 0;
+ aTemplateLb.SetUpdateMode(sal_False);
aTemplateLb.Clear();
String aSel=aRegionLb.GetSelectEntry();
- USHORT nc=aSel.Search('(');
+ sal_uInt16 nc=aSel.Search('(');
if (nc-1&&nc!=STRING_NOTFOUND)
aSel.Erase(nc-1);
if (aSel.CompareIgnoreCaseToAscii( String(SfxResId(STR_STANDARD)) )==COMPARE_EQUAL)
aTemplateLb.InsertEntry(aNone);
- for (USHORT i = 0; i < nCount; ++i)
+ for (sal_uInt16 i = 0; i < nCount; ++i)
aTemplateLb.InsertEntry(aTemplates.GetName(nRegion, i));
aTemplateLb.SelectEntryPos(0);
- aTemplateLb.SetUpdateMode(TRUE);
+ aTemplateLb.SetUpdateMode(sal_True);
aTemplateLb.Invalidate();
aTemplateLb.Update();
return 0;
@@ -417,7 +417,7 @@ IMPL_LINK( SfxNewFileDialog_Impl, PreviewClick, CheckBox *, pBox )
if ( xDocShell.Is() && xDocShell->GetProgress() )
return 0;
- USHORT nEntry = GetSelectedTemplatePos();
+ sal_uInt16 nEntry = GetSelectedTemplatePos();
if ( nEntry && pBox->IsChecked() )
{
if(!Update(0))
@@ -470,11 +470,11 @@ IMPL_LINK_INLINE_START( SfxNewFileDialog_Impl, LoadFile, PushButton *, EMPTYARG
IMPL_LINK_INLINE_END( SfxNewFileDialog_Impl, LoadFile, PushButton *, EMPTYARG )
//-------------------------------------------------------------------------
-USHORT SfxNewFileDialog_Impl::GetSelectedTemplatePos() const
+sal_uInt16 SfxNewFileDialog_Impl::GetSelectedTemplatePos() const
{
- USHORT nEntry=aTemplateLb.GetSelectEntryPos();
+ sal_uInt16 nEntry=aTemplateLb.GetSelectEntryPos();
String aSel=aRegionLb.GetSelectEntry().Copy();
- USHORT nc=aSel.Search('(');
+ sal_uInt16 nc=aSel.Search('(');
if (nc-1&&nc!=STRING_NOTFOUND)
aSel.Erase(nc-1);
if (aSel.CompareIgnoreCaseToAscii(String(SfxResId(STR_STANDARD)))!=COMPARE_EQUAL)
@@ -486,7 +486,7 @@ USHORT SfxNewFileDialog_Impl::GetSelectedTemplatePos() const
//-------------------------------------------------------------------------
-BOOL SfxNewFileDialog_Impl::IsTemplate() const
+sal_Bool SfxNewFileDialog_Impl::IsTemplate() const
{
return GetSelectedTemplatePos()!=0;
@@ -531,9 +531,9 @@ void AdjustPosSize_Impl(Window *pWin, short nMoveOffset, short nSizeOffset)
pWin->SetPosSizePixel(aPos, aSize);
}
//-------------------------------------------------------------------------
-USHORT SfxNewFileDialog_Impl::GetTemplateFlags()const
+sal_uInt16 SfxNewFileDialog_Impl::GetTemplateFlags()const
{
- USHORT nRet = aTextStyleCB.IsChecked() ? SFX_LOAD_TEXT_STYLES : 0;
+ sal_uInt16 nRet = aTextStyleCB.IsChecked() ? SFX_LOAD_TEXT_STYLES : 0;
if(aFrameStyleCB.IsChecked())
nRet |= SFX_LOAD_FRAME_STYLES;
if(aPageStyleCB.IsChecked())
@@ -545,7 +545,7 @@ USHORT SfxNewFileDialog_Impl::GetTemplateFlags()const
return nRet;
}
//-------------------------------------------------------------------------
-void SfxNewFileDialog_Impl::SetTemplateFlags(USHORT nSet)
+void SfxNewFileDialog_Impl::SetTemplateFlags(sal_uInt16 nSet)
{
aTextStyleCB.Check( 0 != (nSet&SFX_LOAD_TEXT_STYLES ));
aFrameStyleCB.Check( 0 != (nSet&SFX_LOAD_FRAME_STYLES));
@@ -557,7 +557,7 @@ void SfxNewFileDialog_Impl::SetTemplateFlags(USHORT nSet)
//-------------------------------------------------------------------------
SfxNewFileDialog_Impl::SfxNewFileDialog_Impl(
- SfxNewFileDialog* pAntiImplP, USHORT nFl)
+ SfxNewFileDialog* pAntiImplP, sal_uInt16 nFl)
: aRegionFt( pAntiImplP, SfxResId( FT_REGION ) ),
aRegionLb( pAntiImplP, SfxResId( LB_REGION ) ),
aTemplateFt( pAntiImplP, SfxResId( FT_TEMPLATE ) ),
@@ -643,7 +643,7 @@ SfxNewFileDialog_Impl::SfxNewFileDialog_Impl(
}
String &rExtra = pAntiImplP->GetExtraData();
- USHORT nTokCount = rExtra.GetTokenCount( '|' );
+ sal_uInt16 nTokCount = rExtra.GetTokenCount( '|' );
if( nTokCount > 0 && nFlags )
MORE_BTN(SetState( rExtra.GetToken( 0, '|' ) == 'Y' ));
if( nTokCount > 1 && nFlags )
@@ -657,10 +657,10 @@ SfxNewFileDialog_Impl::SfxNewFileDialog_Impl(
aTemplates.Update( sal_True /* be smart */ );
}
// fill the list boxes
- const USHORT nCount = aTemplates.GetRegionCount();
+ const sal_uInt16 nCount = aTemplates.GetRegionCount();
if (nCount)
{
- for(USHORT i = 0; i < nCount; ++i)
+ for(sal_uInt16 i = 0; i < nCount; ++i)
aRegionLb.InsertEntry(aTemplates.GetFullRegionName(i));
aRegionLb.SetSelectHdl(LINK(this, SfxNewFileDialog_Impl, RegionSelect));
}
@@ -684,7 +684,7 @@ SfxNewFileDialog_Impl::~SfxNewFileDialog_Impl()
delete pMoreBt;
}
//-------------------------------------------------------------------------
-SfxNewFileDialog::SfxNewFileDialog(Window *pParent, USHORT nFlags)
+SfxNewFileDialog::SfxNewFileDialog(Window *pParent, sal_uInt16 nFlags)
: SfxModalDialog( pParent, SfxResId( DLG_NEW_FILE ) )
{
pImpl = new SfxNewFileDialog_Impl( this, nFlags );
@@ -695,7 +695,7 @@ SfxNewFileDialog::~SfxNewFileDialog()
delete pImpl;
}
//-------------------------------------------------------------------------
-BOOL SfxNewFileDialog::IsTemplate() const
+sal_Bool SfxNewFileDialog::IsTemplate() const
{
return pImpl->IsTemplate();
}
@@ -715,13 +715,13 @@ String SfxNewFileDialog::GetTemplateFileName() const
return pImpl->GetTemplateFileName();
}
//-------------------------------------------------------------------------
-USHORT SfxNewFileDialog::GetTemplateFlags()const
+sal_uInt16 SfxNewFileDialog::GetTemplateFlags()const
{
return pImpl->GetTemplateFlags();
}
//-------------------------------------------------------------------------
-void SfxNewFileDialog::SetTemplateFlags(USHORT nSet)
+void SfxNewFileDialog::SetTemplateFlags(sal_uInt16 nSet)
{
pImpl->SetTemplateFlags(nSet);
}