summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/app/apphdl.cxx16
-rw-r--r--sw/source/ui/app/docsh.cxx1
-rw-r--r--sw/source/ui/cctrl/makefile.mk3
-rwxr-xr-x[-rw-r--r--]sw/source/ui/config/optpage.cxx22
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx6
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx7
-rw-r--r--sw/source/ui/dbui/mailmergewizard.cxx2
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx4
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx2
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx8
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.hxx2
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx2
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.hxx2
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx4
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.hxx2
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.cxx4
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.hxx2
-rw-r--r--sw/source/ui/dialog/SwSpellDialogChildWindow.cxx146
-rwxr-xr-x[-rw-r--r--]sw/source/ui/dochdl/dochdl.src9
-rwxr-xr-x[-rw-r--r--]sw/source/ui/dochdl/gloshdl.cxx45
-rw-r--r--sw/source/ui/docvw/PostItMgr.cxx28
-rwxr-xr-x[-rw-r--r--]sw/source/ui/docvw/SidebarWin.cxx0
-rw-r--r--sw/source/ui/inc/SwSpellDialogChildWindow.hxx4
-rw-r--r--sw/source/ui/inc/view.hxx2
-rw-r--r--sw/source/ui/ribbar/makefile.mk5
-rw-r--r--sw/source/ui/shells/basesh.cxx5
-rw-r--r--sw/source/ui/shells/makefile.mk1
-rw-r--r--sw/source/ui/uiview/makefile.mk5
-rw-r--r--sw/source/ui/uiview/viewdraw.cxx7
-rw-r--r--sw/source/ui/uno/makefile.mk3
-rw-r--r--[-rwxr-xr-x]sw/source/ui/uno/unotxdoc.cxx15
-rw-r--r--sw/source/ui/uno/warnpassword.cxx86
-rw-r--r--sw/source/ui/utlui/makefile.mk4
33 files changed, 180 insertions, 274 deletions
diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx
index 0a844453bb3b..653208aaf250 100644
--- a/sw/source/ui/app/apphdl.cxx
+++ b/sw/source/ui/app/apphdl.cxx
@@ -765,24 +765,28 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
DELETEZ(pWebToolbarConfig) ;
DELETEZ(pAuthorNames) ;
DELETEZ(pDBConfig);
-
- if (pColorConfig != 0) {
+ if( pColorConfig )
+ {
pColorConfig->RemoveListener(this);
DELETEZ(pColorConfig);
}
- if (pAccessibilityOptions != 0) {
+ if( pAccessibilityOptions )
+ {
pAccessibilityOptions->RemoveListener(this);
DELETEZ(pAccessibilityOptions);
}
- if (pCTLOptions != 0) {
+ if( pCTLOptions )
+ {
pCTLOptions->RemoveListener(this);
DELETEZ(pCTLOptions);
}
- if (pUserOptions != 0) {
+ if( pUserOptions )
+ {
pUserOptions->RemoveListener(this);
DELETEZ(pUserOptions);
}
- if (pUndoOptions != 0) {
+ if( pUndoOptions )
+ {
pUndoOptions->RemoveListener(this);
DELETEZ(pUndoOptions);
}
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index 34ccac06a256..c3f6585e325e 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -101,7 +101,6 @@
#include <cmdid.h>
#include <globals.hrc>
#include <app.hrc>
-#include "warnpassword.hxx"
#include <cfgid.h>
#include <unotools/moduleoptions.hxx>
diff --git a/sw/source/ui/cctrl/makefile.mk b/sw/source/ui/cctrl/makefile.mk
index c724f287fc3a..33ba83f34d7c 100644
--- a/sw/source/ui/cctrl/makefile.mk
+++ b/sw/source/ui/cctrl/makefile.mk
@@ -50,6 +50,9 @@ SLOFILES = \
$(SLO)$/popbox.obj \
$(SLO)$/swlbox.obj
+EXCEPTIONSFILES = \
+ $(SLO)$/popbox.obj
+
# --- Tagets -------------------------------------------------------
.INCLUDE : target.mk
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 97930582ce5a..921d2a652002 100644..100755
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -542,10 +542,15 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& )
aFaxLB.SelectEntry( pAddPrinterAttr->sFaxName );
}
if (aProspectCB.IsChecked())
+ {
aProspectCB_RTL.Enable(TRUE);
+ aNoRB.Enable( FALSE );
+ aOnlyRB.Enable( FALSE );
+ aEndRB.Enable( FALSE );
+ aEndPageRB.Enable( FALSE );
+ }
else
- aProspectCB_RTL.Disable();
-
+ aProspectCB_RTL.Enable( FALSE );
}
//-----------------------------------------------------------------------
@@ -560,13 +565,14 @@ void SwAddPrinterTabPage::Init()
IMPL_LINK_INLINE_START( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
{
bAttrModified = TRUE;
- if (aProspectCB.IsChecked())
- aProspectCB_RTL.Enable(TRUE);
- else
- {
+ bool bIsProspect = aProspectCB.IsChecked();
+ if (!bIsProspect)
aProspectCB_RTL.Check( FALSE );
- aProspectCB_RTL.Disable();
- }
+ aProspectCB_RTL.Enable( bIsProspect );
+ aNoRB.Enable( !bIsProspect );
+ aOnlyRB.Enable( !bIsProspect );
+ aEndRB.Enable( !bIsProspect );
+ aEndPageRB.Enable( !bIsProspect );
return 0;
}
IMPL_LINK_INLINE_END( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index b44ee246ac41..9e62f7a4de36 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1911,7 +1911,7 @@ void SwInsertDBColAutoPilot::Load()
SwInsDBColumn& rSet = *aDBColumns[ n ];
for( USHORT m = 0; m < pNewData->aDBColumns.Count() ; ++m )
{
- const SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ];
+ SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ];
if(rGet.sColumn == rSet.sColumn)
{
if( rGet.bHasFmt && !rGet.bIsDBFmt )
@@ -1923,8 +1923,10 @@ void SwInsertDBColAutoPilot::Load()
{
xub_StrLen nCheckPos;
short nType;
- rNFmtr.PutEntry( (String&)rGet.sUsrNumFmt, nCheckPos, nType,
+ String sTmpFmt = rGet.sUsrNumFmt;
+ rNFmtr.PutEntry( sTmpFmt, nCheckPos, nType,
rSet.nUsrNumFmt, rGet.eUsrNumFmtLng );
+ rGet.sUsrNumFmt = sTmpFmt;
}
}
break;
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 8ad861713e0a..cf894f8728c4 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -2907,9 +2907,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
}
else
{
- SwDoc* pNewDoc = rSourceView.GetDocShell()->GetDoc()->CreateCopy();
- xWorkDocSh = new SwDocShell( pNewDoc, SFX_CREATE_MODE_STANDARD );
- xWorkDocSh->DoInitNew();
+ xWorkDocSh = rSourceView.GetDocShell()->GetDoc()->CreateCopy(true);
}
//create a ViewFrame
SwView* pWorkView = static_cast< SwView* >( SfxViewFrame::LoadHiddenDocument( *xWorkDocSh, 0 )->GetViewShell() );
@@ -3032,8 +3030,9 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
pTargetShell->SttDoc();
//
}
- catch( Exception& )
+ catch( Exception& rEx)
{
+ (void)rEx;
DBG_ERROR("exception caught in SwNewDBMgr::MergeDocuments");
}
DELETEZ(pImpl->pMergeData);
diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx
index 54cf6edac512..365c56b4c0ea 100644
--- a/sw/source/ui/dbui/mailmergewizard.cxx
+++ b/sw/source/ui/dbui/mailmergewizard.cxx
@@ -260,7 +260,7 @@ void SwMailMergeWizard::UpdateRoadmap()
//#i97436# if a document has to be loaded then enable output type page only
m_bDocumentLoad = false;
bool bEnableOutputTypePage = (nCurPage != MM_DOCUMENTSELECTPAGE) ||
- static_cast<svt::OWizardPage*>(pCurPage)->commitPage( eValidate );
+ static_cast<svt::OWizardPage*>(pCurPage)->commitPage( ::svt::WizardTypes::eValidate );
for(sal_uInt16 nPage = MM_DOCUMENTSELECTPAGE; nPage <= MM_OUTPUTPAGE; ++nPage)
{
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index b2d8c790c25d..a35b0727c1ed 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -175,9 +175,9 @@ void SwMailMergeAddressBlockPage::ActivatePage()
/*-- 27.05.2004 13:59:15---------------------------------------------------
-----------------------------------------------------------------------*/
-sal_Bool SwMailMergeAddressBlockPage::commitPage( CommitPageReason _eReason )
+sal_Bool SwMailMergeAddressBlockPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
- if ( eTravelForward == _eReason && !m_pWizard->GetConfigItem().GetResultSet().is() )
+ if ( ::svt::WizardTypes::eTravelForward == _eReason && !m_pWizard->GetConfigItem().GetResultSet().is() )
return sal_False;
return sal_True;
}
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index b47b71f1a561..eddaca225e9b 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -98,7 +98,7 @@ class SwMailMergeAddressBlockPage : public svt::OWizardPage
void EnableAddressBlock(sal_Bool bAll, sal_Bool bSelective);
virtual void ActivatePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
public:
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index 698e12f44882..e125b4f8ed2e 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -197,11 +197,11 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton)
/*-- 06.04.2004 12:52:24---------------------------------------------------
-----------------------------------------------------------------------*/
-sal_Bool SwMailMergeDocSelectPage::commitPage( CommitPageReason _eReason )
+sal_Bool SwMailMergeDocSelectPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
sal_Bool bReturn = sal_False;
- bool bNext = _eReason == eTravelForward;
- if(bNext || _eReason == eValidate )
+ bool bNext = _eReason == ::svt::WizardTypes::eTravelForward;
+ if(bNext || _eReason == ::svt::WizardTypes::eValidate )
{
::rtl::OUString sReloadDocument;
bReturn = m_aCurrentDocRB.IsChecked() ||
@@ -209,7 +209,7 @@ sal_Bool SwMailMergeDocSelectPage::commitPage( CommitPageReason _eReason )
((sReloadDocument = m_sLoadFileName).getLength() && m_aLoadDocRB.IsChecked() )||
((sReloadDocument = m_sLoadTemplateName).getLength() && m_aLoadTemplateRB.IsChecked())||
(m_aRecentDocRB.IsChecked() && (sReloadDocument = m_aRecentDocLB.GetSelectEntry()).getLength());
- if( _eReason == eValidate )
+ if( _eReason == ::svt::WizardTypes::eValidate )
m_pWizard->SetDocumentLoad(!m_aCurrentDocRB.IsChecked());
if(bNext && !m_aCurrentDocRB.IsChecked())
diff --git a/sw/source/ui/dbui/mmdocselectpage.hxx b/sw/source/ui/dbui/mmdocselectpage.hxx
index 2785846b39e8..6483025f88ed 100644
--- a/sw/source/ui/dbui/mmdocselectpage.hxx
+++ b/sw/source/ui/dbui/mmdocselectpage.hxx
@@ -61,7 +61,7 @@ class SwMailMergeDocSelectPage : public svt::OWizardPage
DECL_LINK(DocSelectHdl, RadioButton*);
DECL_LINK(FileSelectHdl, PushButton*);
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
public:
SwMailMergeDocSelectPage( SwMailMergeWizard* _pParent);
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index c7613055d6ab..7281880c593d 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -390,7 +390,7 @@ void SwMailMergeGreetingsPage::ActivatePage()
/*-- 11.05.2004 14:47:10---------------------------------------------------
-----------------------------------------------------------------------*/
-sal_Bool SwMailMergeGreetingsPage::commitPage( CommitPageReason )
+sal_Bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPageReason )
{
SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem();
diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx
index 1756f78a29d8..3e237d797e2f 100644
--- a/sw/source/ui/dbui/mmgreetingspage.hxx
+++ b/sw/source/ui/dbui/mmgreetingspage.hxx
@@ -122,7 +122,7 @@ class SwMailMergeGreetingsPage : public svt::OWizardPage,
virtual void UpdatePreview();
virtual void ActivatePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
public:
SwMailMergeGreetingsPage( SwMailMergeWizard* _pParent);
~SwMailMergeGreetingsPage();
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 366eb23e9352..d9ae7b9c518f 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -254,11 +254,11 @@ void SwMailMergeLayoutPage::ActivatePage()
/*-- 11.05.2004 10:41:26---------------------------------------------------
-----------------------------------------------------------------------*/
-sal_Bool SwMailMergeLayoutPage::commitPage( CommitPageReason _eReason )
+sal_Bool SwMailMergeLayoutPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
//now insert the frame and the greeting
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
- if(eTravelForward == _eReason)
+ if(::svt::WizardTypes::eTravelForward == _eReason)
{
long nLeft = static_cast< long >(m_aLeftMF.Denormalize(m_aLeftMF.GetValue(FUNIT_TWIP)));
long nTop = static_cast< long >(m_aTopMF.Denormalize(m_aTopMF.GetValue(FUNIT_TWIP)));
diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx
index 0a4569c71437..b7dd9dfab2e6 100644
--- a/sw/source/ui/dbui/mmlayoutpage.hxx
+++ b/sw/source/ui/dbui/mmlayoutpage.hxx
@@ -98,7 +98,7 @@ class SwMailMergeLayoutPage : public svt::OWizardPage
static void InsertGreeting(SwWrtShell& rShell, SwMailMergeConfigItem& rConfigItem, bool bExample);
virtual void ActivatePage();
- virtual sal_Bool commitPage(CommitPageReason _eReason);
+ virtual sal_Bool commitPage(::svt::WizardTypes::CommitPageReason _eReason);
public:
SwMailMergeLayoutPage( SwMailMergeWizard* _pParent);
~SwMailMergeLayoutPage();
diff --git a/sw/source/ui/dbui/mmpreparemergepage.cxx b/sw/source/ui/dbui/mmpreparemergepage.cxx
index a8650c4b37c9..8539f037ecdc 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.cxx
+++ b/sw/source/ui/dbui/mmpreparemergepage.cxx
@@ -191,10 +191,10 @@ void SwMailMergePrepareMergePage::ActivatePage()
/*-- 13.05.2004 15:38:32---------------------------------------------------
merge the data into a new file
-----------------------------------------------------------------------*/
-sal_Bool SwMailMergePrepareMergePage::commitPage( CommitPageReason _eReason )
+sal_Bool SwMailMergePrepareMergePage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
- if(eTravelForward == _eReason && !rConfigItem.IsMergeDone())
+ if(::svt::WizardTypes::eTravelForward == _eReason && !rConfigItem.IsMergeDone())
{
m_pWizard->CreateTargetDocument();
m_pWizard->SetRestartPage(MM_MERGEPAGE);
diff --git a/sw/source/ui/dbui/mmpreparemergepage.hxx b/sw/source/ui/dbui/mmpreparemergepage.hxx
index 90298711dd88..8fb7ad938996 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.hxx
+++ b/sw/source/ui/dbui/mmpreparemergepage.hxx
@@ -64,7 +64,7 @@ class SwMailMergePrepareMergePage : public svt::OWizardPage
DECL_LINK(MoveHdl_Impl, void*);
virtual void ActivatePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
public:
SwMailMergePrepareMergePage( SwMailMergeWizard* _pParent);
diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
index 8bf658d504b0..c9e99979e66b 100644
--- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
@@ -32,13 +32,13 @@
#include <vcl/msgbox.hxx>
#include <editeng/svxacorr.hxx>
#include <editeng/acorrcfg.hxx>
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
#include <sfx2/app.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <editeng/unolingu.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/editview.hxx>
#include <wrtsh.hxx>
#include <sfx2/printer.hxx>
#include <svx/svdoutl.hxx>
@@ -56,9 +56,7 @@
#include <pam.hxx>
#include <drawbase.hxx>
#include <unotextrange.hxx>
-#ifndef _DIALOG_HXX
#include <dialog.hrc>
-#endif
#include <cmdid.h>
@@ -202,12 +200,19 @@ SfxChildWinInfo SwSpellDialogChildWindow::GetInfo (void) const
-----------------------------------------------------------------------*/
-svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void)
+svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck)
{
svx::SpellPortions aRet;
SwWrtShell* pWrtShell = GetWrtShell_Impl();
if(pWrtShell)
{
+ if (!bRecheck)
+ {
+ // first set continuation point for spell/grammar check to the
+ // end of the current sentence
+ pWrtShell->MoveContinuationPosToEndOfCheckedSentence();
+ }
+
ShellModes eSelMode = pWrtShell->GetView().GetShellMode();
bool bDrawText = SHELL_MODE_DRAWTEXT == eSelMode;
bool bNormalText =
@@ -239,7 +244,10 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void)
if(!pWrtShell->HasSelection())
pWrtShell->GoStartSentence();
else
+ {
+ pWrtShell->ExpandToSentenceBorders();
m_pSpellState->m_bStartedInSelection = true;
+ }
//determine if the selection is outside of the body text
bOtherText = !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY);
m_pSpellState->m_SpellStartPosition = bOtherText ? SPELL_START_OTHER : SPELL_START_BODY;
@@ -269,7 +277,24 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void)
m_pSpellState->m_SpellStartPosition = SPELL_START_DRAWTEXT;
m_pSpellState->m_pStartDrawing = pSdrView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
- m_pSpellState->m_aStartDrawingSelection = pOLV->GetSelection();
+ // start checking at the top of the drawing object
+ pOLV->SetSelection( ESelection() );
+ m_pSpellState->m_aStartDrawingSelection = ESelection();
+/*
+Note: spelling in a selection only, or starting in a mid of a drawing object requires
+further changes elsewhere. (Especially if it should work in sc and sd as well.)
+The code below would only be part of the solution.
+(Keeping it a as a comment for the time being)
+ ESelection aCurSel( pOLV->GetSelection() );
+ ESelection aSentenceSel( pOLV->GetEditView().GetEditEngine()->SelectSentence( aCurSel ) );
+ if (!aCurSel.HasRange())
+ {
+ aSentenceSel.nEndPara = aSentenceSel.nStartPara;
+ aSentenceSel.nEndPos = aSentenceSel.nStartPos;
+ }
+ pOLV->SetSelection( aSentenceSel );
+ m_pSpellState->m_aStartDrawingSelection = aSentenceSel;
+*/
}
m_pSpellState->m_bInitialCall = false;
@@ -316,61 +341,66 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void)
//spell inside of the Writer text
if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
{
- //find out which text has been spelled body or other
- bOtherText = !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY);
- if(bOtherText && m_pSpellState->m_bStartedInOther && m_pSpellState->pOtherCursor)
+ // if there is a selection (within body or header/footer text)
+ // then spell/grammar checking should not move outside of it.
+ if (!m_pSpellState->m_bStartedInSelection)
{
- m_pSpellState->m_bStartedInOther = false;
- pWrtShell->SetSelection(*m_pSpellState->pOtherCursor);
- pWrtShell->SpellEnd();
- delete m_pSpellState->pOtherCursor;
- m_pSpellState->pOtherCursor = 0;
- pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART, FALSE );
- pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn);
- }
- if(!aRet.size())
- {
- //end spelling
- pWrtShell->SpellEnd();
- if(bOtherText)
+ //find out which text has been spelled body or other
+ bOtherText = !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY);
+ if(bOtherText && m_pSpellState->m_bStartedInOther && m_pSpellState->pOtherCursor)
{
- m_pSpellState->m_bOtherSpelled = true;
- //has the body been spelled?
- if(!m_pSpellState->m_bBodySpelled)
+ m_pSpellState->m_bStartedInOther = false;
+ pWrtShell->SetSelection(*m_pSpellState->pOtherCursor);
+ pWrtShell->SpellEnd();
+ delete m_pSpellState->pOtherCursor;
+ m_pSpellState->pOtherCursor = 0;
+ pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART, FALSE );
+ pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn);
+ }
+ if(!aRet.size())
+ {
+ //end spelling
+ pWrtShell->SpellEnd();
+ if(bOtherText)
{
- pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, FALSE );
- if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
+ m_pSpellState->m_bOtherSpelled = true;
+ //has the body been spelled?
+ if(!m_pSpellState->m_bBodySpelled)
{
- m_pSpellState->m_bBodySpelled = true;
- pWrtShell->SpellEnd();
+ pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, FALSE );
+ if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
+ {
+ m_pSpellState->m_bBodySpelled = true;
+ pWrtShell->SpellEnd();
+ }
}
}
+ else
+ {
+ m_pSpellState->m_bBodySpelled = true;
+ if(!m_pSpellState->m_bOtherSpelled && pWrtShell->HasOtherCnt())
+ {
+ pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, FALSE );
+ if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
+ {
+ pWrtShell->SpellEnd();
+ m_pSpellState->m_bOtherSpelled = true;
+ }
+ }
+ else
+ m_pSpellState->m_bOtherSpelled = true;
+ }
}
- else
+
+ //search for a draw text object that contains error and spell it
+ if(!aRet.size() &&
+ (m_pSpellState->m_bDrawingsSpelled ||
+ !FindNextDrawTextError_Impl(*pWrtShell) || !SpellDrawText_Impl(*pWrtShell, aRet)))
{
- m_pSpellState->m_bBodySpelled = true;
- if(!m_pSpellState->m_bOtherSpelled && pWrtShell->HasOtherCnt())
- {
- pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, FALSE );
- if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
- {
- pWrtShell->SpellEnd();
- m_pSpellState->m_bOtherSpelled = true;
- }
- }
- else
- m_pSpellState->m_bOtherSpelled = true;
+ lcl_LeaveDrawText(*pWrtShell);
+ m_pSpellState->m_bDrawingsSpelled = true;
}
}
-
- //search for a draw text object that contains error and spell it
- if(!aRet.size() &&
- (m_pSpellState->m_bDrawingsSpelled ||
- !FindNextDrawTextError_Impl(*pWrtShell) || !SpellDrawText_Impl(*pWrtShell, aRet)))
- {
- lcl_LeaveDrawText(*pWrtShell);
- m_pSpellState->m_bDrawingsSpelled = true;
- }
}
}
// now only the rest of the body text can be spelled -
@@ -430,7 +460,7 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void)
/*-- 09.09.2003 10:39:40---------------------------------------------------
-----------------------------------------------------------------------*/
-void SwSpellDialogChildWindow::ApplyChangedSentence(const svx::SpellPortions& rChanged)
+void SwSpellDialogChildWindow::ApplyChangedSentence(const svx::SpellPortions& rChanged, bool bRecheck)
{
SwWrtShell* pWrtShell = GetWrtShell_Impl();
DBG_ASSERT(!m_pSpellState->m_bInitialCall, "ApplyChangedSentence in initial call or after resume");
@@ -443,13 +473,19 @@ void SwSpellDialogChildWindow::ApplyChangedSentence(const svx::SpellPortions& rC
SHELL_MODE_LIST_TEXT == eSelMode ||
SHELL_MODE_TABLE_LIST_TEXT == eSelMode ||
SHELL_MODE_TEXT == eSelMode;
+
+ // evaluate if the same sentence should be rechecked or not.
+ // Sentences that got grammar checked should always be rechecked in order
+ // to detect possible errors that get introduced with the changes
+ bRecheck |= pWrtShell->HasLastSentenceGotGrammarChecked();
+
if(bNormalText)
- pWrtShell->ApplyChangedSentence(rChanged, m_bIsGrammarCheckingOn);
+ pWrtShell->ApplyChangedSentence(rChanged, bRecheck);
else if(bDrawText )
{
SdrView* pDrView = pWrtShell->GetDrawView();
SdrOutliner *pOutliner = pDrView->GetTextEditOutliner();
- pOutliner->ApplyChangedSentence(pDrView->GetTextEditOutlinerView()->GetEditView(), rChanged, m_bIsGrammarCheckingOn);
+ pOutliner->ApplyChangedSentence(pDrView->GetTextEditOutlinerView()->GetEditView(), rChanged, bRecheck);
}
}
}
@@ -847,7 +883,7 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh)
Point aTmp( 0,0 );
rSh.SelectObj( aTmp, 0, pTextObj );
SdrPageView* pPV = pDrView->GetSdrPageView();
- rView.BeginTextEdit( pTextObj, pPV, &rView.GetEditWin(), FALSE );
+ rView.BeginTextEdit( pTextObj, pPV, &rView.GetEditWin(), FALSE, TRUE );
rView.AttrChangedNotify(&rSh);
bNextDoc = true;
}
diff --git a/sw/source/ui/dochdl/dochdl.src b/sw/source/ui/dochdl/dochdl.src
index 8ecccb5395cb..f92ea43681d8 100644..100755
--- a/sw/source/ui/dochdl/dochdl.src
+++ b/sw/source/ui/dochdl/dochdl.src
@@ -73,13 +73,4 @@ String STR_DDEFORMAT
{
Text [ en-US ] = "DDE link" ;
};
-Bitmap BMP_SW_TEAM_MUGSHOT
-{
- File ="writerteam.bmp";
-};
-
-String STR_SW_TEAM_NAMES
-{
- Text = "Back row: Aidan Butler, Hans-Peter Burow, Caolan McNamara, Michael Brauer, Martin Maher, Gunnar Timm\nFront row: Thomas Lange, Oliver-Rainer Duesterhoeft, Henning Brinkmann, Andreas Martens, Oliver Specht, Frank Meies, Daniel Vogelheim";
-};
diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx
index 5cb1df8a9ebb..cc789d6e4498 100644..100755
--- a/sw/source/ui/dochdl/gloshdl.cxx
+++ b/sw/source/ui/dochdl/gloshdl.cxx
@@ -607,48 +607,9 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
aShortName.Erase(nMaxLen);
aShortName.AppendAscii(" ...");
}
- if ( aShortName.EqualsAscii ( "StarWriterTeam", 0, 14 ) )
- {
- String sGraphicName ( RTL_CONSTASCII_USTRINGPARAM ( "StarWriter team photo" ) );
- String sTeamCredits ( RTL_CONSTASCII_USTRINGPARAM ( "StarWriter team credits" ) );
- pWrtShell->StartUndo ( UNDO_INSGLOSSARY );
- pWrtShell->StartAllAction();
- if(pWrtShell->HasSelection())
- pWrtShell->DelLeft();
- Bitmap aBitmap ( SW_RES ( BMP_SW_TEAM_MUGSHOT ) );
- pWrtShell->Insert ( aEmptyStr, aEmptyStr, aBitmap);
- pWrtShell->SetFlyName ( sGraphicName );
- SwTxtFmtColl* pColl = pWrtShell->GetTxtCollFromPool ( RES_POOLCOLL_LABEL_ABB );
- const IDocumentFieldsAccess* pIDFA = pWrtShell->getIDocumentFieldsAccess();
- SwFieldType* pType = pIDFA->GetFldType( RES_SETEXPFLD, pColl->GetName(), false );
- sal_uInt16 nId = pIDFA->GetFldTypes()->GetPos( pType );
- pWrtShell->InsertLabel( LTYPE_OBJECT, aEmptyStr, aEmptyStr, aEmptyStr, FALSE, nId, aEmptyStr );
- pWrtShell->SwFEShell::SetFlyName( sTeamCredits );
- pWrtShell->SwFEShell::SelectObj ( Point ( ULONG_MAX, ULONG_MAX ) );
- pWrtShell->EnterStdMode();
- pWrtShell->EndPara ( TRUE );
- String aTmp ( SW_RES ( STR_SW_TEAM_NAMES ) );
- pWrtShell->Insert ( aTmp );
- SvxAdjustItem aAdjustItem( SVX_ADJUST_CENTER, RES_PARATR_ADJUST );
- pWrtShell->SetAttr( aAdjustItem );
- pWrtShell->SttPara ();
- pWrtShell->SplitNode();
- pWrtShell->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
- SvxWeightItem aWeightItem ( WEIGHT_BOLD, RES_CHRATR_WEIGHT );
- pWrtShell->Insert ( String ( RTL_CONSTASCII_USTRINGPARAM ( "The StarWriter team!" ) ) );
- pWrtShell->SttPara ( TRUE );
- pWrtShell->SetAttr( aWeightItem);
- pWrtShell->GotoFly ( sTeamCredits);
- pWrtShell->EndAllAction();
- pWrtShell->EndUndo( UNDO_INSGLOSSARY );
- }
- else
- {
- String aTmp( SW_RES(STR_NOGLOS));
- aTmp.SearchAndReplaceAscii("%1", aShortName);
- InfoBox( pWrtShell->GetView().GetWindow(), aTmp ).Execute();
-
- }
+ String aTmp( SW_RES(STR_NOGLOS));
+ aTmp.SearchAndReplaceAscii("%1", aShortName);
+ InfoBox( pWrtShell->GetView().GetWindow(), aTmp ).Execute();
}
return FALSE;
diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx
index c6b0ad4a136f..53770059cbcd 100644
--- a/sw/source/ui/docvw/PostItMgr.cxx
+++ b/sw/source/ui/docvw/PostItMgr.cxx
@@ -1304,7 +1304,7 @@ void SwPostItMgr::Delete()
CalcRects();
LayoutPostIts();
}
-
+#if 0
void SwPostItMgr::Hide(SwPostItField* pPostItField )
{
for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
@@ -1323,7 +1323,7 @@ void SwPostItMgr::Hide(SwPostItField* pPostItField )
LayoutPostIts();
}
-
+#endif
void SwPostItMgr::Hide( const String& rAuthor )
{
for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
@@ -1398,30 +1398,6 @@ sw::annotation::SwAnnotationWin* SwPostItMgr::GetAnnotationWin(const SwPostItFie
return NULL;
}
-bool SwPostItMgr::ShowPreview(const SwField* pFld, SwFmtFld*& pFmtFld) const
-{
- for (unsigned long n=0;n<mPages.size();n++)
- {
- if (mPages[n]->mList->size()>0)
- {
- for(const_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++)
- {
- if ( (*i)->GetFmtFld() && ((*i)->GetFmtFld()->GetFld()==pFld) )
- {
- pFmtFld = (*i)->GetFmtFld();
- const long aSidebarheight = mPages[n]->bScrollbar ? mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height() : 0;
- bool bTopPage = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y())).Y() >= (mPages[n]->mPageRect.Top()+aSidebarheight);
- bool bBottomPage = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y()+(*i)->pPostIt->GetSizePixel().Height())).Y() <= (mPages[n]->mPageRect.Bottom()-aSidebarheight);
- const bool bTopVis = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y())).Y() > mpView->GetVisArea().Top();
- const bool bBottomVis = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y()/*+(*i)->pPostIt->GetSizePixel().Height()*/)).Y() <= mpView->GetVisArea().Bottom();
- return !(bBottomPage && bTopPage && bBottomVis && bTopVis);
- }
- }
- }
- }
- return false;
-}
-
SwSidebarWin* SwPostItMgr::GetNextPostIt( USHORT aDirection,
SwSidebarWin* aPostIt )
{
diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx
index cce6db3a891b..cce6db3a891b 100644..100755
--- a/sw/source/ui/docvw/SidebarWin.cxx
+++ b/sw/source/ui/docvw/SidebarWin.cxx
diff --git a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
index 3ab86b3469d7..dd3e7e2dce9b 100644
--- a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
+++ b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
@@ -48,8 +48,8 @@ class SwSpellDialogChildWindow
void LockFocusNotification(bool bLock);
protected:
- virtual svx::SpellPortions GetNextWrongSentence (void);
- virtual void ApplyChangedSentence(const svx::SpellPortions& rChanged);
+ virtual svx::SpellPortions GetNextWrongSentence(bool bRecheck);
+ virtual void ApplyChangedSentence(const svx::SpellPortions& rChanged, bool bRecheck);
virtual void AddAutoCorrection(const String& rOld, const String& rNew, LanguageType eLanguage);
virtual bool HasAutoCorrection();
virtual bool HasGrammarChecking();
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index c59bb1535bad..d63149eb7c4f 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -580,7 +580,7 @@ public:
BOOL HasDrwObj(SdrObject *pSdrObj) const;
BOOL HasOnlyObj(SdrObject *pSdrObj, UINT32 eObjInventor) const;
BOOL BeginTextEdit( SdrObject* pObj, SdrPageView* pPV=NULL,
- Window* pWin=NULL, BOOL bIsNewObj=FALSE);
+ Window* pWin=NULL, bool bIsNewObj=false, bool bSetSelectionToStart=false );
void StateTabWin(SfxItemSet&);
diff --git a/sw/source/ui/ribbar/makefile.mk b/sw/source/ui/ribbar/makefile.mk
index 72acc793070a..2405d4b16d9f 100644
--- a/sw/source/ui/ribbar/makefile.mk
+++ b/sw/source/ui/ribbar/makefile.mk
@@ -45,6 +45,11 @@ SRC1FILES = \
tblctrl.src \
workctrl.src
+EXCEPTIONSFILES = \
+ $(SLO)$/tblctrl.obj \
+ $(SLO)$/tbxanchr.obj \
+ $(SLO)$/workctrl.obj
+
SLOFILES = \
$(SLO)$/inputwin.obj \
$(SLO)$/tbxanchr.obj \
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index 0cee102729a7..0500b4a88310 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -703,8 +703,9 @@ void SwBaseShell::Execute(SfxRequest &rReq)
rSh.EndSelect();
}
BOOL bRet = rSh.MoveFldType(pFldType, nSlot == FN_GOTO_NEXT_MARK);
- if (bRet)
- rSh.ClickToField(*rSh.GetCurFld());
+ SwField* pCurField = bRet ? rSh.GetCurFld() : 0;
+ if (pCurField)
+ rSh.ClickToField(*pCurField);
rReq.SetReturnValue(SfxBoolItem( nSlot, bRet));
}
}
diff --git a/sw/source/ui/shells/makefile.mk b/sw/source/ui/shells/makefile.mk
index e9a03a5a41cc..dce62a2c9336 100644
--- a/sw/source/ui/shells/makefile.mk
+++ b/sw/source/ui/shells/makefile.mk
@@ -83,6 +83,7 @@ EXCEPTIONSFILES = \
$(SLO)$/drwtxtsh.obj \
$(SLO)$/frmsh.obj \
$(SLO)$/drwtxtex.obj \
+ $(SLO)$/slotadd.obj \
$(SLO)$/textsh1.obj
# --- Tagets -------------------------------------------------------
diff --git a/sw/source/ui/uiview/makefile.mk b/sw/source/ui/uiview/makefile.mk
index d06bb58a7dab..337ee85da580 100644
--- a/sw/source/ui/uiview/makefile.mk
+++ b/sw/source/ui/uiview/makefile.mk
@@ -49,8 +49,13 @@ EXCEPTIONSFILES= \
$(SLO)$/swcli.obj \
$(SLO)$/uivwimp.obj \
$(SLO)$/view.obj \
+ $(SLO)$/view0.obj \
+ $(SLO)$/view1.obj \
$(SLO)$/view2.obj \
+ $(SLO)$/viewdraw.obj \
+ $(SLO)$/viewport.obj \
$(SLO)$/viewprt.obj \
+ $(SLO)$/viewsrch.obj \
$(SLO)$/viewling.obj \
$(SLO)$/viewmdi.obj \
diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx
index 7e35ca0049df..abae753c1b56 100644
--- a/sw/source/ui/uiview/viewdraw.cxx
+++ b/sw/source/ui/uiview/viewdraw.cxx
@@ -520,7 +520,8 @@ sal_Bool SwView::EnterDrawTextMode(const Point& aDocPos)
/******************************************************************************
* Beschreibung: DrawTextEditMode einschalten
******************************************************************************/
-sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin, sal_Bool bIsNewObj)
+sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin,
+ bool bIsNewObj, bool bSetSelectionToStart)
{
SwWrtShell *pSh = &GetWrtShell();
SdrView *pSdrView = pSh->GetDrawView();
@@ -606,7 +607,11 @@ sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin,
Color aBackground(pSh->GetShapeBackgrd());
pView->SetBackgroundColor(aBackground);
}
+
+ // editing should start at the end of text, spell checking at the beginning ...
ESelection aNewSelection(EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND, EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND);
+ if (bSetSelectionToStart)
+ aNewSelection = ESelection();
pView->SetSelection(aNewSelection);
}
diff --git a/sw/source/ui/uno/makefile.mk b/sw/source/ui/uno/makefile.mk
index 32210b2162d6..0023fd52f55c 100644
--- a/sw/source/ui/uno/makefile.mk
+++ b/sw/source/ui/uno/makefile.mk
@@ -59,8 +59,7 @@ SLO1FILES = \
$(SLO)$/SwXFilterOptions.obj\
$(SLO)$/RefreshListenerContainer.obj \
$(SLO)$/unomodule.obj \
- $(SLO)$/unodoc.obj \
- $(SLO)$/warnpassword.obj
+ $(SLO)$/unodoc.obj
SLO2FILES = \
$(SLO)$/swdetect.obj \
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index a4167da88748..0579d180a04c 100755..100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -114,6 +114,8 @@
#include <drawdoc.hxx>
#include <SwStyleNameMapper.hxx>
#include <osl/file.hxx>
+#include <comphelper/storagehelper.hxx>
+
// --> FME 2004-06-08 #i12836# enhanced pdf export
#include <EnhancedPDFExportHelper.hxx>
@@ -3152,16 +3154,13 @@ uno::Reference< util::XCloneable > SwXTextDocument::createClone( ) throw (uno::
if(!IsValid())
throw RuntimeException();
//create a new document - hidden - copy the storage and return it
- SwDoc* pCopyDoc = pDocShell->GetDoc()->CreateCopy();
- SfxObjectShell* pShell = new SwDocShell( pCopyDoc, SFX_CREATE_MODE_STANDARD );
- pShell->DoInitNew();
-
- uno::Reference< embed::XStorage > xSourceStorage = getDocumentStorage();
+ SfxObjectShell* pShell = pDocShell->GetDoc()->CreateCopy(false);
uno::Reference< frame::XModel > xNewModel = pShell->GetModel();
- //copy this storage
+ uno::Reference< embed::XStorage > xNewStorage = ::comphelper::OStorageHelper::GetTemporaryStorage( );
+ uno::Sequence< beans::PropertyValue > aTempMediaDescriptor;
+ storeToStorage( xNewStorage, aTempMediaDescriptor );
uno::Reference< document::XStorageBasedDocument > xStorageDoc( xNewModel, uno::UNO_QUERY );
- uno::Reference< embed::XStorage > xNewStorage = xStorageDoc->getDocumentStorage();
- xSourceStorage->copyToStorage( xNewStorage );
+ xStorageDoc->loadFromStorage( xNewStorage, aTempMediaDescriptor );
return uno::Reference< util::XCloneable >( xNewModel, UNO_QUERY );
}
/* -----------------------------20.06.00 09:54--------------------------------
diff --git a/sw/source/ui/uno/warnpassword.cxx b/sw/source/ui/uno/warnpassword.cxx
deleted file mode 100644
index cd121226a5f1..000000000000
--- a/sw/source/ui/uno/warnpassword.cxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
-+ ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sw.hxx"
-// ============================================================================
-#include "warnpassword.hxx"
-#include <com/sun/star/task/XInteractionHandler.hpp>
-#include <svl/itemset.hxx>
-#include <sfx2/docfile.hxx>
-#include <sfx2/sfxsids.hrc>
-#include <ucbhelper/simpleinteractionrequest.hxx>
-#include <com/sun/star/ucb/InteractiveAppException.hpp>
-#include <svx/svxerr.hxx>
-
-using ::rtl::OUString;
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::ucb;
-using namespace ::com::sun::star::task;
-
-bool SwWarnPassword::WarningOnPassword( SfxMedium& rMedium )
-{
- bool bReturn = true;
- uno::Reference< task::XInteractionHandler > xHandler( rMedium.GetInteractionHandler());
- if( xHandler.is() )
- {
-
- OUString empty;
- uno::Any xException( makeAny(InteractiveAppException(empty,
- uno::Reference <XInterface> (),
- InteractionClassification_QUERY,
- ERRCODE_SVX_EXPORT_FILTER_CRYPT)));
-
- uno::Reference< ucbhelper::SimpleInteractionRequest > xRequest
- = new ucbhelper::SimpleInteractionRequest(
- xException,
- ucbhelper::CONTINUATION_APPROVE
- | ucbhelper::CONTINUATION_DISAPPROVE );
-
- xHandler->handle( xRequest.get() );
-
- const sal_Int32 nResp = xRequest->getResponse();
-
- switch ( nResp )
- {
- case ucbhelper::CONTINUATION_UNKNOWN:
- break;
-
- case ucbhelper::CONTINUATION_APPROVE:
- // Continue
- break;
-
- case ucbhelper::CONTINUATION_DISAPPROVE:
- bReturn = false;
- break;
- }
- }
- return bReturn;
-}
-
diff --git a/sw/source/ui/utlui/makefile.mk b/sw/source/ui/utlui/makefile.mk
index 7f2aa91c0e11..cded61eee357 100644
--- a/sw/source/ui/utlui/makefile.mk
+++ b/sw/source/ui/utlui/makefile.mk
@@ -51,15 +51,15 @@ SRC1FILES = \
EXCEPTIONSFILES= \
$(SLO)$/bookctrl.obj \
+ $(SLO)$/glbltree.obj \
$(SLO)$/navipi.obj \
$(SLO)$/unotools.obj \
+ $(SLO)$/content.obj \
$(SLO)$/swrenamexnameddlg.obj
SLOFILES = $(EXCEPTIONSFILES) \
$(SLO)$/condedit.obj \
- $(SLO)$/content.obj \
$(SLO)$/gloslst.obj \
- $(SLO)$/glbltree.obj \
$(SLO)$/initui.obj \
$(SLO)$/navicfg.obj \
$(SLO)$/numfmtlb.obj \