summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorOliver Specht <os@openoffice.org>2001-06-18 10:21:24 +0000
committerOliver Specht <os@openoffice.org>2001-06-18 10:21:24 +0000
commit5accc409c1054f26aeb3a6184604afd0d5c42b2e (patch)
tree354902ca593ec942becfd4fe1ee83ab864671401 /sfx2
parentbcd973132b21ff17d205c6e7008096936f369b2b (diff)
#88298# format/styles/load implemented implemented
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/new.cxx98
-rw-r--r--sfx2/source/doc/new.hrc11
-rw-r--r--sfx2/source/doc/new.src169
3 files changed, 261 insertions, 17 deletions
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index bb14f7a4d895..2a53c6575d38 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: new.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: dv $ $Date: 2001-03-23 15:10:14 $
+ * last change: $Author: os $ $Date: 2001-06-18 11:21:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -245,7 +245,14 @@ class SfxNewFileDialog_Impl
Edit aKeywordsEd;
FixedText aDescFt;
MultiLineEdit aDescEd;
- GroupBox aDocinfoGb;
+ FixedLine aDocinfoGb;
+
+ CheckBox aTextStyleCB;
+ CheckBox aFrameStyleCB;
+ CheckBox aPageStyleCB;
+ CheckBox aNumStyleCB;
+ CheckBox aMergeStyleCB;
+ PushButton aLoadFilePB;
OKButton aOkBt;
CancelButton aCancelBt;
@@ -253,6 +260,7 @@ class SfxNewFileDialog_Impl
MoreButton* pMoreBt;
Timer aPrevTimer;
String aNone;
+ String sLoadTemplate;
USHORT nFlags;
SfxDocumentTemplates aTemplates;
@@ -269,6 +277,7 @@ class SfxNewFileDialog_Impl
void TogglePreview(CheckBox *);
DECL_LINK( Expand, MoreButton * );
DECL_LINK( PreviewClick, CheckBox * );
+ DECL_LINK( LoadFile, PushButton* );
USHORT GetSelectedTemplatePos() const;
public:
@@ -283,6 +292,9 @@ public:
String GetTemplateRegion() const;
String GetTemplateName() const;
String GetTemplateFileName() const;
+
+ USHORT GetTemplateFlags()const;
+ void SetTemplateFlags(USHORT nSet);
};
@@ -478,6 +490,14 @@ IMPL_LINK_INLINE_END( SfxNewFileDialog_Impl, DoubleClick, ListBox *, pListBox )
//-------------------------------------------------------------------------
+IMPL_LINK_INLINE_START( SfxNewFileDialog_Impl, LoadFile, PushButton *, EMPTYARG )
+{
+ pAntiImpl->EndDialog(RET_TEMPLATE_LOAD);
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxNewFileDialog_Impl, LoadFile, PushButton *, EMPTYARG )
+//-------------------------------------------------------------------------
+
USHORT SfxNewFileDialog_Impl::GetSelectedTemplatePos() const
{
USHORT nEntry=aTemplateLb.GetSelectEntryPos();
@@ -538,6 +558,29 @@ void AdjustPosSize_Impl(Window *pWin, short nMoveOffset, short nSizeOffset)
aSize.Width() += nSizeOffset;
pWin->SetPosSizePixel(aPos, aSize);
}
+//-------------------------------------------------------------------------
+USHORT SfxNewFileDialog_Impl::GetTemplateFlags()const
+{
+ USHORT nRet = aTextStyleCB.IsChecked() ? SFX_LOAD_TEXT_STYLES : 0;
+ if(aFrameStyleCB.IsChecked())
+ nRet |= SFX_LOAD_FRAME_STYLES;
+ if(aPageStyleCB.IsChecked())
+ nRet |= SFX_LOAD_PAGE_STYLES;
+ if(aNumStyleCB.IsChecked())
+ nRet |= SFX_LOAD_NUM_STYLES;
+ if(aMergeStyleCB.IsChecked())
+ nRet |= SFX_MERGE_STYLES;
+ return nRet;
+}
+//-------------------------------------------------------------------------
+void SfxNewFileDialog_Impl::SetTemplateFlags(USHORT nSet)
+{
+ aTextStyleCB.Check( 0 != (nSet&SFX_LOAD_TEXT_STYLES ));
+ aFrameStyleCB.Check( 0 != (nSet&SFX_LOAD_FRAME_STYLES));
+ aPageStyleCB.Check( 0 != (nSet&SFX_LOAD_PAGE_STYLES ));
+ aNumStyleCB.Check( 0 != (nSet&SFX_LOAD_NUM_STYLES ));
+ aMergeStyleCB.Check( 0 != (nSet&SFX_MERGE_STYLES ));
+}
//-------------------------------------------------------------------------
@@ -558,11 +601,18 @@ SfxNewFileDialog_Impl::SfxNewFileDialog_Impl(
pMoreBt( new MoreButton( pAntiImplP, ResId( BT_MORE ) ) ),
aPreviewBtn( pAntiImplP, ResId( BTN_PREVIEW ) ),
aDocinfoGb( pAntiImplP, ResId( GB_DOCINFO ) ),
+ aTextStyleCB( pAntiImplP, ResId( CB_TEXT_STYLE )),
+ aFrameStyleCB( pAntiImplP, ResId( CB_FRAME_STYLE )),
+ aPageStyleCB( pAntiImplP, ResId( CB_PAGE_STYLE )),
+ aNumStyleCB( pAntiImplP, ResId( CB_NUM_STYLE )),
+ aMergeStyleCB( pAntiImplP, ResId( CB_MERGE_STYLE )),
+ aLoadFilePB( pAntiImplP, ResId( PB_LOAD_FILE )),
aTitleFt( pAntiImplP, ResId( FT_TITLE ) ),
aKeywordsFt( pAntiImplP, ResId( FT_KEYWORDS ) ),
aDescFt( pAntiImplP, ResId( FT_DESC ) ),
aDescEd( pAntiImplP, ResId( ED_DESC ) ),
aNone( ResId(STR_NONE) ),
+ sLoadTemplate( ResId(STR_LOAD_TEMPLATE)),
nFlags(nFl),
pDocInfo(0),
pAntiImpl( pAntiImplP )
@@ -575,6 +625,23 @@ SfxNewFileDialog_Impl::SfxNewFileDialog_Impl(
if (!nFlags)
MORE_BTN(Hide());
+ else if(SFXWB_LOAD_TEMPLATE == nFlags)
+ {
+ aLoadFilePB.SetClickHdl(LINK(this, SfxNewFileDialog_Impl, LoadFile));
+ aLoadFilePB.Show();
+ aTextStyleCB.Show();
+ aFrameStyleCB.Show();
+ aPageStyleCB.Show();
+ aNumStyleCB.Show();
+ aMergeStyleCB.Show();
+ Size aSize(pAntiImplP->GetOutputSizePixel());
+ Size aTmp(pAntiImplP->LogicToPixel(Size(16, 16), MAP_APPFONT));
+ aSize.Height() += aTmp.Height();
+ pAntiImplP->SetOutputSizePixel(aSize);
+ pMoreBt->Hide();
+ aTextStyleCB.Check();
+ pAntiImplP->SetText(sLoadTemplate);
+ }
else
{
MORE_BTN(SetClickHdl(LINK(this, SfxNewFileDialog_Impl, Expand)));
@@ -655,39 +722,38 @@ SfxNewFileDialog_Impl::~SfxNewFileDialog_Impl()
delete pDocInfo;
delete pMoreBt;
}
-
-
+//-------------------------------------------------------------------------
SfxNewFileDialog::SfxNewFileDialog(Window *pParent, USHORT nFlags)
: SfxModalDialog( pParent, SfxResId( DLG_NEW_FILE ) )
{
pImpl = new SfxNewFileDialog_Impl( this, nFlags );
}
-
+//-------------------------------------------------------------------------
SfxNewFileDialog::~SfxNewFileDialog()
{
delete pImpl;
}
-
+//-------------------------------------------------------------------------
BOOL SfxNewFileDialog::IsTemplate() const
{
return pImpl->IsTemplate();
}
-
+//-------------------------------------------------------------------------
String SfxNewFileDialog::GetTemplateRegion() const
{
return pImpl->GetTemplateRegion();
}
-
+//-------------------------------------------------------------------------
String SfxNewFileDialog::GetTemplateName() const
{
return pImpl->GetTemplateName();
}
-
+//-------------------------------------------------------------------------
String SfxNewFileDialog::GetTemplateFileName() const
{
return pImpl->GetTemplateFileName();
}
-
+//-------------------------------------------------------------------------
BOOL SfxNewFileDialog::FillDocumentInfo
(
const String &rFile, // Datei incl. Pfad, deren DocInfo gelesen werden soll
@@ -702,5 +768,15 @@ BOOL SfxNewFileDialog::FillDocumentInfo
bLoadOk=rInfo.Load(aStor);
return bLoadOk;
}
+//-------------------------------------------------------------------------
+USHORT SfxNewFileDialog::GetTemplateFlags()const
+{
+ return pImpl->GetTemplateFlags();
+}
+//-------------------------------------------------------------------------
+void SfxNewFileDialog::SetTemplateFlags(USHORT nSet)
+{
+ pImpl->SetTemplateFlags(nSet);
+}
diff --git a/sfx2/source/doc/new.hrc b/sfx2/source/doc/new.hrc
index 3294b4f6325a..f37dc27d30af 100644
--- a/sfx2/source/doc/new.hrc
+++ b/sfx2/source/doc/new.hrc
@@ -2,9 +2,9 @@
*
* $RCSfile: new.hrc,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ * last change: $Author: os $ $Date: 2001-06-18 11:21:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -82,3 +82,10 @@
#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
diff --git a/sfx2/source/doc/new.src b/sfx2/source/doc/new.src
index 926ec6cfc307..32011de4ccf9 100644
--- a/sfx2/source/doc/new.src
+++ b/sfx2/source/doc/new.src
@@ -2,9 +2,9 @@
*
* $RCSfile: new.src,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: kz $ $Date: 2001-05-16 15:07:56 $
+ * last change: $Author: os $ $Date: 2001-06-18 11:21:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -246,10 +246,10 @@ ModalDialog DLG_NEW_FILE
Text[ language_user1 ] = " ";
Text[ catalan ] = "Pre~visualizacin";
};
- GroupBox GB_DOCINFO
+ FixedLine GB_DOCINFO
{
Pos = MAP_APPFONT ( 139 , 97 ) ;
- Size = MAP_APPFONT ( 186 , 143 ) ;
+ Size = MAP_APPFONT ( 186 , 8 ) ;
Text = "Beschreibung" ;
Text [ English ] = "Description" ;
Hide = TRUE ;
@@ -275,6 +275,167 @@ ModalDialog DLG_NEW_FILE
Text[ catalan ] = "Descripcin";
Text[ finnish ] = "Kuvaus";
};
+ CheckBox CB_TEXT_STYLE
+ {
+ Pos = MAP_APPFONT ( 6 , 94 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Hide = TRUE;
+ Text = "Te~xt" ;
+ Text [ English ] = "Text" ;
+ Text [ english_us ] = "Te~xt" ;
+ Text [ italian ] = "Testo" ;
+ Text [ spanish ] = "Te~xto" ;
+ Text [ french ] = "~Texte" ;
+ Text [ dutch ] = "~Tekst" ;
+ Text [ swedish ] = "Text" ;
+ Text [ danish ] = "Tekst" ;
+ Text [ portuguese ] = "~Texto" ;
+ Text [ portuguese_brazilian ] = "Text" ;
+ Text[ chinese_simplified ] = "(~X)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Tekst";
+ Text[ japanese ] = "(~X)";
+ Text[ chinese_traditional ] = "r(~X)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ؽƮ(~X)";
+ Text[ turkish ] = "~Metin";
+ };
+ CheckBox CB_FRAME_STYLE
+ {
+ Pos = MAP_APPFONT ( 60 , 94 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Hide = TRUE;
+ Text = "~Rahmen" ;
+ Text [ English ] = "Frame" ;
+ Text [ english_us ] = "~Frame" ;
+ Text [ italian ] = "Co~rnice" ;
+ Text [ spanish ] = "~Marco" ;
+ Text [ french ] = "~Cadres" ;
+ Text [ dutch ] = "~Kader" ;
+ Text [ swedish ] = "Ram" ;
+ Text [ danish ] = "Ramme" ;
+ Text [ portuguese_brazilian ] = "Rahmen" ;
+ Text [ portuguese ] = "Mol~dura" ;
+ Text[ chinese_simplified ] = "(~T)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Ramka";
+ Text[ japanese ] = "g(~T)";
+ Text[ chinese_traditional ] = "r(~T)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~F)";
+ Text[ turkish ] = "ereve";
+ };
+ CheckBox CB_PAGE_STYLE
+ {
+ Pos = MAP_APPFONT ( 114 , 94 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Hide = TRUE;
+ Text = "~Seiten" ;
+ Text [ English ] = "Page" ;
+ Text [ english_us ] = "~Pages" ;
+ Text [ italian ] = "Pagine" ;
+ Text [ spanish ] = "Pgin~as" ;
+ Text [ french ] = "~Pages" ;
+ Text [ dutch ] = "~pagina's" ;
+ Text [ swedish ] = "Sidor" ;
+ Text [ danish ] = "Sider" ;
+ Text [ portuguese ] = "~Pginas" ;
+ Text [ portuguese_brazilian ] = "Seiten" ;
+ Text[ chinese_simplified ] = "ҳ(~P)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Strony";
+ Text[ japanese ] = "߰(~P)";
+ Text[ chinese_traditional ] = "(~P)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~P)";
+ Text[ turkish ] = "Sayfa";
+ };
+ CheckBox CB_NUM_STYLE
+ {
+ Pos = MAP_APPFONT ( 168 , 94 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Hide = TRUE;
+ Text = "N~ummerierung" ;
+ Text [ English ] = "Numbering" ;
+ Text [ portuguese ] = "~Numerao" ;
+ Text [ english_us ] = "N~umbering" ;
+ Text [ portuguese_brazilian ] = "Numerierung" ;
+ Text [ swedish ] = "Numrering" ;
+ Text [ danish ] = "Nummerering" ;
+ Text [ italian ] = "N~umerazione" ;
+ Text [ spanish ] = "Nu~meracin" ;
+ Text [ french ] = "N~umrotation" ;
+ Text [ dutch ] = "~Nummering" ;
+ Text[ chinese_simplified ] = "(~U)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Numeracja";
+ Text[ japanese ] = "ԍt(~U)";
+ Text[ chinese_traditional ] = "s(~U)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ȣ ű(~U)";
+ Text[ turkish ] = "Numaralama";
+ };
+ CheckBox CB_MERGE_STYLE
+ {
+ Pos = MAP_APPFONT ( 222 , 94 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Hide = TRUE;
+ Text = "b~erschreiben" ;
+ Text [ English ] = "Overwrite" ;
+ Text [ dutch ] = "~Overschrijven" ;
+ Text [ english_us ] = "~Overwrite" ;
+ Text [ italian ] = "Sovrascrivi" ;
+ Text [ spanish ] = "So~brescribir" ;
+ Text [ french ] = "~craser" ;
+ Text [ swedish ] = "Skriv ver" ;
+ Text [ danish ] = "Overskriv" ;
+ Text [ portuguese ] = "~Sobregravar" ;
+ Text [ portuguese_brazilian ] = "berschreiben" ;
+ Text[ chinese_simplified ] = "д(~O)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Skasowa przez zapisanie";
+ Text[ japanese ] = "㏑(~O)";
+ Text[ chinese_traditional ] = "мg(~O)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~O)";
+ Text[ turkish ] = "zerine yaz";
+ };
+ PushButton PB_LOAD_FILE
+ {
+ Pos = MAP_APPFONT ( 274 , 92 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Hide = TRUE;
+ Text = "Aus Datei..." ;
+ Text [ English ] = "From file..." ;
+ };
+ String STR_LOAD_TEMPLATE
+ {
+ Text = "Vorlagen laden" ;
+ Text [ English ] = "Load templates" ;
+ Text [ english_us ] = "Load Templates" ;
+ Text [ italian ] = "Carica modelli" ;
+ Text [ spanish ] = "Cargar estilos" ;
+ Text [ french ] = "Chargement de styles" ;
+ Text [ dutch ] = "Opmaakprofielen laden" ;
+ Text [ swedish ] = "Ladda mallar" ;
+ Text [ danish ] = "Indls typografier" ;
+ Text [ portuguese ] = "Carregar estilos" ;
+ Text [ portuguese_brazilian ] = "Vorlagen laden" ;
+ Text[ chinese_simplified ] = "װʽ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zaaduj style";
+ Text[ japanese ] = "ڰĂ̓ǂݍ";
+ Text[ chinese_traditional ] = "˸˦";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Biim ykle";
+ };
FixedText FT_TITLE
{
Pos = MAP_APPFONT ( 145 , 108 ) ;