Kaydet (Commit) 1e91ddc0 authored tarafından Manal Alhassoun's avatar Manal Alhassoun Kaydeden (comit) Caolán McNamara

Convert ImageMap Properties to Widget UI

Change-Id: I619b2dab67b22d75839b9968e7e784b5dd5268ad
Reviewed-on: https://gerrit.libreoffice.org/5226Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 3d5a27bf
......@@ -29,7 +29,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/customize/macropg.src \
cui/source/dialogs/colorpicker.src \
cui/source/dialogs/commonlingui.src \
cui/source/dialogs/cuiimapdlg.src \
cui/source/dialogs/cuires.src \
cui/source/dialogs/fmsearch.src \
cui/source/dialogs/gallery.src \
......
......@@ -26,6 +26,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/charnamepage \
cui/uiconfig/ui/colorpage \
cui/uiconfig/ui/comment \
cui/uiconfig/ui/cuiimapdlg \
cui/uiconfig/ui/formatnumberdialog \
cui/uiconfig/ui/gradientpage \
cui/uiconfig/ui/colorconfigwin \
......
/* -*- 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 .
*/
#include <cuires.hrc>
// ImapDlg-Dialoge
#define FT_URLDESCRIPTION 1
#define FT_URL1 2
#define FT_TARGET 3
#define FT_NAME 4
#define FT_DESCRIPTION 5
#define EDT_URLDESCRIPTION 1
#define EDT_URL 2
#define EDT_NAME 3
#define EDT_DESCRIPTION 4
#define BTN_HELP1 1
#define BTN_OK1 2
#define BTN_CANCEL1 3
#define FL_URL 1
#define CBB_TARGETS 1
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 .
*/
#include "helpid.hrc"
#include "cuiimapdlg.hrc"
ModalDialog RID_SVXDLG_IMAPURL
{
HelpID = "cui:ModalDialog:RID_SVXDLG_IMAPURL";
SVLook = TRUE ;
OutputSize = TRUE ;
Closeable = TRUE ;
Moveable = TRUE ;
Size = MAP_APPFONT ( 214 , 188 ) ;
Text [ en-US ] = "Properties" ;
FixedText FT_URL1
{
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 202 , 8 ) ;
Text [ en-US ] = "~URL" ;
};
Edit EDT_URL
{
HelpID = "cui:Edit:RID_SVXDLG_IMAPURL:EDT_URL";
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 202 , 12 ) ;
};
FixedText FT_TARGET
{
Pos = MAP_APPFONT ( 6 , 32 ) ;
Size = MAP_APPFONT ( 202 , 8 ) ;
Text [ en-US ] = "F~rame" ;
};
ComboBox CBB_TARGETS
{
HelpID = "cui:ComboBox:RID_SVXDLG_IMAPURL:CBB_TARGETS";
Border = TRUE ;
Sort = TRUE ;
Pos = MAP_APPFONT ( 6 , 43 ) ;
Size = MAP_APPFONT ( 101 , 50 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
HScroll = TRUE ;
};
FixedText FT_NAME
{
Pos = MAP_APPFONT ( 6 , 59 ) ;
Size = MAP_APPFONT ( 202 , 8 ) ;
Text [ en-US ] = "~Name" ;
};
Edit EDT_NAME
{
HelpID = "cui:Edit:RID_SVXDLG_IMAPURL:EDT_NAME";
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
Pos = MAP_APPFONT ( 6 , 70 ) ;
Size = MAP_APPFONT ( 202 , 12 ) ;
};
FixedText FT_URLDESCRIPTION
{
Pos = MAP_APPFONT ( 6 , 85 ) ;
Size = MAP_APPFONT ( 202 , 8 ) ;
Text [ en-US ] = "Alternative ~text" ;
};
Edit EDT_URLDESCRIPTION
{
HelpID = "cui:Edit:RID_SVXDLG_IMAPURL:EDT_URLDESCRIPTION";
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
Pos = MAP_APPFONT ( 6 , 96 ) ;
Size = MAP_APPFONT ( 202 , 12 ) ;
};
FixedText FT_DESCRIPTION
{
Pos = MAP_APPFONT ( 6 , 111 ) ;
Size = MAP_APPFONT ( 202 , 8 ) ;
Text [ en-US ] = "~Description" ;
};
MultiLineEdit EDT_DESCRIPTION
{
HelpID = "cui:MultiLineEdit:RID_SVXDLG_IMAPURL:EDT_DESCRIPTION";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 122 ) ;
Size = MAP_APPFONT ( 202 , 34 ) ;
TabStop = TRUE ;
IgnoreTab = TRUE;
VScroll = TRUE;
};
FixedLine FL_URL
{
Pos = MAP_APPFONT ( 0 , 160 ) ;
Size = MAP_APPFONT ( 214 , 4 ) ;
};
// Buttons
HelpButton BTN_HELP1
{
Pos = MAP_APPFONT ( 6, 168 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
OKButton BTN_OK1
{
TabStop = TRUE ;
DefButton = TRUE ;
Pos = MAP_APPFONT ( 107 , 168 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
CancelButton BTN_CANCEL1
{
TabStop = TRUE ;
Pos = MAP_APPFONT ( 160 , 168 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -29,7 +29,6 @@
#include <svx/xoutbmp.hxx>
#include <dialmgr.hxx>
#include <cuires.hrc>
#include <cuiimapdlg.hrc>
#include <cuiimapwnd.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdorect.hxx>
......@@ -50,36 +49,26 @@
\************************************************************************/
URLDlg::URLDlg( Window* pWindow, const String& rURL, const String& rAlternativeText, const String& rDescription, const String& rTarget, const String& rName, TargetList& rTargetList )
: ModalDialog( pWindow, CUI_RES( RID_SVXDLG_IMAPURL ) )
, maFtURL( this, CUI_RES( FT_URL1 ) )
, maEdtURL( this, CUI_RES( EDT_URL ) )
, maFtTarget( this, CUI_RES( FT_TARGET ) )
, maCbbTargets( this, CUI_RES( CBB_TARGETS ) )
, maFtName( this, CUI_RES( FT_NAME ) )
, maEdtName( this, CUI_RES( EDT_NAME ) )
, maFtAlternativeText( this, CUI_RES( FT_URLDESCRIPTION ) )
, maEdtAlternativeText( this, CUI_RES( EDT_URLDESCRIPTION ) )
, maFtDescription( this, CUI_RES( FT_DESCRIPTION ) )
, maEdtDescription( this, CUI_RES( EDT_DESCRIPTION ) )
, maFlURL( this, CUI_RES( FL_URL ) )
, maBtnHelp( this, CUI_RES( BTN_HELP1 ) )
, maBtnOk( this, CUI_RES( BTN_OK1 ) )
, maBtnCancel( this, CUI_RES( BTN_CANCEL1 ) )
: ModalDialog(pWindow, "IMapDialog", "cui/ui/cuiimapdlg.ui")
{
FreeResource();
get(m_pEdtURL, "urlentry");
get(m_pCbbTargets, "frameCB");
get(m_pEdtName, "nameentry");
get(m_pEdtAlternativeText, "textentry");
get(m_pEdtDescription, "descTV");
maEdtURL.SetText( rURL );
maEdtAlternativeText.SetText( rAlternativeText );
maEdtDescription.SetText( rDescription );
maEdtName.SetText( rName );
m_pEdtURL->SetText( rURL );
m_pEdtAlternativeText->SetText( rAlternativeText );
m_pEdtDescription->SetText( rDescription );
m_pEdtName->SetText( rName );
for( size_t i = 0, n = rTargetList.size(); i < n; ++i )
maCbbTargets.InsertEntry( *rTargetList[ i ] );
m_pCbbTargets->InsertEntry( *rTargetList[ i ] );
if( !rTarget.Len() )
maCbbTargets.SetText( OUString("_self") );
m_pCbbTargets->SetText( OUString("_self") );
else
maCbbTargets.SetText( rTarget );
m_pCbbTargets->SetText( rTarget );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -33,20 +33,11 @@
class URLDlg : public ModalDialog
{
FixedText maFtURL;
Edit maEdtURL;
FixedText maFtTarget;
ComboBox maCbbTargets;
FixedText maFtName;
Edit maEdtName;
FixedText maFtAlternativeText;
Edit maEdtAlternativeText;
FixedText maFtDescription;
MultiLineEdit maEdtDescription;
FixedLine maFlURL;
HelpButton maBtnHelp;
OKButton maBtnOk;
CancelButton maBtnCancel;
Edit* m_pEdtURL;
ComboBox* m_pCbbTargets;
Edit* m_pEdtName;
Edit* m_pEdtAlternativeText;
VclMultiLineEdit* m_pEdtDescription;
public:
......@@ -55,11 +46,11 @@ public:
const String& rTarget, const String& rName,
TargetList& rTargetList );
String GetURL() const { return maEdtURL.GetText(); }
String GetAltText() const { return maEdtAlternativeText.GetText(); }
String GetDesc() const { return maEdtDescription.GetText(); }
String GetTarget() const { return maCbbTargets.GetText(); }
String GetName() const { return maEdtName.GetText(); }
String GetURL() const { return m_pEdtURL->GetText(); }
String GetAltText() const { return m_pEdtAlternativeText->GetText(); }
String GetDesc() const { return m_pEdtDescription->GetText(); }
String GetTarget() const { return m_pCbbTargets->GetText(); }
String GetName() const { return m_pEdtName->GetText(); }
};
#endif
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment