2000-09-18 16:07:07 +00:00
|
|
|
|
/*************************************************************************
|
|
|
|
|
*
|
|
|
|
|
* $RCSfile: outlin2.cxx,v $
|
|
|
|
|
*
|
2002-09-06 10:21:59 +00:00
|
|
|
|
* $Revision: 1.22 $
|
2000-09-18 16:07:07 +00:00
|
|
|
|
*
|
2002-09-06 10:21:59 +00:00
|
|
|
|
* last change: $Author: mt $ $Date: 2002-09-06 11:21:38 $
|
2000-09-18 16:07:07 +00:00
|
|
|
|
*
|
|
|
|
|
* The Contents of this file are made available subject to the terms of
|
|
|
|
|
* either of the following licenses
|
|
|
|
|
*
|
|
|
|
|
* - GNU Lesser General Public License Version 2.1
|
|
|
|
|
* - Sun Industry Standards Source License Version 1.1
|
|
|
|
|
*
|
|
|
|
|
* Sun Microsystems Inc., October, 2000
|
|
|
|
|
*
|
|
|
|
|
* GNU Lesser General Public License Version 2.1
|
|
|
|
|
* =============================================
|
|
|
|
|
* Copyright 2000 by Sun Microsystems, Inc.
|
|
|
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
|
|
|
|
*
|
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
|
* License version 2.1, as published by the Free Software Foundation.
|
|
|
|
|
*
|
|
|
|
|
* This library 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 for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
|
* MA 02111-1307 USA
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* Sun Industry Standards Source License Version 1.1
|
|
|
|
|
* =================================================
|
|
|
|
|
* The contents of this file are subject to the Sun Industry Standards
|
|
|
|
|
* Source License Version 1.1 (the "License"); You may not use this file
|
|
|
|
|
* except in compliance with the License. You may obtain a copy of the
|
|
|
|
|
* License at http://www.openoffice.org/license.html.
|
|
|
|
|
*
|
|
|
|
|
* Software provided under this License is provided on an "AS IS" basis,
|
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
|
|
|
|
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
|
|
|
|
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
|
|
|
|
* See the License for the specific provisions governing your rights and
|
|
|
|
|
* obligations concerning the Software.
|
|
|
|
|
*
|
|
|
|
|
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
|
|
|
|
*
|
|
|
|
|
* Copyright: 2000 by Sun Microsystems, Inc.
|
|
|
|
|
*
|
|
|
|
|
* All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Contributor(s): _______________________________________
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
#include <outl_pch.hxx>
|
|
|
|
|
|
|
|
|
|
#pragma hdrstop
|
|
|
|
|
|
|
|
|
|
#include <tools/list.hxx>
|
|
|
|
|
|
|
|
|
|
#ifndef _SFXSTYLE_HXX //autogen
|
|
|
|
|
#include <svtools/style.hxx>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef _SV_MAPMOD_HXX
|
|
|
|
|
#include <vcl/mapmod.hxx>
|
|
|
|
|
#endif
|
|
|
|
|
|
2001-03-09 17:10:20 +00:00
|
|
|
|
#include <forbiddencharacterstable.hxx>
|
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
#define _OUTLINER_CXX
|
|
|
|
|
|
|
|
|
|
#include <outliner.hxx>
|
|
|
|
|
#include <paralist.hxx>
|
|
|
|
|
#include <outlobj.hxx>
|
|
|
|
|
#include <outleeng.hxx>
|
|
|
|
|
#include <outlundo.hxx>
|
|
|
|
|
#include <eeitem.hxx>
|
|
|
|
|
#include <editstat.hxx>
|
|
|
|
|
|
|
|
|
|
DBG_NAMEEX(Outliner);
|
|
|
|
|
|
|
|
|
|
using namespace ::com::sun::star::uno;
|
2000-10-27 09:45:26 +00:00
|
|
|
|
using namespace ::com::sun::star::linguistic2;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
|
|
// =====================================================================
|
|
|
|
|
// ====================== Einfache Durchreicher =======================
|
|
|
|
|
// ======================================================================
|
|
|
|
|
|
|
|
|
|
void Outliner::SetUpdateMode( BOOL bUpdate )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetUpdateMode( bUpdate );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BOOL Outliner::GetUpdateMode() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetUpdateMode();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const SfxItemSet& Outliner::GetEmptyItemSet() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetEmptyItemSet();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::EnableUndo( BOOL bEnable )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->EnableUndo( bEnable );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BOOL Outliner::IsUndoEnabled() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->IsUndoEnabled();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MapMode Outliner::GetRefMapMode() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetRefMapMode();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::SetRefMapMode( const MapMode& rMMode )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetRefMapMode( rMMode );
|
|
|
|
|
}
|
|
|
|
|
|
2001-04-19 13:17:12 +00:00
|
|
|
|
void Outliner::SetBackgroundColor( const Color& rColor )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetBackgroundColor( rColor );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Color Outliner::GetBackgroundColor() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetBackgroundColor();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
void Outliner::ClearModifyFlag()
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->ClearModifyFlag();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BOOL Outliner::IsModified() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->IsModified();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ULONG Outliner::GetTextHeight() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetTextHeight();
|
|
|
|
|
}
|
|
|
|
|
|
2002-01-29 07:51:36 +00:00
|
|
|
|
void Outliner::SetNotifyHdl( const Link& rLink )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
2002-05-27 13:13:49 +00:00
|
|
|
|
pEditEngine->aOutlinerNotifyHdl = rLink;
|
|
|
|
|
|
|
|
|
|
if ( rLink.IsSet() )
|
|
|
|
|
pEditEngine->SetNotifyHdl( LINK( this, Outliner, EditEngineNotifyHdl ) );
|
|
|
|
|
else
|
|
|
|
|
pEditEngine->SetNotifyHdl( Link() );
|
|
|
|
|
|
2002-01-29 07:51:36 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Link Outliner::GetNotifyHdl() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
2002-05-27 13:13:49 +00:00
|
|
|
|
return pEditEngine->aOutlinerNotifyHdl;
|
2002-01-29 07:51:36 +00:00
|
|
|
|
}
|
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
void Outliner::SetStatusEventHdl( const Link& rLink )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetStatusEventHdl( rLink );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Link Outliner::GetStatusEventHdl() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetStatusEventHdl();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::SetDefTab( USHORT nTab )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetDefTab( nTab );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
USHORT Outliner::GetDefTab() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetDefTab();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BOOL Outliner::IsFlatMode() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->IsFlatMode();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BOOL Outliner::UpdateFields()
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->UpdateFields();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::RemoveFields( BOOL bKeepFieldText, TypeId aType )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->RemoveFields( bKeepFieldText, aType );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::SetWordDelimiters( const String& rDelimiters )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetWordDelimiters( rDelimiters );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String Outliner::GetWordDelimiters() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetWordDelimiters();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String Outliner::GetWord( USHORT nPara, USHORT nIndex )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetWord( nPara, nIndex );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->Draw( pOutDev, rOutRect );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->Draw( pOutDev, rOutRect, rStartDocPos );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Outliner::Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->Draw( pOutDev, rStartPos, nOrientation );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::SetPaperSize( const Size& rSize )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetPaperSize( rSize );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const Size& Outliner::GetPaperSize() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetPaperSize();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::SetPolygon( const XPolyPolygon& rPoly )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS( Outliner, 0 );
|
|
|
|
|
pEditEngine->SetPolygon( rPoly );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::SetPolygon( const XPolyPolygon& rPoly, const XPolyPolygon* pXorPoly )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS( Outliner, 0 );
|
|
|
|
|
pEditEngine->SetPolygon( rPoly, pXorPoly );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::ClearPolygon()
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS( Outliner, 0 );
|
|
|
|
|
pEditEngine->ClearPolygon();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const PolyPolygon* Outliner::GetPolygon()
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS( Outliner, 0 );
|
|
|
|
|
return pEditEngine->GetPolygon();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const Size& Outliner::GetMinAutoPaperSize() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetMinAutoPaperSize();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::SetMinAutoPaperSize( const Size& rSz )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetMinAutoPaperSize( rSz );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const Size& Outliner::GetMaxAutoPaperSize() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetMaxAutoPaperSize();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::SetMaxAutoPaperSize( const Size& rSz )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetMaxAutoPaperSize( rSz );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BOOL Outliner::IsExpanded( Paragraph* pPara ) const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pParaList->HasVisibleChilds( pPara );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Paragraph* Outliner::GetParent( Paragraph* pParagraph ) const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
USHORT nRelPos;
|
|
|
|
|
return pParaList->GetParent( pParagraph, nRelPos );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ULONG Outliner::GetChildCount( Paragraph* pParent ) const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pParaList->GetChildCount( pParent );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Size Outliner::CalcTextSize()
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return Size(pEditEngine->CalcTextWidth(),pEditEngine->GetTextHeight());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Point Outliner::GetDocPos( Paragraph* pPara )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetDocPosTopLeft( (USHORT)pParaList->GetAbsPos( pPara ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::SetStyleSheetPool( SfxStyleSheetPool* pSPool )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetStyleSheetPool( pSPool );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SfxStyleSheetPool* Outliner::GetStyleSheetPool()
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetStyleSheetPool();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SfxStyleSheet* Outliner::GetStyleSheet( ULONG nPara )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetStyleSheet( (USHORT)nPara );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BOOL Outliner::IsInSelectionMode() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->IsInSelectionMode();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::SetControlWord( ULONG nWord )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetControlWord( nWord );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ULONG Outliner::GetControlWord() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetControlWord();
|
|
|
|
|
}
|
|
|
|
|
|
2001-06-22 09:58:43 +00:00
|
|
|
|
void Outliner::SetAsianCompressionMode( USHORT n )
|
2001-06-21 12:00:58 +00:00
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetAsianCompressionMode( n );
|
|
|
|
|
}
|
|
|
|
|
|
2001-06-22 09:58:43 +00:00
|
|
|
|
USHORT Outliner::GetAsianCompressionMode() const
|
2001-06-21 12:00:58 +00:00
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetAsianCompressionMode();
|
|
|
|
|
}
|
|
|
|
|
|
2001-10-11 12:16:19 +00:00
|
|
|
|
void Outliner::SetKernAsianPunctuation( BOOL b )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetKernAsianPunctuation( b );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BOOL Outliner::IsKernAsianPunctuation() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->IsKernAsianPunctuation();
|
|
|
|
|
}
|
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
void Outliner::UndoActionStart( USHORT nId )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->UndoActionStart( nId );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::UndoActionEnd( USHORT nId )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->UndoActionEnd( nId );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::InsertUndo( EditUndo* pUndo )
|
|
|
|
|
{
|
2001-07-17 06:04:31 +00:00
|
|
|
|
#ifndef SVX_LIGHT
|
2000-09-18 16:07:07 +00:00
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->GetUndoManager().AddUndoAction( pUndo, FALSE );
|
2001-07-17 06:04:31 +00:00
|
|
|
|
#endif
|
2000-09-18 16:07:07 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BOOL Outliner::IsInUndo()
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->IsInUndo();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ULONG Outliner::GetLineCount( ULONG nParagraph ) const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetLineCount( (USHORT)nParagraph );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
USHORT Outliner::GetLineLen( ULONG nParagraph, USHORT nLine ) const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetLineLen( (USHORT)nParagraph, nLine );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ULONG Outliner::GetLineHeight( ULONG nParagraph, ULONG nLine )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetLineHeight( (USHORT)nParagraph, (USHORT)nLine );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::QuickRemoveCharAttribs( USHORT nPara, USHORT nWhich )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->QuickRemoveCharAttribs( nPara, nWhich );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
EESpellState Outliner::HasSpellErrors( LanguageType eLang )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->HasSpellErrors( eLang );
|
|
|
|
|
}
|
|
|
|
|
|
2000-12-05 10:13:08 +00:00
|
|
|
|
EESpellState Outliner::HasSpellErrors()
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->HasSpellErrors();
|
|
|
|
|
}
|
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
void Outliner::SetDefaultLanguage( LanguageType eLang )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetDefaultLanguage( eLang );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LanguageType Outliner::GetDefaultLanguage() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetDefaultLanguage();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BOOL Outliner::HasOnlineSpellErrors() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->HasOnlineSpellErrors();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::CompleteOnlineSpelling()
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->CompleteOnlineSpelling();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BOOL Outliner::HasText( const SvxSearchItem& rSearchItem )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->HasText( rSearchItem );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::SetEditTextObjectPool( SfxItemPool* pPool )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetEditTextObjectPool( pPool );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SfxItemPool* Outliner::GetEditTextObjectPool() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetEditTextObjectPool();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BOOL Outliner::SpellNextDocument()
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Outliner::SetSpeller( Reference< XSpellChecker1 > &xSpeller )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetSpeller( xSpeller );
|
|
|
|
|
}
|
|
|
|
|
Reference< XSpellChecker1 > Outliner::GetSpeller()
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetSpeller();
|
|
|
|
|
}
|
|
|
|
|
|
2001-03-09 17:10:20 +00:00
|
|
|
|
void Outliner::SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetForbiddenCharsTable( xForbiddenChars );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
vos::ORef<SvxForbiddenCharactersTable> Outliner::GetForbiddenCharsTable() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetForbiddenCharsTable();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
Reference< XHyphenator > Outliner::GetHyphenator() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetHyphenator();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::SetHyphenator( Reference< XHyphenator >& xHyph )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetHyphenator( xHyph );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
OutputDevice* Outliner::GetRefDevice() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetRefDevice();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
USHORT Outliner::GetFirstLineOffset( ULONG nParagraph )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetFirstLineOffset( (USHORT)nParagraph );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ULONG Outliner::GetTextHeight( ULONG nParagraph ) const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetTextHeight((USHORT)nParagraph );
|
|
|
|
|
}
|
|
|
|
|
|
2000-12-05 19:31:13 +00:00
|
|
|
|
Point Outliner::GetDocPos( const Point& rPaperPos ) const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetDocPos( rPaperPos );
|
|
|
|
|
}
|
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
Point Outliner::GetDocPosTopLeft( ULONG nParagraph )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetDocPosTopLeft( (USHORT)nParagraph );
|
|
|
|
|
}
|
|
|
|
|
|
2000-12-05 19:31:13 +00:00
|
|
|
|
BOOL Outliner::IsTextPos( const Point& rPaperPos, USHORT nBorder )
|
2002-07-24 12:18:20 +00:00
|
|
|
|
{
|
|
|
|
|
return IsTextPos( rPaperPos, nBorder, NULL );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BOOL Outliner::IsTextPos( const Point& rPaperPos, USHORT nBorder, BOOL* pbBullet )
|
2000-09-18 16:07:07 +00:00
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
2002-07-24 12:18:20 +00:00
|
|
|
|
if ( pbBullet)
|
|
|
|
|
*pbBullet = FALSE;
|
2000-12-05 19:31:13 +00:00
|
|
|
|
BOOL bTextPos = pEditEngine->IsTextPos( rPaperPos, nBorder );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
if ( !bTextPos )
|
|
|
|
|
{
|
2000-12-05 19:31:13 +00:00
|
|
|
|
Point aDocPos = GetDocPos( rPaperPos );
|
|
|
|
|
USHORT nPara = pEditEngine->FindParagraph( aDocPos.Y() );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
if ( ( nPara != EE_PARA_NOT_FOUND ) && ImplHasBullet( nPara ) )
|
|
|
|
|
{
|
2002-07-24 12:18:20 +00:00
|
|
|
|
Rectangle aBulArea = ImpCalcBulletArea( nPara, TRUE, TRUE );
|
|
|
|
|
if ( aBulArea.IsInside( rPaperPos ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
|
{
|
|
|
|
|
bTextPos = TRUE;
|
2002-07-24 12:18:20 +00:00
|
|
|
|
if ( pbBullet)
|
|
|
|
|
*pbBullet = TRUE;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return bTextPos;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->QuickSetAttribs( rSet, rSel );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::QuickInsertText( const XubString& rText, const ESelection& rSel )
|
|
|
|
|
{
|
|
|
|
|
bFirstParaIsEmpty = FALSE;
|
|
|
|
|
pEditEngine->QuickInsertText( rText, rSel );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::QuickDelete( const ESelection& rSel )
|
|
|
|
|
{
|
|
|
|
|
bFirstParaIsEmpty = FALSE;
|
|
|
|
|
pEditEngine->QuickDelete( rSel );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
bFirstParaIsEmpty = FALSE;
|
|
|
|
|
pEditEngine->QuickInsertField( rFld, rSel );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::QuickInsertLineBreak( const ESelection& rSel )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
bFirstParaIsEmpty = FALSE;
|
|
|
|
|
pEditEngine->QuickInsertLineBreak( rSel );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::QuickFormatDoc( BOOL bFull )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->QuickFormatDoc( bFull );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::SetGlobalCharStretching( USHORT nX, USHORT nY )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetGlobalCharStretching( nX, nY );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::GetGlobalCharStretching( USHORT& rX, USHORT& rY )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->GetGlobalCharStretching( rX, rY );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Outliner::DoStretchChars( USHORT nX, USHORT nY )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->DoStretchChars( nX, nY );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::EraseVirtualDevice()
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->EraseVirtualDevice();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Outliner::SetBigTextObjectStart( USHORT nStartAtPortionCount )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetBigTextObjectStart( nStartAtPortionCount );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
USHORT Outliner::GetBigTextObjectStart() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetBigTextObjectStart();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BOOL Outliner::ShouldCreateBigTextObject() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->ShouldCreateBigTextObject();
|
|
|
|
|
}
|
|
|
|
|
|
2000-11-20 11:17:53 +00:00
|
|
|
|
void Outliner::SetVertical( BOOL b )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetVertical( b );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BOOL Outliner::IsVertical() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->IsVertical();
|
|
|
|
|
}
|
|
|
|
|
|
2002-09-06 10:21:59 +00:00
|
|
|
|
void Outliner::SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->SetDefaultHorizontalTextDirection( eHTextDir );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
EEHorizontalTextDirection Outliner::GetDefaultHorizontalTextDirection() const
|
|
|
|
|
{
|
|
|
|
|
return pEditEngine->GetDefaultHorizontalTextDirection();
|
|
|
|
|
}
|
|
|
|
|
|
2000-11-24 10:30:28 +00:00
|
|
|
|
USHORT Outliner::GetScriptType( const ESelection& rSelection ) const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetScriptType( rSelection );
|
|
|
|
|
}
|
2001-11-16 11:29:12 +00:00
|
|
|
|
|
|
|
|
|
LanguageType Outliner::GetLanguage( USHORT nPara, USHORT nPos ) const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->GetLanguage( nPara, nPos );
|
|
|
|
|
}
|
2001-12-04 14:23:42 +00:00
|
|
|
|
|
|
|
|
|
void Outliner::RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->RemoveAttribs( rSelection, bRemoveParaAttribs, nWhich );
|
|
|
|
|
}
|
|
|
|
|
|
2002-04-26 09:21:05 +00:00
|
|
|
|
void Outliner::EnableAutoColor( BOOL b )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
pEditEngine->EnableAutoColor( b );
|
|
|
|
|
}
|
2001-12-04 14:23:42 +00:00
|
|
|
|
|
2002-04-26 09:21:05 +00:00
|
|
|
|
BOOL Outliner::IsAutoColorEnabled() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
|
|
|
|
return pEditEngine->IsAutoColorEnabled();
|
|
|
|
|
}
|
2002-05-27 13:13:49 +00:00
|
|
|
|
|
|
|
|
|
void Outliner::ForceAutoColor( BOOL b )
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
2002-05-31 08:42:52 +00:00
|
|
|
|
pEditEngine->ForceAutoColor( b );
|
2002-05-27 13:13:49 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BOOL Outliner::IsForceAutoColor() const
|
|
|
|
|
{
|
|
|
|
|
DBG_CHKTHIS(Outliner,0);
|
2002-05-31 08:42:52 +00:00
|
|
|
|
return pEditEngine->IsForceAutoColor();
|
2002-05-27 13:13:49 +00:00
|
|
|
|
}
|