summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/moduldl2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basctl/source/basicide/moduldl2.cxx')
-rw-r--r--basctl/source/basicide/moduldl2.cxx96
1 files changed, 2 insertions, 94 deletions
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 475d182ec29f..ae356ed80632 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -74,7 +74,6 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::ucb;
using namespace ::com::sun::star::ui::dialogs;
-
typedef ::cppu::WeakImplHelper1< task::XInteractionHandler > HandlerImpl_BASE;
namespace
@@ -97,9 +96,7 @@ public:
}
};
-//----------------------------------------------------------------------------
-// LibUserData
-//----------------------------------------------------------------------------
+// LibUserData
class LibUserData
{
private:
@@ -112,10 +109,7 @@ public:
const ScriptDocument& GetDocument() const { return m_aDocument; }
};
-//----------------------------------------------------------------------------
// LibLBoxString
-//----------------------------------------------------------------------------
-
class LibLBoxString : public SvLBoxString
{
public:
@@ -125,8 +119,6 @@ public:
virtual void Paint(const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry);
};
-//----------------------------------------------------------------------------
-
void LibLBoxString::Paint(const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* /*pView*/, const SvTreeListEntry* pEntry)
{
// Change text color if library is read only:
@@ -156,11 +148,7 @@ void LibLBoxString::Paint(const Point& rPos, SvTreeListBox& rDev, const SvViewDa
} // namespace
-
-//----------------------------------------------------------------------------
// basctl::CheckBox
-//----------------------------------------------------------------------------
-
CheckBox::CheckBox(Window* pParent, WinBits nStyle)
: SvTabListBox(pParent, nStyle)
, eMode(ObjectMode::Module)
@@ -181,8 +169,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeCheckBox(Window *pParent, V
return new CheckBox(pParent, nWinBits);
}
-//----------------------------------------------------------------------------
-
CheckBox::~CheckBox()
{
delete pCheckButton;
@@ -196,8 +182,6 @@ CheckBox::~CheckBox()
}
}
-//----------------------------------------------------------------------------
-
void CheckBox::Init()
{
pCheckButton = new SvLBoxButtonData(this);
@@ -210,8 +194,6 @@ void CheckBox::Init()
SetHighlightRange();
}
-//----------------------------------------------------------------------------
-
void CheckBox::SetMode (ObjectMode::Mode e)
{
eMode = e;
@@ -222,15 +204,11 @@ void CheckBox::SetMode (ObjectMode::Mode e)
EnableCheckButton( 0 );
}
-//----------------------------------------------------------------------------
-
SvTreeListEntry* CheckBox::DoInsertEntry( const OUString& rStr, sal_uLong nPos )
{
return SvTabListBox::InsertEntryToColumn( rStr, nPos, 0 );
}
-//----------------------------------------------------------------------------
-
SvTreeListEntry* CheckBox::FindEntry( const OUString& rName )
{
sal_uLong nCount = GetEntryCount();
@@ -244,8 +222,6 @@ SvTreeListEntry* CheckBox::FindEntry( const OUString& rName )
return 0;
}
-//----------------------------------------------------------------------------
-
void CheckBox::CheckEntryPos( sal_uLong nPos )
{
if ( nPos < GetEntryCount() )
@@ -257,8 +233,6 @@ void CheckBox::CheckEntryPos( sal_uLong nPos )
}
}
-//----------------------------------------------------------------------------
-
bool CheckBox::IsChecked( sal_uLong nPos ) const
{
if ( nPos < GetEntryCount() )
@@ -266,8 +240,6 @@ bool CheckBox::IsChecked( sal_uLong nPos ) const
return false;
}
-//----------------------------------------------------------------------------
-
void CheckBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rTxt,
const Image& rImg1, const Image& rImg2, SvLBoxButtonKind eButtonKind )
{
@@ -286,8 +258,6 @@ void CheckBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rTxt,
}
}
-//----------------------------------------------------------------------------
-
sal_Bool CheckBox::EditingEntry( SvTreeListEntry* pEntry, Selection& )
{
if (eMode != ObjectMode::Module)
@@ -334,8 +304,6 @@ sal_Bool CheckBox::EditingEntry( SvTreeListEntry* pEntry, Selection& )
return true;
}
-//----------------------------------------------------------------------------
-
sal_Bool CheckBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewName )
{
bool bValid = rNewName.getLength() <= 30 && IsValidSbxName(rNewName);
@@ -382,10 +350,7 @@ sal_Bool CheckBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewNam
return bValid;
}
-//----------------------------------------------------------------------------
// NewObjectDialog
-//----------------------------------------------------------------------------
-
IMPL_LINK_NOARG(NewObjectDialog, OkButtonHandler)
{
if (IsValidSbxName(m_pEdit->GetText()))
@@ -429,10 +394,7 @@ NewObjectDialog::NewObjectDialog(Window * pParent, ObjectMode::Mode eMode,
m_pOKButton->SetClickHdl(LINK(this, NewObjectDialog, OkButtonHandler));
}
-//----------------------------------------------------------------------------
// GotoLineDialog
-//----------------------------------------------------------------------------
-
GotoLineDialog::GotoLineDialog(Window * pParent )
: ModalDialog(pParent, "GotoLineDialog",
"modules/BasicIDE/ui/gotolinedialog.ui")
@@ -457,11 +419,7 @@ IMPL_LINK_NOARG(GotoLineDialog, OkButtonHandler)
return 0;
}
-
-//----------------------------------------------------------------------------
// ExportDialog
-//----------------------------------------------------------------------------
-
IMPL_LINK_NOARG(ExportDialog, OkButtonHandler)
{
mbExportAsPackage = m_pExportAsPackageButton->IsChecked();
@@ -481,10 +439,7 @@ ExportDialog::ExportDialog(Window * pParent)
m_pOKButton->SetClickHdl(LINK(this, ExportDialog, OkButtonHandler));
}
-//----------------------------------------------------------------------------
-// LibPage
-//----------------------------------------------------------------------------
-
+// LibPage
LibPage::LibPage(Window * pParent)
: TabPage(pParent, "LibPage",
"modules/BasicIDE/ui/libpage.ui")
@@ -529,8 +484,6 @@ LibPage::LibPage(Window * pParent)
CheckButtons();
}
-//----------------------------------------------------------------------------
-
LibPage::~LibPage()
{
sal_uInt16 nCount = m_pBasicsBox->GetEntryCount();
@@ -541,8 +494,6 @@ LibPage::~LibPage()
}
}
-//----------------------------------------------------------------------------
-
void LibPage::CheckButtons()
{
SvTreeListEntry* pCur = m_pLibBox->GetCurEntry();
@@ -594,23 +545,15 @@ void LibPage::CheckButtons()
}
}
-//----------------------------------------------------------------------------
-
void LibPage::ActivatePage()
{
SetCurLib();
}
-//----------------------------------------------------------------------------
-
-
void LibPage::DeactivatePage()
{
}
-//----------------------------------------------------------------------------
-
-
IMPL_LINK_INLINE_START( LibPage, TreeListHighlightHdl, SvTreeListBox *, pBox )
{
if ( pBox->IsSelected( pBox->GetHdlEntry() ) )
@@ -619,8 +562,6 @@ IMPL_LINK_INLINE_START( LibPage, TreeListHighlightHdl, SvTreeListBox *, pBox )
}
IMPL_LINK_INLINE_END( LibPage, TreeListHighlightHdl, SvTreeListBox *, pBox )
-//----------------------------------------------------------------------------
-
IMPL_LINK_INLINE_START( LibPage, BasicSelectHdl, ListBox *, pBox )
{
(void)pBox;
@@ -630,8 +571,6 @@ IMPL_LINK_INLINE_START( LibPage, BasicSelectHdl, ListBox *, pBox )
}
IMPL_LINK_INLINE_END( LibPage, BasicSelectHdl, ListBox *, pBox )
-//----------------------------------------------------------------------------
-
IMPL_LINK( LibPage, ButtonHdl, Button *, pButton )
{
if (pButton == m_pEditButton)
@@ -722,8 +661,6 @@ IMPL_LINK( LibPage, ButtonHdl, Button *, pButton )
return 0;
}
-//----------------------------------------------------------------------------
-
IMPL_LINK_INLINE_START( LibPage, CheckPasswordHdl, SvxPasswordDialog *, pDlg )
{
long nRet = 0;
@@ -750,15 +687,11 @@ IMPL_LINK_INLINE_START( LibPage, CheckPasswordHdl, SvxPasswordDialog *, pDlg )
}
IMPL_LINK_INLINE_END( LibPage, CheckPasswordHdl, SvxPasswordDialog *, pDlg )
-//----------------------------------------------------------------------------
-
void LibPage::NewLib()
{
createLibImpl( static_cast<Window*>( this ), m_aCurDocument, m_pLibBox, NULL);
}
-//----------------------------------------------------------------------------
-
void LibPage::InsertLib()
{
Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
@@ -1119,8 +1052,6 @@ void LibPage::InsertLib()
}
}
-//----------------------------------------------------------------------------
-
void LibPage::Export( void )
{
SvTreeListEntry* pCurEntry = m_pLibBox->GetCurEntry();
@@ -1146,7 +1077,6 @@ void LibPage::Export( void )
return;
}
-
ExportDialog aNewDlg(this);
if (aNewDlg.Execute() == RET_OK)
{
@@ -1178,10 +1108,7 @@ void LibPage::implExportLib( const OUString& aLibName, const OUString& aTargetUR
xDlgLibContainerExport->exportLibrary( aOULibName, aTargetURL, Handler );
}
-
-//===========================================================================
// Implementation XCommandEnvironment
-
typedef cppu::WeakImplHelper1< XCommandEnvironment > LibCommandEnvironmentHelper;
class OLibCommandEnvironment : public LibCommandEnvironmentHelper
@@ -1213,8 +1140,6 @@ Reference< XProgressHandler > OLibCommandEnvironment::getProgressHandler()
return xRet;
}
-
-
void LibPage::ExportAsPackage( const OUString& aLibName )
{
// file open dialog
@@ -1364,8 +1289,6 @@ void LibPage::ExportAsBasic( const OUString& aLibName )
}
}
-//----------------------------------------------------------------------------
-
void LibPage::DeleteCurrent()
{
SvTreeListEntry* pCurEntry = m_pLibBox->GetCurEntry();
@@ -1402,8 +1325,6 @@ void LibPage::DeleteCurrent()
}
}
-//----------------------------------------------------------------------------
-
void LibPage::EndTabDialog( sal_uInt16 nRet )
{
DBG_ASSERT( pTabDlg, "TabDlg nicht gesetzt!" );
@@ -1411,8 +1332,6 @@ void LibPage::EndTabDialog( sal_uInt16 nRet )
pTabDlg->EndDialog( nRet );
}
-//----------------------------------------------------------------------------
-
void LibPage::FillListBox()
{
InsertListBoxEntry( ScriptDocument::getApplicationScriptDocument(), LIBRARY_LOCATION_USER );
@@ -1428,8 +1347,6 @@ void LibPage::FillListBox()
}
}
-//----------------------------------------------------------------------------
-
void LibPage::InsertListBoxEntry( const ScriptDocument& rDocument, LibraryLocation eLocation )
{
OUString aEntryText( rDocument.getTitle( eLocation ) );
@@ -1437,8 +1354,6 @@ void LibPage::InsertListBoxEntry( const ScriptDocument& rDocument, LibraryLocati
m_pBasicsBox->SetEntryData( nPos, new DocumentEntry(rDocument, eLocation) );
}
-//----------------------------------------------------------------------------
-
void LibPage::SetCurLib()
{
sal_uInt16 nSelPos = m_pBasicsBox->GetSelectEntryPos();
@@ -1477,8 +1392,6 @@ void LibPage::SetCurLib()
}
}
-//----------------------------------------------------------------------------
-
SvTreeListEntry* LibPage::ImpInsertLibEntry( const OUString& rLibName, sal_uLong nPos )
{
// check, if library is password protected
@@ -1514,8 +1427,6 @@ SvTreeListEntry* LibPage::ImpInsertLibEntry( const OUString& rLibName, sal_uLong
return pNewEntry;
}
-//----------------------------------------------------------------------------
-
// Helper function
void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
CheckBox* pLibBox, TreeListBox* pBasicBox )
@@ -1624,9 +1535,6 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
}
}
}
-
-//----------------------------------------------------------------------------
-
} // namespace basctl
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */