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

convert calc autoformat dialog to .ui

this dialog is hauntingly similar to the writer
one, a copy and paste job

Change-Id: Ic873038dba4ca4fd737690b917f6cd0d5144218a
üst b79fc2d0
...@@ -365,6 +365,9 @@ ...@@ -365,6 +365,9 @@
<glade-widget-class title="Table Preview" name="swuilo-AutoFmtPreview" <glade-widget-class title="Table Preview" name="swuilo-AutoFmtPreview"
generic-name="Table Preview Window" parent="GtkDrawingArea" generic-name="Table Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/> icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Calc Table Preview" name="sclo-ScAutoFmtPreview"
generic-name="Calc Table Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Caption Preview" name="swuilo-SwCaptionPreview" <glade-widget-class title="Caption Preview" name="swuilo-SwCaptionPreview"
generic-name="Caption Preview Window" parent="GtkDrawingArea" generic-name="Caption Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/> icon-name="widget-gtk-drawingarea"/>
......
...@@ -34,7 +34,6 @@ $(eval $(call gb_SrsTarget_set_include,sc/res,\ ...@@ -34,7 +34,6 @@ $(eval $(call gb_SrsTarget_set_include,sc/res,\
$(eval $(call gb_SrsTarget_add_files,sc/res,\ $(eval $(call gb_SrsTarget_add_files,sc/res,\
sc/source/ui/src/popup.src \ sc/source/ui/src/popup.src \
sc/source/ui/src/autofmt.src \
sc/source/ui/src/globstr.src \ sc/source/ui/src/globstr.src \
sc/source/ui/src/toolbox.src \ sc/source/ui/src/toolbox.src \
sc/source/ui/src/scfuncs.src \ sc/source/ui/src/scfuncs.src \
......
...@@ -63,6 +63,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\ ...@@ -63,6 +63,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/advancedfilterdialog \ sc/uiconfig/scalc/ui/advancedfilterdialog \
sc/uiconfig/scalc/ui/allheaderfooterdialog \ sc/uiconfig/scalc/ui/allheaderfooterdialog \
sc/uiconfig/scalc/ui/analysisofvariancedialog \ sc/uiconfig/scalc/ui/analysisofvariancedialog \
sc/uiconfig/scalc/ui/autoformattable \
sc/uiconfig/scalc/ui/cellprotectionpage \ sc/uiconfig/scalc/ui/cellprotectionpage \
sc/uiconfig/scalc/ui/changesourcedialog \ sc/uiconfig/scalc/ui/changesourcedialog \
sc/uiconfig/scalc/ui/chardialog \ sc/uiconfig/scalc/ui/chardialog \
......
...@@ -970,8 +970,20 @@ ...@@ -970,8 +970,20 @@
#define STR_WRONGROWCOL (STR_START + 418) #define STR_WRONGROWCOL (STR_START + 418)
#define STR_NOCOLFORMULA (STR_START + 419) #define STR_NOCOLFORMULA (STR_START + 419)
#define STR_NOROWFORMULA (STR_START + 420) #define STR_NOROWFORMULA (STR_START + 420)
#define STR_ADD_AUTOFORMAT_TITLE (STR_START + 421)
#define STR_END (STR_NOROWFORMULA) #define STR_RENAME_AUTOFORMAT_TITLE (STR_START + 422)
#define STR_ADD_AUTOFORMAT_LABEL (STR_START + 423)
#define STR_DEL_AUTOFORMAT_TITLE (STR_START + 424)
#define STR_DEL_AUTOFORMAT_MSG (STR_START + 425)
#define STR_BTN_AUTOFORMAT_CLOSE (STR_START + 426)
#define STR_JAN (STR_START + 427)
#define STR_FEB (STR_START + 428)
#define STR_MAR (STR_START + 429)
#define STR_NORTH (STR_START + 430)
#define STR_MID (STR_START + 431)
#define STR_SOUTH (STR_START + 432)
#define STR_SUM (STR_START + 433)
#define STR_END (STR_SUM)
#define BMP_START (STR_END) #define BMP_START (STR_END)
...@@ -1005,7 +1017,6 @@ ...@@ -1005,7 +1017,6 @@
#define RID_SCDLG_INSCELL (SC_DIALOGS_START + 12) #define RID_SCDLG_INSCELL (SC_DIALOGS_START + 12)
#define RID_SCDLG_SELENTRY (SC_DIALOGS_START + 18) #define RID_SCDLG_SELENTRY (SC_DIALOGS_START + 18)
#define RID_SCDLG_AUTOFORMAT (SC_DIALOGS_START + 20)
#define RID_SCDLG_NAMES (SC_DIALOGS_START + 22) #define RID_SCDLG_NAMES (SC_DIALOGS_START + 22)
#define RID_SCDLG_DBNAMES (SC_DIALOGS_START + 23) #define RID_SCDLG_DBNAMES (SC_DIALOGS_START + 23)
#define RID_SCDLG_SOLVER (SC_DIALOGS_START + 26) #define RID_SCDLG_SOLVER (SC_DIALOGS_START + 26)
......
...@@ -332,11 +332,10 @@ public: ...@@ -332,11 +332,10 @@ public:
virtual AbstractScTextImportOptionsDlg * CreateScTextImportOptionsDlg(Window* pParent) = 0; virtual AbstractScTextImportOptionsDlg * CreateScTextImportOptionsDlg(Window* pParent) = 0;
virtual AbstractScAutoFormatDlg * CreateScAutoFormatDlg( Window* pParent, virtual AbstractScAutoFormatDlg * CreateScAutoFormatDlg(Window* pParent,
ScAutoFormat* pAutoFormat, ScAutoFormat* pAutoFormat,
const ScAutoFormatData* pSelFormatData, const ScAutoFormatData* pSelFormatData,
ScDocument* pDoc, ScViewData *pViewData) = 0;
int nId) = 0;
virtual AbstractScColRowLabelDlg * CreateScColRowLabelDlg (Window* pParent, virtual AbstractScColRowLabelDlg * CreateScColRowLabelDlg (Window* pParent,
bool bCol = false, bool bCol = false,
bool bRow = false) = 0; bool bRow = false) = 0;
......
...@@ -616,25 +616,13 @@ AbstractScTextImportOptionsDlg * ScAbstractDialogFactory_Impl::CreateScTextImpor ...@@ -616,25 +616,13 @@ AbstractScTextImportOptionsDlg * ScAbstractDialogFactory_Impl::CreateScTextImpor
return new AbstractScTextImportOptionsDlg_Impl(pDlg); return new AbstractScTextImportOptionsDlg_Impl(pDlg);
} }
AbstractScAutoFormatDlg * ScAbstractDialogFactory_Impl::CreateScAutoFormatDlg( Window* pParent, AbstractScAutoFormatDlg * ScAbstractDialogFactory_Impl::CreateScAutoFormatDlg(Window* pParent,
ScAutoFormat* pAutoFormat, ScAutoFormat* pAutoFormat,
const ScAutoFormatData* pSelFormatData, const ScAutoFormatData* pSelFormatData,
ScDocument* pDoc, ScViewData *pViewData)
int nId)
{ {
ScAutoFormatDlg* pDlg=NULL; ScAutoFormatDlg* pDlg = new ScAutoFormatDlg(pParent, pAutoFormat, pSelFormatData, pViewData);
switch ( nId ) return new AbstractScAutoFormatDlg_Impl(pDlg);
{
case RID_SCDLG_AUTOFORMAT :
pDlg = new ScAutoFormatDlg( pParent, pAutoFormat,pSelFormatData, pDoc );
break;
default:
break;
}
if ( pDlg )
return new AbstractScAutoFormatDlg_Impl( pDlg );
return 0;
} }
AbstractScColRowLabelDlg * ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(Window* pParent, AbstractScColRowLabelDlg * ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(Window* pParent,
......
...@@ -401,11 +401,10 @@ public: ...@@ -401,11 +401,10 @@ public:
virtual AbstractScTextImportOptionsDlg * CreateScTextImportOptionsDlg(Window* pParent); virtual AbstractScTextImportOptionsDlg * CreateScTextImportOptionsDlg(Window* pParent);
virtual AbstractScAutoFormatDlg * CreateScAutoFormatDlg( Window* pParent, virtual AbstractScAutoFormatDlg * CreateScAutoFormatDlg(Window* pParent,
ScAutoFormat* pAutoFormat, ScAutoFormat* pAutoFormat,
const ScAutoFormatData* pSelFormatData, const ScAutoFormatData* pSelFormatData,
ScDocument* pDoc, ScViewData *pViewData);
int nId);
virtual AbstractScColRowLabelDlg * CreateScColRowLabelDlg (Window* pParent, virtual AbstractScColRowLabelDlg * CreateScColRowLabelDlg (Window* pParent,
bool bCol = false, bool bCol = false,
bool bRow = false); bool bRow = false);
......
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
#include <svtools/scriptedtext.hxx> #include <svtools/scriptedtext.hxx>
#include <svx/framelinkarray.hxx> #include <svx/framelinkarray.hxx>
#include "scdllapi.h" #include "scdllapi.h"
#include "viewdata.hxx"
class ScAutoFormatData; class ScAutoFormatData;
class SvxBoxItem; class SvxBoxItem;
...@@ -48,13 +47,15 @@ enum AutoFmtLine { TOP_LINE, BOTTOM_LINE, LEFT_LINE, RIGHT_LINE }; ...@@ -48,13 +47,15 @@ enum AutoFmtLine { TOP_LINE, BOTTOM_LINE, LEFT_LINE, RIGHT_LINE };
class SC_DLLPUBLIC ScAutoFmtPreview : public Window class SC_DLLPUBLIC ScAutoFmtPreview : public Window
{ {
public: public:
ScAutoFmtPreview( Window* pParent, const ResId& rRes, ScDocument* pDoc ); ScAutoFmtPreview(Window* pParent);
~ScAutoFmtPreview(); void DetectRTL(ScViewData *pViewData);
~ScAutoFmtPreview();
void NotifyChange( ScAutoFormatData* pNewData ); void NotifyChange( ScAutoFormatData* pNewData );
protected: protected:
virtual void Paint( const Rectangle& rRect ); virtual void Paint(const Rectangle& rRect);
virtual void Resize();
private: private:
ScAutoFormatData* pCurData; ScAutoFormatData* pCurData;
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
// -> RID_SCDLG_MOVETAB // -> RID_SCDLG_MOVETAB
// -> RID_SCDLG_SELENTRY // -> RID_SCDLG_SELENTRY
// -> RID_SCDLG_FILLSERIES // -> RID_SCDLG_FILLSERIES
// -> RID_SCDLG_AUTOFORMAT
// General // General
#define BTN_OK 100 #define BTN_OK 100
...@@ -42,32 +41,6 @@ ...@@ -42,32 +41,6 @@
#define FL_ENTRYLIST 10 #define FL_ENTRYLIST 10
#define LB_ENTRYLIST 11 #define LB_ENTRYLIST 11
// Auto format
#define LB_FORMAT 1
#define FL_FORMAT 9
#define WND_PREVIEW 19
#define BTN_NUMFORMAT 20
#define BTN_BORDER 21
#define BTN_FONT 23
#define BTN_PATTERN 24
#define BTN_ALIGNMENT 25
#define BTN_ADJUST 26
#define BTN_RENAME 27
#define FL_FORMATTING 29
#define STR_ADD_TITLE 100
#define STR_ADD_LABEL 101
#define STR_DEL_TITLE 102
#define STR_DEL_MSG 103
#define STR_RENAME_TITLE 104
// Auto format Preview:
#define STR_JAN 121
#define STR_FEB 122
#define STR_MAR 123
#define STR_NORTH 124
#define STR_MID 125
#define STR_SOUTH 126
#define STR_SUM 127
// Set/Reset Grouping: // Set/Reset Grouping:
#define BTN_GROUP_COLS 1 #define BTN_GROUP_COLS 1
#define BTN_GROUP_ROWS 3 #define BTN_GROUP_ROWS 3
......
...@@ -23,33 +23,28 @@ ...@@ -23,33 +23,28 @@
class ScAutoFormatDlg : public ModalDialog class ScAutoFormatDlg : public ModalDialog
{ {
public: public:
ScAutoFormatDlg( Window* pParent, ScAutoFormatDlg(Window* pParent,
ScAutoFormat* pAutoFormat, ScAutoFormat* pAutoFormat,
const ScAutoFormatData* pSelFormatData, const ScAutoFormatData* pSelFormatData,
ScDocument* pDoc ); ScViewData *pViewData);
~ScAutoFormatDlg();
sal_uInt16 GetIndex() const { return nIndex; } sal_uInt16 GetIndex() const { return nIndex; }
OUString GetCurrFormatName(); OUString GetCurrFormatName();
private: private:
FixedLine aFlFormat; ListBox* m_pLbFormat;
ListBox aLbFormat; ScAutoFmtPreview* m_pWndPreview;
ScAutoFmtPreview* pWndPreview; OKButton* m_pBtnOk;
OKButton aBtnOk; CancelButton* m_pBtnCancel;
CancelButton aBtnCancel; PushButton* m_pBtnAdd;
HelpButton aBtnHelp; PushButton* m_pBtnRemove;
PushButton aBtnAdd; PushButton* m_pBtnRename;
PushButton aBtnRemove; CheckBox* m_pBtnNumFormat;
MoreButton aBtnMore; CheckBox* m_pBtnBorder;
FixedLine aFlFormatting; CheckBox* m_pBtnFont;
CheckBox aBtnNumFormat; CheckBox* m_pBtnPattern;
CheckBox aBtnBorder; CheckBox* m_pBtnAlignment;
CheckBox aBtnFont; CheckBox* m_pBtnAdjust;
CheckBox aBtnPattern;
CheckBox aBtnAlignment;
CheckBox aBtnAdjust;
PushButton aBtnRename;
OUString aStrTitle; OUString aStrTitle;
OUString aStrLabel; OUString aStrLabel;
OUString aStrClose; OUString aStrClose;
......
...@@ -56,40 +56,45 @@ ...@@ -56,40 +56,45 @@
// ScAutoFmtPreview // ScAutoFmtPreview
ScAutoFmtPreview::ScAutoFmtPreview( Window* pParent, const ResId& rRes, ScDocument* pDoc ) : ScAutoFmtPreview::ScAutoFmtPreview(Window* pParent)
Window ( pParent, rRes ), : Window(pParent)
pCurData ( NULL ), , pCurData(NULL)
aVD ( *this ), , aVD(*this)
aScriptedText ( aVD ), , aScriptedText(aVD)
xBreakIter ( pDoc->GetBreakIterator() ), , bFitWidth(false)
bFitWidth ( false ), , mbRTL(false)
mbRTL ( false ), , aStrJan(ScResId(STR_JAN))
aPrvSize ( GetSizePixel().Width() - 6, GetSizePixel().Height() - 30 ), , aStrFeb(ScResId(STR_FEB))
mnLabelColWidth ( (aPrvSize.Width() - 4) / 4 - 12 ), , aStrMar(ScResId(STR_MAR))
mnDataColWidth1 ( (aPrvSize.Width() - 4 - 2 * mnLabelColWidth) / 3 ), , aStrNorth(ScResId(STR_NORTH))
mnDataColWidth2 ( (aPrvSize.Width() - 4 - 2 * mnLabelColWidth) / 4 ), , aStrMid(ScResId(STR_MID))
mnRowHeight ( (aPrvSize.Height() - 4) / 5 ), , aStrSouth(ScResId(STR_SOUTH))
aStrJan ( ScResId( STR_JAN ) ), , aStrSum(ScResId(STR_SUM))
aStrFeb ( ScResId( STR_FEB ) ), , pNumFmt(new SvNumberFormatter(::comphelper::getProcessComponentContext(), ScGlobal::eLnge))
aStrMar ( ScResId( STR_MAR ) ),
aStrNorth ( ScResId( STR_NORTH ) ),
aStrMid ( ScResId( STR_MID ) ),
aStrSouth ( ScResId( STR_SOUTH ) ),
aStrSum ( ScResId( STR_SUM ) ),
pNumFmt ( new SvNumberFormatter( ::comphelper::getProcessComponentContext(), ScGlobal::eLnge ) )
{ {
Init(); Init();
} }
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeScAutoFmtPreview(Window *pParent, VclBuilder::stringmap &)
{
return new ScAutoFmtPreview(pParent);
}
void ScAutoFmtPreview::Resize()
{
aPrvSize = Size(GetSizePixel().Width() - 6, GetSizePixel().Height() - 30);
mnLabelColWidth = (aPrvSize.Width() - 4) / 4 - 12;
mnDataColWidth1 = (aPrvSize.Width() - 4 - 2 * mnLabelColWidth) / 3;
mnDataColWidth2 = (aPrvSize.Width() - 4 - 2 * mnLabelColWidth) / 4;
mnRowHeight = (aPrvSize.Height() - 4) / 5;
NotifyChange(pCurData);
}
ScAutoFmtPreview::~ScAutoFmtPreview() ScAutoFmtPreview::~ScAutoFmtPreview()
{ {
delete pNumFmt; delete pNumFmt;
} }
static void lcl_SetFontProperties( static void lcl_SetFontProperties(
Font& rFont, Font& rFont,
const SvxFontItem& rFontItem, const SvxFontItem& rFontItem,
...@@ -415,8 +420,6 @@ void ScAutoFmtPreview::PaintCells() ...@@ -415,8 +420,6 @@ void ScAutoFmtPreview::PaintCells()
} }
} }
void ScAutoFmtPreview::Init() void ScAutoFmtPreview::Init()
{ {
SetBorderStyle( WINDOW_BORDER_MONO ); SetBorderStyle( WINDOW_BORDER_MONO );
...@@ -424,20 +427,16 @@ void ScAutoFmtPreview::Init() ...@@ -424,20 +427,16 @@ void ScAutoFmtPreview::Init()
maArray.SetUseDiagDoubleClipping( false ); maArray.SetUseDiagDoubleClipping( false );
CalcCellArray( false ); CalcCellArray( false );
CalcLineMap(); CalcLineMap();
}
TypeId aType(TYPE(ScDocShell)); void ScAutoFmtPreview::DetectRTL(ScViewData *pViewData)
ScDocShell* pDocShell = (ScDocShell*)SfxObjectShell::GetFirst(&aType); {
SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDocShell );
SfxViewShell* p = pFrame->GetViewShell();
ScTabViewShell* pViewSh = dynamic_cast< ScTabViewShell* >( p );
ScViewData* pViewData = pViewSh->GetViewData();
SCTAB nCurrentTab = pViewData->GetTabNo(); SCTAB nCurrentTab = pViewData->GetTabNo();
ScDocument* pDoc = pViewData->GetDocument(); ScDocument* pDoc = pViewData->GetDocument();
mbRTL = pDoc->IsLayoutRTL( nCurrentTab ); mbRTL = pDoc->IsLayoutRTL(nCurrentTab);
xBreakIter = pDoc->GetBreakIterator();
} }
void ScAutoFmtPreview::CalcCellArray( bool bFitWidthP ) void ScAutoFmtPreview::CalcCellArray( bool bFitWidthP )
{ {
maArray.SetXOffset( 2 ); maArray.SetXOffset( 2 );
...@@ -488,28 +487,20 @@ void ScAutoFmtPreview::CalcLineMap() ...@@ -488,28 +487,20 @@ void ScAutoFmtPreview::CalcLineMap()
} }
} }
void ScAutoFmtPreview::NotifyChange( ScAutoFormatData* pNewData ) void ScAutoFmtPreview::NotifyChange( ScAutoFormatData* pNewData )
{ {
if ( pNewData != pCurData ) if (pNewData)
{ {
pCurData = pNewData; pCurData = pNewData;
bFitWidth = pNewData->GetIncludeWidthHeight(); bFitWidth = pNewData->GetIncludeWidthHeight();
CalcCellArray( bFitWidth );
CalcLineMap();
}
else if ( bFitWidth != pNewData->GetIncludeWidthHeight() )
{
bFitWidth = !bFitWidth;
CalcCellArray( bFitWidth );
} }
CalcCellArray( bFitWidth );
CalcLineMap();
DoPaint( Rectangle( Point(0,0), GetSizePixel() ) ); DoPaint( Rectangle( Point(0,0), GetSizePixel() ) );
} }
void ScAutoFmtPreview::DoPaint( const Rectangle& /* rRect */ ) void ScAutoFmtPreview::DoPaint( const Rectangle& /* rRect */ )
{ {
sal_uInt32 nOldDrawMode = aVD.GetDrawMode(); sal_uInt32 nOldDrawMode = aVD.GetDrawMode();
......
/* -*- 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 "miscdlgs.hrc"
ModalDialog RID_SCDLG_AUTOFORMAT
{
OutputSize = TRUE ;
HelpId = CMD_SID_AUTOFORMAT ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 312 , 121 ) ;
Text [ en-US ] = "AutoFormat" ;
Moveable = TRUE ;
Closeable = FALSE ;
ListBox LB_FORMAT
{
HelpID = "sc:ListBox:RID_SCDLG_AUTOFORMAT:LB_FORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 70 , 101 ) ;
TabStop = TRUE ;
};
FixedLine FL_FORMAT
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 244 , 8 ) ;
Text [ en-US ] = "F~ormat" ;
};
Window WND_PREVIEW
{
Pos = MAP_APPFONT ( 88 , 14 ) ;
Size = MAP_APPFONT ( 159 , 101 ) ;
Border = TRUE ;
};
CheckBox BTN_ADJUST
{
HelpID = "sc:CheckBox:RID_SCDLG_AUTOFORMAT:BTN_ADJUST";
Hide = TRUE ;
Pos = MAP_APPFONT ( 172 , 146 ) ;
Size = MAP_APPFONT ( 75 , 10 ) ;
Text [ en-US ] = "A~utoFit width and height" ;
TabStop = TRUE ;
};
CheckBox BTN_BORDER
{
HelpID = "sc:CheckBox:RID_SCDLG_AUTOFORMAT:BTN_BORDER";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 146 ) ;
Size = MAP_APPFONT ( 75 , 10 ) ;
Text [ en-US ] = "~Borders" ;
TabStop = TRUE ;
};
CheckBox BTN_FONT
{
HelpID = "sc:CheckBox:RID_SCDLG_AUTOFORMAT:BTN_FONT";
Hide = TRUE ;
Pos = MAP_APPFONT ( 93 , 132 ) ;
Size = MAP_APPFONT ( 73 , 10 ) ;
Text [ en-US ] = "F~ont" ;
TabStop = TRUE ;
};
CheckBox BTN_PATTERN
{
HelpID = "sc:CheckBox:RID_SCDLG_AUTOFORMAT:BTN_PATTERN";
Hide = TRUE ;
Pos = MAP_APPFONT ( 93 , 146 ) ;
Size = MAP_APPFONT ( 73 , 10 ) ;
Text [ en-US ] = "~Pattern" ;
TabStop = TRUE ;
};
CheckBox BTN_ALIGNMENT
{
HelpID = "sc:CheckBox:RID_SCDLG_AUTOFORMAT:BTN_ALIGNMENT";
Hide = TRUE ;
Pos = MAP_APPFONT ( 172 , 132 ) ;
Size = MAP_APPFONT ( 75 , 10 ) ;
Text [ en-US ] = "Alignmen~t" ;
TabStop = TRUE ;
};
CheckBox BTN_NUMFORMAT
{
HelpID = "sc:CheckBox:RID_SCDLG_AUTOFORMAT:BTN_NUMFORMAT";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 132 ) ;
Size = MAP_APPFONT ( 75 , 10 ) ;
Text [ en-US ] = "~Number format" ;
TabStop = TRUE ;
};
FixedLine FL_FORMATTING
{
Hide = TRUE ;
Pos = MAP_APPFONT ( 6 , 121 ) ;
Size = MAP_APPFONT ( 244 , 8 ) ;
Text [ en-US ] = "Formatting" ;
};
OKButton BTN_OK
{
Pos = MAP_APPFONT ( 256 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
DefButton = TRUE ;
};
CancelButton BTN_CANCEL
{
Pos = MAP_APPFONT ( 256 , 23 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
MoreButton BTN_MORE
{
HelpID = "sc:MoreButton:RID_SCDLG_AUTOFORMAT:BTN_MORE";
Pos = MAP_APPFONT ( 256 , 101 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
MapUnit = MAP_APPFONT ;
Delta = 48 ;
};
PushButton BTN_ADD
{
HelpID = "sc:PushButton:RID_SCDLG_AUTOFORMAT:BTN_ADD";
Pos = MAP_APPFONT ( 256 , 63 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Add..." ;
TabStop = TRUE ;
};
PushButton BTN_REMOVE
{
HelpID = "sc:PushButton:RID_SCDLG_AUTOFORMAT:BTN_REMOVE";
Pos = MAP_APPFONT ( 256 , 81 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete" ;
TabStop = TRUE ;
};
PushButton BTN_RENAME
{
Pos = MAP_APPFONT ( 256 , 123 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
HelpId=HID_SC_RENAME_AUTOFMT;
TabStop = TRUE ;
Text [ en-US ] = "~Rename" ;
};
HelpButton BTN_HELP
{
Pos = MAP_APPFONT ( 256 , 43 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
String STR_ADD_TITLE
{
Text [ en-US ] = "Add AutoFormat" ;
};
String STR_RENAME_TITLE
{
Text [ en-US ] = "Rename AutoFormat" ;
};
String STR_ADD_LABEL
{
Text [ en-US ] = "Name" ;
};
String STR_DEL_TITLE
{
Text [ en-US ] = "Delete AutoFormat" ;
};
String STR_DEL_MSG
{
Text [ en-US ] = "Do you really want to delete the # AutoFomat?" ;
};
String STR_BTN_CLOSE
{
Text [ en-US ] = "~Close" ;
};
String STR_JAN
{
Text [ en-US ] = "Jan" ;
};
String STR_FEB
{
Text [ en-US ] = "Feb" ;
};
String STR_MAR
{
Text [ en-US ] = "Mar" ;
};
String STR_NORTH
{
Text [ en-US ] = "North" ;
};
String STR_MID
{
Text [ en-US ] = "Mid" ;
};
String STR_SOUTH
{
Text [ en-US ] = "South" ;
};
String STR_SUM
{
Text [ en-US ] = "Total" ;
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -106,8 +106,6 @@ String SCSTR_AUDITSHELL ...@@ -106,8 +106,6 @@ String SCSTR_AUDITSHELL
Text [ en-US ] = "Detective Fill Mode" ; Text [ en-US ] = "Detective Fill Mode" ;
}; };
String STR_ROWHEIGHT String STR_ROWHEIGHT
{ {
Text [ en-US ] = "Height" ; Text [ en-US ] = "Height" ;
...@@ -900,4 +898,69 @@ String STR_NOROWFORMULA ...@@ -900,4 +898,69 @@ String STR_NOROWFORMULA
Text [ en-US ] = "Formulas don't form a row." ; Text [ en-US ] = "Formulas don't form a row." ;
}; };
String STR_ADD_AUTOFORMAT_TITLE
{
Text [ en-US ] = "Add AutoFormat" ;
};
String STR_RENAME_AUTOFORMAT_TITLE
{
Text [ en-US ] = "Rename AutoFormat" ;
};
String STR_ADD_AUTOFORMAT_LABEL
{
Text [ en-US ] = "Name" ;
};
String STR_DEL_AUTOFORMAT_TITLE
{
Text [ en-US ] = "Delete AutoFormat" ;
};
String STR_DEL_AUTOFORMAT_MSG
{
Text [ en-US ] = "Do you really want to delete the # AutoFomat?" ;
};
String STR_BTN_AUTOFORMAT_CLOSE
{
Text [ en-US ] = "~Close" ;
};
String STR_JAN
{
Text [ en-US ] = "Jan" ;
};
String STR_FEB
{
Text [ en-US ] = "Feb" ;
};
String STR_MAR
{
Text [ en-US ] = "Mar" ;
};
String STR_NORTH
{
Text [ en-US ] = "North" ;
};
String STR_MID
{
Text [ en-US ] = "Mid" ;
};
String STR_SOUTH
{
Text [ en-US ] = "South" ;
};
String STR_SUM
{
Text [ en-US ] = "Total" ;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -828,7 +828,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) ...@@ -828,7 +828,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
AbstractScAutoFormatDlg* pDlg = pFact->CreateScAutoFormatDlg( pDlgParent, ScGlobal::GetOrCreateAutoFormat(), pNewEntry,GetViewData()->GetDocument(), RID_SCDLG_AUTOFORMAT ); AbstractScAutoFormatDlg* pDlg = pFact->CreateScAutoFormatDlg(pDlgParent, ScGlobal::GetOrCreateAutoFormat(), pNewEntry, GetViewData());
OSL_ENSURE(pDlg, "Dialog create fail!"); OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK ) if ( pDlg->Execute() == RET_OK )
......
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface> <interface>
<!-- interface-requires gtk+ 3.0 --> <requires lib="gtk+" version="3.0"/>
<!-- interface-requires LibreOffice 1.0 --> <!-- interface-requires LibreOffice 1.0 -->
<object class="GtkDialog" id="AutoFormatTableDialog"> <object class="GtkDialog" id="AutoFormatTableDialog">
<property name="can_focus">False</property> <property name="can_focus">False</property>
...@@ -162,6 +163,9 @@ ...@@ -162,6 +163,9 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="vexpand">True</property> <property name="vexpand">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection1"/>
</child>
</object> </object>
</child> </child>
</object> </object>
...@@ -217,6 +221,7 @@ ...@@ -217,6 +221,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">False</property> <property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
</object> </object>
...@@ -233,6 +238,7 @@ ...@@ -233,6 +238,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">False</property> <property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
</object> </object>
...@@ -249,6 +255,7 @@ ...@@ -249,6 +255,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">False</property> <property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
</object> </object>
...@@ -265,6 +272,7 @@ ...@@ -265,6 +272,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">False</property> <property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
</object> </object>
...@@ -281,6 +289,7 @@ ...@@ -281,6 +289,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">False</property> <property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
</object> </object>
......
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