summaryrefslogtreecommitdiff
path: root/basctl/source/dlged
diff options
context:
space:
mode:
authorThomas Benisch <tbe@openoffice.org>2001-11-12 21:39:49 +0000
committerThomas Benisch <tbe@openoffice.org>2001-11-12 21:39:49 +0000
commitc29c7a86c8cb18d0e0602cddb3f24373e2424098 (patch)
tree46def78b2cd4a79b59d0b2b0209dd92cf16e2200 /basctl/source/dlged
parentf27135e6f0e410170875eefa1b08f486da7117f4 (diff)
#92173# Reimplement Basic password protection UI in Basic IDE
Diffstat (limited to 'basctl/source/dlged')
-rw-r--r--basctl/source/dlged/dlged.cxx25
-rw-r--r--basctl/source/dlged/dlgedfunc.cxx8
2 files changed, 19 insertions, 14 deletions
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 16e8bd94d6d3..2d04f361d691 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlged.cxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: tbe $ $Date: 2001-10-17 10:14:13 $
+ * last change: $Author: tbe $ $Date: 2001-11-12 22:38:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -538,20 +538,25 @@ IMPL_LINK( DlgEditor, PaintTimeout, Timer *, EMPTYARG )
void DlgEditor::SetMode( DlgEdMode eNewMode )
{
- if( eMode != eNewMode )
+ if ( eMode != eNewMode )
{
- if( pFunc )
+ if ( pFunc )
delete pFunc;
}
eMode = eNewMode;
- if( eMode == DLGED_INSERT )
+ if ( eMode == DLGED_INSERT )
pFunc = new DlgEdFuncInsert( this );
else
pFunc = new DlgEdFuncSelect( this );
- if( eMode == DLGED_TEST )
+ if ( eMode == DLGED_TEST )
ShowDialog();
+
+ if ( eMode == DLGED_READONLY )
+ pSdrModel->SetReadOnly( TRUE );
+ else
+ pSdrModel->SetReadOnly( FALSE );
}
//----------------------------------------------------------------------------
@@ -838,9 +843,9 @@ void DlgEditor::Delete()
//----------------------------------------------------------------------------
-BOOL DlgEditor::IsPasteAllowed() const
+BOOL DlgEditor::IsPasteAllowed()
{
- BOOL bIsPasteAllowed = FALSE;
+ BOOL bPaste = FALSE;
// get clipboard
Reference< datatransfer::clipboard::XClipboard > xClipboard = GetWindow()->GetClipboard();
@@ -854,12 +859,12 @@ BOOL DlgEditor::IsPasteAllowed() const
{
if ( xTransf->isDataFlavorSupported( m_ClipboardDataFlavors[0] ) )
{
- bIsPasteAllowed = TRUE;
+ bPaste = TRUE;
}
}
}
- return bIsPasteAllowed;
+ return bPaste;
}
//----------------------------------------------------------------------------
diff --git a/basctl/source/dlged/dlgedfunc.cxx b/basctl/source/dlged/dlgedfunc.cxx
index f450cb92c2ff..37ab1ffe918c 100644
--- a/basctl/source/dlged/dlgedfunc.cxx
+++ b/basctl/source/dlged/dlgedfunc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlgedfunc.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: tbe $ $Date: 2001-10-17 10:14:13 $
+ * last change: $Author: tbe $ $Date: 2001-11-12 22:38:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -248,7 +248,7 @@ BOOL DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
else if ( rMEvt.IsLeft() && rMEvt.GetClicks() == 2 )
{
// if object was hit, show property browser
- if ( pView->IsMarkedHit(aPos, nHitLog) )
+ if ( pView->IsMarkedHit(aPos, nHitLog) && pParent->GetMode() != DLGED_READONLY )
pParent->ShowProperties();
}
@@ -405,7 +405,7 @@ BOOL DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt )
else if ( rMEvt.IsLeft() && rMEvt.GetClicks() == 2 )
{
// if object was hit, show property browser
- if ( pView->IsMarkedHit(aMDPos, nHitLog) )
+ if ( pView->IsMarkedHit(aMDPos, nHitLog) && pParent->GetMode() != DLGED_READONLY )
pParent->ShowProperties();
}