convert link database dialog .ui
Change-Id: Ide66c2f088616b1677d03bad9095fa5829c4ffb7
This commit is contained in:
@@ -37,6 +37,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
|
|||||||
cui/uiconfig/ui/connectortabpage \
|
cui/uiconfig/ui/connectortabpage \
|
||||||
cui/uiconfig/ui/croppage \
|
cui/uiconfig/ui/croppage \
|
||||||
cui/uiconfig/ui/cuiimapdlg \
|
cui/uiconfig/ui/cuiimapdlg \
|
||||||
|
cui/uiconfig/ui/databaselinkdialog \
|
||||||
cui/uiconfig/ui/dimensionlinestabpage \
|
cui/uiconfig/ui/dimensionlinestabpage \
|
||||||
cui/uiconfig/ui/editdictionarydialog \
|
cui/uiconfig/ui/editdictionarydialog \
|
||||||
cui/uiconfig/ui/editmodulesdialog \
|
cui/uiconfig/ui/editmodulesdialog \
|
||||||
|
@@ -103,7 +103,6 @@
|
|||||||
#define RID_OFAPAGE_CONNPOOLOPTIONS (RID_OFA_START + 122)
|
#define RID_OFAPAGE_CONNPOOLOPTIONS (RID_OFA_START + 122)
|
||||||
#define QUERY_DELETE_CONFIRM (RID_SVX_START + 1110)
|
#define QUERY_DELETE_CONFIRM (RID_SVX_START + 1110)
|
||||||
#define RID_SVXPAGE_JSEARCH_OPTIONS (RID_SVX_START + 840)
|
#define RID_SVXPAGE_JSEARCH_OPTIONS (RID_SVX_START + 840)
|
||||||
#define DLG_DOCUMENTLINK (RID_OFA_START + 124)
|
|
||||||
#define STR_LINKEDDOC_DOESNOTEXIST (RID_SVX_START + 1111)
|
#define STR_LINKEDDOC_DOESNOTEXIST (RID_SVX_START + 1111)
|
||||||
#define STR_LINKEDDOC_NO_SYSTEM_FILE (RID_SVX_START + 1169)
|
#define STR_LINKEDDOC_NO_SYSTEM_FILE (RID_SVX_START + 1169)
|
||||||
#define STR_NAME_CONFLICT (RID_SVX_START + 1112)
|
#define STR_NAME_CONFLICT (RID_SVX_START + 1112)
|
||||||
|
@@ -415,13 +415,13 @@ void DbRegistrationOptionsPage::openLinkDialog(const OUString& _sOldName,const O
|
|||||||
{
|
{
|
||||||
ODocumentLinkDialog aDlg(this,_pEntry == NULL);
|
ODocumentLinkDialog aDlg(this,_pEntry == NULL);
|
||||||
|
|
||||||
aDlg.set(_sOldName,_sOldLocation);
|
aDlg.setLink(_sOldName,_sOldLocation);
|
||||||
aDlg.setNameValidator(LINK( this, DbRegistrationOptionsPage, NameValidator ) );
|
aDlg.setNameValidator(LINK( this, DbRegistrationOptionsPage, NameValidator ) );
|
||||||
|
|
||||||
if ( aDlg.Execute() == RET_OK )
|
if ( aDlg.Execute() == RET_OK )
|
||||||
{
|
{
|
||||||
OUString sNewName,sNewLocation;
|
OUString sNewName,sNewLocation;
|
||||||
aDlg.get(sNewName,sNewLocation);
|
aDlg.getLink(sNewName,sNewLocation);
|
||||||
if ( _pEntry == NULL || sNewName != _sOldName || sNewLocation != _sOldLocation )
|
if ( _pEntry == NULL || sNewName != _sOldName || sNewLocation != _sOldLocation )
|
||||||
{
|
{
|
||||||
if ( _pEntry )
|
if ( _pEntry )
|
||||||
|
@@ -18,7 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "doclinkdialog.hxx"
|
#include "doclinkdialog.hxx"
|
||||||
#include "doclinkdialog.hrc"
|
|
||||||
|
|
||||||
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
|
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
|
||||||
#include <comphelper/processfactory.hxx>
|
#include <comphelper/processfactory.hxx>
|
||||||
@@ -45,65 +44,59 @@ namespace svx
|
|||||||
//==================================================================
|
//==================================================================
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
ODocumentLinkDialog::ODocumentLinkDialog( Window* _pParent, sal_Bool _bCreateNew )
|
ODocumentLinkDialog::ODocumentLinkDialog( Window* _pParent, sal_Bool _bCreateNew )
|
||||||
:ModalDialog( _pParent, CUI_RES(DLG_DOCUMENTLINK) )
|
: ModalDialog(_pParent, "DatabaseLinkDialog",
|
||||||
,m_aURLLabel (this, CUI_RES(FT_URL))
|
"cui/ui/databaselinkdialog.ui")
|
||||||
,m_aURL (this, CUI_RES(CMB_URL))
|
|
||||||
,m_aBrowseFile (this, CUI_RES(PB_BROWSEFILE))
|
|
||||||
,m_aNameLabel (this, CUI_RES(FT_NAME))
|
|
||||||
,m_aName (this, CUI_RES(ET_NAME))
|
|
||||||
,m_aBottomLine (this, CUI_RES(FL_BOTTOM))
|
|
||||||
,m_aOK (this, CUI_RES(BTN_OK))
|
|
||||||
,m_aCancel (this, CUI_RES(BTN_CANCEL))
|
|
||||||
,m_aHelp (this, CUI_RES(BTN_HELP))
|
|
||||||
,m_bCreatingNew(_bCreateNew)
|
,m_bCreatingNew(_bCreateNew)
|
||||||
{
|
{
|
||||||
OUString sText = CUI_RES( m_bCreatingNew ? STR_NEW_LINK : STR_EDIT_LINK );
|
get(m_pURL, "url");
|
||||||
SetText(sText);
|
get(m_pOK, "ok");
|
||||||
|
get(m_pName, "name");
|
||||||
|
get(m_pBrowseFile, "browse");
|
||||||
|
|
||||||
FreeResource();
|
if (!m_bCreatingNew)
|
||||||
|
SetText(get<FixedText>("alttitle")->GetText());
|
||||||
|
|
||||||
OUString sTemp("*.odb");
|
m_pURL->SetFilter("*.odb");
|
||||||
m_aURL.SetFilter(sTemp);
|
|
||||||
|
|
||||||
m_aName.SetModifyHdl( LINK(this, ODocumentLinkDialog, OnTextModified) );
|
m_pName->SetModifyHdl( LINK(this, ODocumentLinkDialog, OnTextModified) );
|
||||||
m_aURL.SetModifyHdl( LINK(this, ODocumentLinkDialog, OnTextModified) );
|
m_pURL->SetModifyHdl( LINK(this, ODocumentLinkDialog, OnTextModified) );
|
||||||
m_aBrowseFile.SetClickHdl( LINK(this, ODocumentLinkDialog, OnBrowseFile) );
|
m_pBrowseFile->SetClickHdl( LINK(this, ODocumentLinkDialog, OnBrowseFile) );
|
||||||
m_aOK.SetClickHdl( LINK(this, ODocumentLinkDialog, OnOk) );
|
m_pOK->SetClickHdl( LINK(this, ODocumentLinkDialog, OnOk) );
|
||||||
|
|
||||||
m_aURL.SetDropDownLineCount(10);
|
m_pURL->SetDropDownLineCount(10);
|
||||||
|
|
||||||
validate();
|
validate();
|
||||||
|
|
||||||
m_aURL.SetDropDownLineCount( 5 );
|
m_pURL->SetDropDownLineCount( 5 );
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
void ODocumentLinkDialog::set( const OUString& _rName, const OUString& _rURL )
|
void ODocumentLinkDialog::setLink( const OUString& _rName, const OUString& _rURL )
|
||||||
{
|
{
|
||||||
m_aName.SetText(_rName);
|
m_pName->SetText(_rName);
|
||||||
m_aURL.SetText(_rURL);
|
m_pURL->SetText(_rURL);
|
||||||
validate();
|
validate();
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
void ODocumentLinkDialog::get( OUString& _rName, OUString& _rURL ) const
|
void ODocumentLinkDialog::getLink( OUString& _rName, OUString& _rURL ) const
|
||||||
{
|
{
|
||||||
_rName = m_aName.GetText();
|
_rName = m_pName->GetText();
|
||||||
_rURL = m_aURL.GetText();
|
_rURL = m_pURL->GetText();
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
void ODocumentLinkDialog::validate( )
|
void ODocumentLinkDialog::validate( )
|
||||||
{
|
{
|
||||||
|
|
||||||
m_aOK.Enable( ( !m_aName.GetText().isEmpty()) && ( !m_aURL.GetText().isEmpty() ) );
|
m_pOK->Enable( ( !m_pName->GetText().isEmpty()) && ( !m_pURL->GetText().isEmpty() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
IMPL_LINK_NOARG(ODocumentLinkDialog, OnOk)
|
IMPL_LINK_NOARG(ODocumentLinkDialog, OnOk)
|
||||||
{
|
{
|
||||||
// get the current URL
|
// get the current URL
|
||||||
OUString sURL = m_aURL.GetText();
|
OUString sURL = m_pURL->GetText();
|
||||||
OFileNotation aTransformer(sURL);
|
OFileNotation aTransformer(sURL);
|
||||||
sURL = aTransformer.get(OFileNotation::N_URL);
|
sURL = aTransformer.get(OFileNotation::N_URL);
|
||||||
|
|
||||||
@@ -122,7 +115,7 @@ namespace svx
|
|||||||
if (!bFileExists)
|
if (!bFileExists)
|
||||||
{
|
{
|
||||||
OUString sMsg = CUI_RES(STR_LINKEDDOC_DOESNOTEXIST);
|
OUString sMsg = CUI_RES(STR_LINKEDDOC_DOESNOTEXIST);
|
||||||
sMsg = sMsg.replaceFirst("$file$", m_aURL.GetText());
|
sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText());
|
||||||
ErrorBox aError(this, WB_OK , sMsg);
|
ErrorBox aError(this, WB_OK , sMsg);
|
||||||
aError.Execute();
|
aError.Execute();
|
||||||
return 0L;
|
return 0L;
|
||||||
@@ -131,13 +124,13 @@ namespace svx
|
|||||||
if ( aURL.GetProtocol() != INET_PROT_FILE )
|
if ( aURL.GetProtocol() != INET_PROT_FILE )
|
||||||
{
|
{
|
||||||
OUString sMsg = CUI_RES(STR_LINKEDDOC_NO_SYSTEM_FILE);
|
OUString sMsg = CUI_RES(STR_LINKEDDOC_NO_SYSTEM_FILE);
|
||||||
sMsg = sMsg.replaceFirst("$file$", m_aURL.GetText());
|
sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText());
|
||||||
ErrorBox aError(this, WB_OK , sMsg);
|
ErrorBox aError(this, WB_OK , sMsg);
|
||||||
aError.Execute();
|
aError.Execute();
|
||||||
return 0L;
|
return 0L;
|
||||||
}
|
}
|
||||||
|
|
||||||
OUString sCurrentText = m_aName.GetText();
|
OUString sCurrentText = m_pName->GetText();
|
||||||
if ( m_aNameValidator.IsSet() )
|
if ( m_aNameValidator.IsSet() )
|
||||||
{
|
{
|
||||||
if ( !m_aNameValidator.Call( &sCurrentText ) )
|
if ( !m_aNameValidator.Call( &sCurrentText ) )
|
||||||
@@ -147,8 +140,8 @@ namespace svx
|
|||||||
InfoBox aError(this, sMsg);
|
InfoBox aError(this, sMsg);
|
||||||
aError.Execute();
|
aError.Execute();
|
||||||
|
|
||||||
m_aName.SetSelection(Selection(0,sCurrentText.getLength()));
|
m_pName->SetSelection(Selection(0,sCurrentText.getLength()));
|
||||||
m_aName.GrabFocus();
|
m_pName->GrabFocus();
|
||||||
return 0L;
|
return 0L;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -169,7 +162,7 @@ namespace svx
|
|||||||
aFileDlg.SetCurrentFilter(pFilter->GetUIName());
|
aFileDlg.SetCurrentFilter(pFilter->GetUIName());
|
||||||
}
|
}
|
||||||
|
|
||||||
OUString sPath = m_aURL.GetText();
|
OUString sPath = m_pURL->GetText();
|
||||||
if (!sPath.isEmpty())
|
if (!sPath.isEmpty())
|
||||||
{
|
{
|
||||||
OFileNotation aTransformer( sPath, OFileNotation::N_SYSTEM );
|
OFileNotation aTransformer( sPath, OFileNotation::N_SYSTEM );
|
||||||
@@ -179,24 +172,24 @@ namespace svx
|
|||||||
if (0 != aFileDlg.Execute())
|
if (0 != aFileDlg.Execute())
|
||||||
return 0L;
|
return 0L;
|
||||||
|
|
||||||
if (m_aName.GetText().isEmpty())
|
if (m_pName->GetText().isEmpty())
|
||||||
{ // default the name to the base of the chosen URL
|
{ // default the name to the base of the chosen URL
|
||||||
INetURLObject aParser;
|
INetURLObject aParser;
|
||||||
|
|
||||||
aParser.SetSmartProtocol(INET_PROT_FILE);
|
aParser.SetSmartProtocol(INET_PROT_FILE);
|
||||||
aParser.SetSmartURL(aFileDlg.GetPath());
|
aParser.SetSmartURL(aFileDlg.GetPath());
|
||||||
|
|
||||||
m_aName.SetText(aParser.getBase(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET));
|
m_pName->SetText(aParser.getBase(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET));
|
||||||
|
|
||||||
m_aName.SetSelection(Selection(0,m_aName.GetText().getLength()));
|
m_pName->SetSelection(Selection(0,m_pName->GetText().getLength()));
|
||||||
m_aName.GrabFocus();
|
m_pName->GrabFocus();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_aURL.GrabFocus();
|
m_pURL->GrabFocus();
|
||||||
|
|
||||||
// get the path in system notation
|
// get the path in system notation
|
||||||
OFileNotation aTransformer(aFileDlg.GetPath(), OFileNotation::N_URL);
|
OFileNotation aTransformer(aFileDlg.GetPath(), OFileNotation::N_URL);
|
||||||
m_aURL.SetText(aTransformer.get(OFileNotation::N_SYSTEM));
|
m_pURL->SetText(aTransformer.get(OFileNotation::N_SYSTEM));
|
||||||
|
|
||||||
validate();
|
validate();
|
||||||
return 0L;
|
return 0L;
|
||||||
|
@@ -1,43 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
||||||
/*
|
|
||||||
* This file is part of the LibreOffice project.
|
|
||||||
*
|
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
*
|
|
||||||
* This file incorporates work covered by the following license notice:
|
|
||||||
*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
||||||
* contributor license agreements. See the NOTICE file distributed
|
|
||||||
* with this work for additional information regarding copyright
|
|
||||||
* ownership. The ASF licenses this file to you under the Apache
|
|
||||||
* License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 .
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _SVX_DOCLINKDIALOG_HRC_
|
|
||||||
#define _SVX_DOCLINKDIALOG_HRC_
|
|
||||||
|
|
||||||
#define FT_NAME 1
|
|
||||||
#define FT_URL 2
|
|
||||||
|
|
||||||
#define ET_NAME 1
|
|
||||||
|
|
||||||
#define CMB_URL 1
|
|
||||||
|
|
||||||
#define PB_BROWSEFILE 1
|
|
||||||
|
|
||||||
#define BTN_OK 1
|
|
||||||
#define BTN_CANCEL 1
|
|
||||||
#define BTN_HELP 1
|
|
||||||
|
|
||||||
#define FL_BOTTOM 1
|
|
||||||
|
|
||||||
#define STR_EDIT_LINK 1
|
|
||||||
#define STR_NEW_LINK 2
|
|
||||||
|
|
||||||
#endif // _SVX_DOCLINKDIALOG_HRC_
|
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
@@ -40,16 +40,10 @@ namespace svx
|
|||||||
class ODocumentLinkDialog : public ModalDialog
|
class ODocumentLinkDialog : public ModalDialog
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
FixedText m_aURLLabel;
|
::svt::OFileURLControl* m_pURL;
|
||||||
::svt::OFileURLControl m_aURL;
|
PushButton* m_pBrowseFile;
|
||||||
PushButton m_aBrowseFile;
|
Edit* m_pName;
|
||||||
FixedText m_aNameLabel;
|
OKButton* m_pOK;
|
||||||
Edit m_aName;
|
|
||||||
|
|
||||||
FixedLine m_aBottomLine;
|
|
||||||
OKButton m_aOK;
|
|
||||||
CancelButton m_aCancel;
|
|
||||||
HelpButton m_aHelp;
|
|
||||||
|
|
||||||
sal_Bool m_bCreatingNew;
|
sal_Bool m_bCreatingNew;
|
||||||
|
|
||||||
@@ -64,8 +58,8 @@ namespace svx
|
|||||||
void setNameValidator( const Link& _rValidator ) { m_aNameValidator = _rValidator; }
|
void setNameValidator( const Link& _rValidator ) { m_aNameValidator = _rValidator; }
|
||||||
Link getNameValidator( ) const { return m_aNameValidator; }
|
Link getNameValidator( ) const { return m_aNameValidator; }
|
||||||
|
|
||||||
void set( const OUString& _rName, const OUString& _rURL );
|
void setLink( const OUString& _rName, const OUString& _rURL );
|
||||||
void get( OUString& _rName, OUString& _rURL ) const;
|
void getLink( OUString& _rName, OUString& _rURL ) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
DECL_LINK(OnTextModified, void *);
|
DECL_LINK(OnTextModified, void *);
|
||||||
|
@@ -18,109 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cuires.hrc>
|
#include <cuires.hrc>
|
||||||
#include "doclinkdialog.hrc"
|
|
||||||
|
|
||||||
#define DIALOG_SIZE_X 200
|
|
||||||
#define DIALOG_SIZE_Y 94
|
|
||||||
#define BUTTON_SIZE_X 50
|
|
||||||
#define BUTTON_SIZE_Y 14
|
|
||||||
|
|
||||||
#define LABEL_WIDTH 50
|
|
||||||
|
|
||||||
#define HEIGHT_LABEL 8
|
|
||||||
#define HEIGHT_EDIT 12
|
|
||||||
|
|
||||||
#define LINE_1_Y 6
|
|
||||||
#define OFFSET_Y 6
|
|
||||||
|
|
||||||
ModalDialog DLG_DOCUMENTLINK
|
|
||||||
{
|
|
||||||
HelpID = "cui:ModalDialog:DLG_DOCUMENTLINK";
|
|
||||||
OutputSize = TRUE ;
|
|
||||||
SVLook = TRUE ;
|
|
||||||
Size = MAP_APPFONT ( DIALOG_SIZE_X , DIALOG_SIZE_Y ) ;
|
|
||||||
|
|
||||||
Moveable = TRUE ;
|
|
||||||
Closeable = TRUE ;
|
|
||||||
|
|
||||||
FixedText FT_URL
|
|
||||||
{
|
|
||||||
|
|
||||||
Pos = MAP_APPFONT ( 6, LINE_1_Y ) ;
|
|
||||||
Size = MAP_APPFONT ( DIALOG_SIZE_X - 6, HEIGHT_LABEL ) ;
|
|
||||||
Group = TRUE;
|
|
||||||
|
|
||||||
Text [ en-US ] = "~Database file";
|
|
||||||
};
|
|
||||||
ComboBox CMB_URL
|
|
||||||
{
|
|
||||||
HelpID = "cui:ComboBox:DLG_DOCUMENTLINK:CMB_URL";
|
|
||||||
Pos = MAP_APPFONT ( 6 , LINE_1_Y + OFFSET_Y + HEIGHT_LABEL - 3) ;
|
|
||||||
Size = MAP_APPFONT ( DIALOG_SIZE_X - 3*LINE_1_Y - BUTTON_SIZE_X , HEIGHT_EDIT ) ;
|
|
||||||
|
|
||||||
SVLook = TRUE ;
|
|
||||||
Border = TRUE ;
|
|
||||||
DropDown = TRUE ;
|
|
||||||
AutoHScroll = TRUE ;
|
|
||||||
TabStop = TRUE ;
|
|
||||||
};
|
|
||||||
PushButton PB_BROWSEFILE
|
|
||||||
{
|
|
||||||
HelpID = "cui:PushButton:DLG_DOCUMENTLINK:PB_BROWSEFILE";
|
|
||||||
Pos = MAP_APPFONT ( DIALOG_SIZE_X - BUTTON_SIZE_X - 6 , LINE_1_Y + OFFSET_Y + HEIGHT_LABEL - 4) ;
|
|
||||||
Size = MAP_APPFONT ( BUTTON_SIZE_X, BUTTON_SIZE_Y );
|
|
||||||
Text [ en-US ] = "~Browse...";
|
|
||||||
};
|
|
||||||
|
|
||||||
FixedText FT_NAME
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( 6, LINE_1_Y + 2*OFFSET_Y + HEIGHT_LABEL + BUTTON_SIZE_Y - 3) ;
|
|
||||||
Size = MAP_APPFONT ( DIALOG_SIZE_X - 6, HEIGHT_LABEL ) ;
|
|
||||||
Group = TRUE;
|
|
||||||
|
|
||||||
Text [ en-US ] = "Registered ~name";
|
|
||||||
};
|
|
||||||
Edit ET_NAME
|
|
||||||
{
|
|
||||||
HelpID = "cui:Edit:DLG_DOCUMENTLINK:ET_NAME";
|
|
||||||
Pos = MAP_APPFONT ( 6, LINE_1_Y + 3*OFFSET_Y + 2*HEIGHT_LABEL + BUTTON_SIZE_Y - 6) ;
|
|
||||||
Size = MAP_APPFONT ( DIALOG_SIZE_X - 3*LINE_1_Y - BUTTON_SIZE_X , HEIGHT_EDIT ) ;
|
|
||||||
TabStop = TRUE ;
|
|
||||||
Border = TRUE ;
|
|
||||||
};
|
|
||||||
|
|
||||||
FixedLine FL_BOTTOM
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( 4, LINE_1_Y + 4*OFFSET_Y + 2*HEIGHT_LABEL + BUTTON_SIZE_Y + HEIGHT_EDIT - 6);
|
|
||||||
Size = MAP_APPFONT ( DIALOG_SIZE_X - 8, 8 );
|
|
||||||
};
|
|
||||||
|
|
||||||
OKButton BTN_OK
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( DIALOG_SIZE_X - 3 * ( BUTTON_SIZE_X + 3 ) - 6, DIALOG_SIZE_Y - 6 - BUTTON_SIZE_Y );
|
|
||||||
Size = MAP_APPFONT ( BUTTON_SIZE_X, BUTTON_SIZE_Y );
|
|
||||||
DefButton = TRUE;
|
|
||||||
};
|
|
||||||
CancelButton BTN_CANCEL
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( DIALOG_SIZE_X - 2 * ( BUTTON_SIZE_X + 3 ) - 6, DIALOG_SIZE_Y - 6 - BUTTON_SIZE_Y );
|
|
||||||
Size = MAP_APPFONT ( BUTTON_SIZE_X, BUTTON_SIZE_Y );
|
|
||||||
};
|
|
||||||
HelpButton BTN_HELP
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( DIALOG_SIZE_X - 1 * ( BUTTON_SIZE_X + 3 ) - 3, DIALOG_SIZE_Y - 6 - BUTTON_SIZE_Y );
|
|
||||||
Size = MAP_APPFONT ( BUTTON_SIZE_X, BUTTON_SIZE_Y );
|
|
||||||
};
|
|
||||||
|
|
||||||
String STR_EDIT_LINK
|
|
||||||
{
|
|
||||||
Text [ en-US ] = "Edit Database Link";
|
|
||||||
};
|
|
||||||
String STR_NEW_LINK
|
|
||||||
{
|
|
||||||
Text [ en-US ] = "Create Database Link";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
String STR_LINKEDDOC_DOESNOTEXIST
|
String STR_LINKEDDOC_DOESNOTEXIST
|
||||||
{
|
{
|
||||||
|
215
cui/uiconfig/ui/databaselinkdialog.ui
Normal file
215
cui/uiconfig/ui/databaselinkdialog.ui
Normal file
@@ -0,0 +1,215 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.16.1 -->
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.0"/>
|
||||||
|
<!-- interface-requires LibreOffice 1.0 -->
|
||||||
|
<object class="GtkDialog" id="DatabaseLinkDialog">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="border_width">6</property>
|
||||||
|
<property name="title" translatable="yes">Create Database Link</property>
|
||||||
|
<property name="type_hint">dialog</property>
|
||||||
|
<child internal-child="vbox">
|
||||||
|
<object class="GtkBox" id="dialog-vbox1">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">12</property>
|
||||||
|
<child internal-child="action_area">
|
||||||
|
<object class="GtkButtonBox" id="dialog-action_area1">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="layout_style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="ok">
|
||||||
|
<property name="label">gtk-ok</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="can_default">True</property>
|
||||||
|
<property name="has_default">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="cancel">
|
||||||
|
<property name="label">gtk-cancel</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="help">
|
||||||
|
<property name="label">gtk-help</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="pack_type">end</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkGrid" id="grid1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="row_spacing">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkGrid" id="grid3">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="row_spacing">6</property>
|
||||||
|
<property name="column_spacing">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="browse">
|
||||||
|
<property name="label" translatable="yes">...</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="width">1</property>
|
||||||
|
<property name="height">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="label1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="label" translatable="yes">_Database file</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="mnemonic_widget">url</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
<property name="height">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="svtlo-OFileURLControl" id="url">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="has_entry">True</property>
|
||||||
|
<child internal-child="entry">
|
||||||
|
<object class="GtkEntry" id="URLBox-entry1">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="width">1</property>
|
||||||
|
<property name="height">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
<property name="width">1</property>
|
||||||
|
<property name="height">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkGrid" id="grid4">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="row_spacing">6</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="label4">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="label" translatable="yes">Registered _name</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="mnemonic_widget">name</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
<property name="width">1</property>
|
||||||
|
<property name="height">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="name">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="width_chars">52</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="width">1</property>
|
||||||
|
<property name="height">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="width">1</property>
|
||||||
|
<property name="height">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="alttitle">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="no_show_all">True</property>
|
||||||
|
<property name="label" translatable="yes">Edit Database Link</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">2</property>
|
||||||
|
<property name="width">1</property>
|
||||||
|
<property name="height">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<action-widgets>
|
||||||
|
<action-widget response="0">ok</action-widget>
|
||||||
|
<action-widget response="0">cancel</action-widget>
|
||||||
|
<action-widget response="0">help</action-widget>
|
||||||
|
</action-widgets>
|
||||||
|
</object>
|
||||||
|
</interface>
|
@@ -506,6 +506,10 @@
|
|||||||
generic-name="URLBox" parent="VclComboBoxText"
|
generic-name="URLBox" parent="VclComboBoxText"
|
||||||
icon-name="widget-gtk-comboboxtext"/>
|
icon-name="widget-gtk-comboboxtext"/>
|
||||||
|
|
||||||
|
<glade-widget-class title="OFileURLControl" name="svtlo-OFileURLControl"
|
||||||
|
generic-name="URLBox" parent="svtlo-SvtURLBox"
|
||||||
|
icon-name="widget-gtk-comboboxtext"/>
|
||||||
|
|
||||||
<glade-widget-class title="SelectionListBox" name="swuilo-SelectionListBox"
|
<glade-widget-class title="SelectionListBox" name="swuilo-SelectionListBox"
|
||||||
generic-name="SelectionListBox" parent="VclComboBoxText"
|
generic-name="SelectionListBox" parent="VclComboBoxText"
|
||||||
icon-name="widget-gtk-comboboxtext"/>
|
icon-name="widget-gtk-comboboxtext"/>
|
||||||
|
@@ -38,6 +38,7 @@ namespace svt
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
OFileURLControl(Window* _pParent, const ResId& _rId);
|
OFileURLControl(Window* _pParent, const ResId& _rId);
|
||||||
|
OFileURLControl(Window* _pParent, WinBits nStyle);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool PreNotify( NotifyEvent& rNEvt );
|
virtual bool PreNotify( NotifyEvent& rNEvt );
|
||||||
|
@@ -18,8 +18,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <svl/filenotation.hxx>
|
||||||
#include <svtools/urlcontrol.hxx>
|
#include <svtools/urlcontrol.hxx>
|
||||||
#include "svl/filenotation.hxx"
|
#include <vcl/layout.hxx>
|
||||||
|
|
||||||
//.........................................................................
|
//.........................................................................
|
||||||
namespace svt
|
namespace svt
|
||||||
@@ -31,11 +32,26 @@ namespace svt
|
|||||||
//=====================================================================
|
//=====================================================================
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
OFileURLControl::OFileURLControl(Window* _pParent, const ResId& _rId)
|
OFileURLControl::OFileURLControl(Window* _pParent, const ResId& _rId)
|
||||||
:SvtURLBox(_pParent, _rId, INET_PROT_FILE)
|
: SvtURLBox(_pParent, _rId, INET_PROT_FILE)
|
||||||
{
|
{
|
||||||
DisableHistory();
|
DisableHistory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OFileURLControl::OFileURLControl(Window* _pParent, WinBits nStyle)
|
||||||
|
: SvtURLBox(_pParent, nStyle, INET_PROT_FILE)
|
||||||
|
{
|
||||||
|
DisableHistory();
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeOFileURLControl(Window *pParent, VclBuilder::stringmap &)
|
||||||
|
{
|
||||||
|
WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP|
|
||||||
|
WB_DROPDOWN|WB_AUTOSIZE|WB_AUTOHSCROLL;
|
||||||
|
OFileURLControl* pListBox = new OFileURLControl(pParent, nWinBits);
|
||||||
|
pListBox->EnableAutoSize(true);
|
||||||
|
return pListBox;
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
bool OFileURLControl::PreNotify( NotifyEvent& _rNEvt )
|
bool OFileURLControl::PreNotify( NotifyEvent& _rNEvt )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user