Kaydet (Commit) f3609ac0 authored tarafından Caolán McNamara's avatar Caolán McNamara

convert load template dialog to .ui

and merge the expander and the "show preview" checkbox
to be the same thing, i.e. expanded is showing, and
not expanded is not showing

Change-Id: I10e43bc36a0e2e5d1286a4dbad793ee3a700c97c
üst 89a838c1
......@@ -245,6 +245,9 @@
<glade-widget-class title="Token Window" name="swuilo-SwTokenWindow"
generic-name="Token Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Template Preview Window" name="sfxlo-SfxPreviewWin"
generic-name="Template Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Mark Preview" name="swuilo-SwMarkPreview"
generic-name="Mark Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
......
......@@ -52,7 +52,6 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\
sfx2/source/dialog/versdlg.src \
sfx2/source/doc/doc.src \
sfx2/source/doc/doctempl.src \
sfx2/source/doc/new.src \
sfx2/source/doc/templatelocnames.src \
sfx2/source/menu/menu.src \
sfx2/source/sidebar/Sidebar.src \
......
......@@ -28,6 +28,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/helpsearchpage \
sfx2/uiconfig/ui/inputdialog \
sfx2/uiconfig/ui/licensedialog \
sfx2/uiconfig/ui/loadtemplatedialog \
sfx2/uiconfig/ui/managestylepage \
sfx2/uiconfig/ui/newstyle \
sfx2/uiconfig/ui/optprintpage \
......
......@@ -36,7 +36,6 @@
#define STR_DELETE_TEMPLATE (RID_SFX_DOC_START+15)
#define MSG_REGION_NOTEMPTY (RID_SFX_DOC_START+17)
#define DLG_NEW_FILE (RID_SFX_DOC_START+1)
#define DLG_DOC_TEMPLATE (RID_SFX_DOC_START+2)
#define DLG_TEMPLATE_MANAGER (RID_SFX_DOC_START+4)
......
This diff is collapsed.
/* -*- 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 .
*/
#define BTN_PREVIEW 51
#define WIN_PREVIEW 50
#define GB_DESC 10
#define FT_DESC 11
#define FT_STYLESHEETS 19
#define FT_REGION 20
#define ED_TITLE 56
#define ED_KEYWORDS 61
#define FT_KEYWORDS 60
#define FT_TITLE 55
#define ED_DESC 71
#define LB_REGION 21
#define BT_OK 30
#define BT_CANCEL 31
#define BT_HELP 32
#define GB_DOCINFO 70
#define ED_THEMA 55
#define FT_THEMA 54
#define FT_TEMPLATE 53
#define LB_TEMPLATE 52
#define BT_MORE 32
#define CB_TEXT_STYLE 33
#define CB_FRAME_STYLE 34
#define CB_PAGE_STYLE 35
#define CB_NUM_STYLE 36
#define CB_MERGE_STYLE 37
#define PB_LOAD_FILE 38
#define STR_LOAD_TEMPLATE 39
/* 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 <sfx2/sfx.hrc>
#include "doc.hrc"
#include "new.hrc"
#include <sfx2/sfxcommands.h>
// DLG_NEW_FILE ----------------------------------------------------------
ModalDialog DLG_NEW_FILE
{
HelpId = CMD_SID_NEWDOC ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 336 , 96 ) ;
Text [ en-US ] = "New" ;
Moveable = TRUE ;
OKButton BT_OK
{
Pos = MAP_APPFONT ( 274 , 6 ) ;
Size = MAP_APPFONT ( 56 , 14 ) ;
DefButton = TRUE ;
};
CancelButton BT_CANCEL
{
Pos = MAP_APPFONT ( 274 , 23 ) ;
Size = MAP_APPFONT ( 56 , 14 ) ;
};
HelpButton BT_HELP
{
Pos = MAP_APPFONT ( 274 , 43 ) ;
Size = MAP_APPFONT ( 56 , 14 ) ;
};
ListBox LB_REGION
{
HelpID = "sfx2:ListBox:DLG_NEW_FILE:LB_REGION";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 18 ) ;
Size = MAP_APPFONT ( 127 , 72 ) ;
CurPos = 0 ;
};
FixedText FT_REGION
{
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 97 , 10 ) ;
Text [ en-US ] = "~Categories" ;
Left = TRUE ;
};
FixedText FT_TEMPLATE
{
Pos = MAP_APPFONT ( 139 , 6 ) ;
Size = MAP_APPFONT ( 97 , 10 ) ;
Text [ en-US ] = "T~emplates" ;
Left = TRUE ;
};
ListBox LB_TEMPLATE
{
HelpID = "sfx2:ListBox:DLG_NEW_FILE:LB_TEMPLATE";
Border = TRUE ;
Pos = MAP_APPFONT ( 139 , 18 ) ;
Size = MAP_APPFONT ( 127 , 72 ) ;
CurPos = 0 ;
};
MoreButton BT_MORE
{
HelpID = "sfx2:MoreButton:DLG_NEW_FILE:BT_MORE";
Pos = MAP_APPFONT ( 274 , 70 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~More" ;
Delta = 148 ;
MapUnit = MAP_APPFONT ;
};
Window WIN_PREVIEW
{
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 110 ) ;
Size = MAP_APPFONT ( 127 , 129 ) ;
Hide = TRUE ;
SVLook = FALSE ;
};
CheckBox BTN_PREVIEW
{
HelpID = "sfx2:CheckBox:DLG_NEW_FILE:BTN_PREVIEW";
Pos = MAP_APPFONT ( 6 , 96 ) ;
Size = MAP_APPFONT ( 97 , 10 ) ;
Text [ en-US ] = "Pre~view" ;
Hide = TRUE ;
};
FixedLine GB_DOCINFO
{
Pos = MAP_APPFONT ( 139 , 97 ) ;
Size = MAP_APPFONT ( 186 , 8 ) ;
Hide = TRUE ;
Text [ en-US ] = "Description" ;
};
CheckBox CB_TEXT_STYLE
{
HelpID = "sfx2:CheckBox:DLG_NEW_FILE:CB_TEXT_STYLE";
Pos = MAP_APPFONT ( 6 , 94 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Hide = TRUE;
Text [ en-US ] = "Te~xt" ;
};
CheckBox CB_FRAME_STYLE
{
HelpID = "sfx2:CheckBox:DLG_NEW_FILE:CB_FRAME_STYLE";
Pos = MAP_APPFONT ( 60 , 94 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Hide = TRUE;
Text [ en-US ] = "~Frame" ;
};
CheckBox CB_PAGE_STYLE
{
HelpID = "sfx2:CheckBox:DLG_NEW_FILE:CB_PAGE_STYLE";
Pos = MAP_APPFONT ( 114 , 94 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Hide = TRUE;
Text [ en-US ] = "~Pages" ;
};
CheckBox CB_NUM_STYLE
{
HelpID = "sfx2:CheckBox:DLG_NEW_FILE:CB_NUM_STYLE";
Pos = MAP_APPFONT ( 168 , 94 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Hide = TRUE;
Text [ en-US ] = "N~umbering" ;
};
CheckBox CB_MERGE_STYLE
{
HelpID = "sfx2:CheckBox:DLG_NEW_FILE:CB_MERGE_STYLE";
Pos = MAP_APPFONT ( 222 , 94 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Hide = TRUE;
Text [ en-US ] = "~Overwrite" ;
};
PushButton PB_LOAD_FILE
{
HelpID = "sfx2:PushButton:DLG_NEW_FILE:PB_LOAD_FILE";
Pos = MAP_APPFONT ( 274 , 92 ) ;
Size = MAP_APPFONT ( 56 , 14 ) ;
Hide = TRUE;
Text [ en-US ] = "From File...";
};
String STR_LOAD_TEMPLATE
{
Text [ en-US ] = "Load Styles" ;
};
FixedText FT_TITLE
{
Pos = MAP_APPFONT ( 145 , 108 ) ;
Size = MAP_APPFONT ( 175 , 10 ) ;
Text [ en-US ] = "~Title" ;
Hide = TRUE ;
};
Edit ED_TITLE
{
HelpID = "sfx2:Edit:DLG_NEW_FILE:ED_TITLE";
Border = TRUE ;
Pos = MAP_APPFONT ( 145 , 121 ) ;
Size = MAP_APPFONT ( 175 , 12 ) ;
ReadOnly = TRUE ;
Hide = TRUE ;
};
FixedText FT_THEMA
{
Pos = MAP_APPFONT ( 145 , 135 ) ;
Size = MAP_APPFONT ( 175 , 10 ) ;
Text [ en-US ] = "Subject" ;
Hide = TRUE ;
};
Edit ED_THEMA
{
HelpID = "sfx2:Edit:DLG_NEW_FILE:ED_THEMA";
Border = TRUE ;
Pos = MAP_APPFONT ( 145 , 148 ) ;
Size = MAP_APPFONT ( 175 , 12 ) ;
ReadOnly = TRUE ;
Hide = TRUE ;
};
FixedText FT_KEYWORDS
{
Pos = MAP_APPFONT ( 145 , 162 ) ;
Size = MAP_APPFONT ( 175 , 10 ) ;
Text [ en-US ] = "~Key words" ;
Hide = TRUE ;
};
Edit ED_KEYWORDS
{
HelpID = "sfx2:Edit:DLG_NEW_FILE:ED_KEYWORDS";
Border = TRUE ;
Pos = MAP_APPFONT ( 145 , 175 ) ;
Size = MAP_APPFONT ( 175 , 12 ) ;
ReadOnly = TRUE ;
Hide = TRUE ;
};
FixedText FT_DESC
{
Pos = MAP_APPFONT ( 145 , 189 ) ;
Size = MAP_APPFONT ( 175 , 10 ) ;
Text [ en-US ] = "~Description" ;
Hide = TRUE ;
};
MultiLineEdit ED_DESC
{
HelpID = "sfx2:MultiLineEdit:DLG_NEW_FILE:ED_DESC";
Border = TRUE ;
Pos = MAP_APPFONT ( 144 , 202 ) ;
Size = MAP_APPFONT ( 175 , 32 ) ;
IgnoreTab = TRUE ;
ReadOnly = TRUE ;
Hide = TRUE ;
};
ExtraData =
{
103;
44;
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -31,23 +31,21 @@ class SfxPreviewBase_Impl : public Window
protected:
::boost::shared_ptr<GDIMetaFile> pMetaFile;
public:
SfxPreviewBase_Impl( Window* pParent,
const ResId& rResId );
~SfxPreviewBase_Impl( );
SfxPreviewBase_Impl(Window* pParent, WinBits nStyle);
void SetObjectShell( SfxObjectShell* pObj );
virtual void Resize();
virtual Size GetOptimalSize() const;
};
class SfxPreviewWin_Impl: public SfxPreviewBase_Impl
{
protected:
virtual void Paint( const Rectangle& rRect );
public:
SfxPreviewWin_Impl( Window* pParent,
const ResId& rResId )
: SfxPreviewBase_Impl( pParent, rResId ){};
SfxPreviewWin_Impl(Window* pParent, WinBits nStyle)
: SfxPreviewBase_Impl(pParent, nStyle)
{
}
static void ImpPaint(
const Rectangle& rRect, GDIMetaFile* pFile, Window* pWindow );
};
......
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