LibreOffice Module sw (master)  1
Classes | Macros | Typedefs | Functions | Variables
cnttab.cxx File Reference
#include <config_folders.h>
#include <sal/log.hxx>
#include <svl/style.hxx>
#include <vcl/help.hxx>
#include <vcl/layout.hxx>
#include <vcl/weld.hxx>
#include <svl/stritem.hxx>
#include <svl/urihelper.hxx>
#include <unotools/pathoptions.hxx>
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
#include <svtools/simptabl.hxx>
#include <svx/dialogs.hrc>
#include <svx/svxdlg.hxx>
#include <svx/flagsdef.hxx>
#include <svx/svxids.hrc>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <com/sun/star/ui/dialogs/XFilePicker3.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <svtools/indexentryres.hxx>
#include <editeng/unolingu.hxx>
#include <column.hxx>
#include <fmtfsize.hxx>
#include <shellio.hxx>
#include <authfld.hxx>
#include <swtypes.hxx>
#include <wrtsh.hxx>
#include <view.hxx>
#include <basesh.hxx>
#include <outline.hxx>
#include <cnttab.hxx>
#include <swuicnttab.hxx>
#include <poolfmt.hxx>
#include <strings.hrc>
#include <uitool.hxx>
#include <fmtcol.hxx>
#include <fldbas.hxx>
#include <expfld.hxx>
#include <unotools.hxx>
#include <unotxdoc.hxx>
#include <docsh.hxx>
#include <swmodule.hxx>
#include <modcfg.hxx>
#include <cmdid.h>
#include <globals.hrc>
#include <cnttab.hrc>
#include <SwStyleNameMapper.hxx>
#include <sfx2/filedlghelper.hxx>
#include <toxwrap.hxx>
#include <chpfld.hxx>
#include <sfx2/app.hxx>
#include <unomid.h>
#include <cmath>
#include <memory>
#include <vector>
#include <numeric>
#include <svtools/editbrowsebox.hxx>
Include dependency graph for cnttab.cxx:

Go to the source code of this file.

Classes

struct  AutoMarkEntry
 
class  SwEntryBrowseBox
 
class  SwAutoMarkDlg_Impl
 
class  SwAddStylesDlg_Impl
 
class  SwTOXWidget
 
class  SwTOXEdit
 
class  SwTOXButton
 

Macros

#define ITEM_SEARCH   1
 
#define ITEM_ALTERNATIVE   2
 
#define ITEM_PRIM_KEY   3
 
#define ITEM_SEC_KEY   4
 
#define ITEM_COMMENT   5
 
#define ITEM_CASE   6
 
#define ITEM_WORDONLY   7
 

Typedefs

typedef ::svt::EditBrowseBox SwEntryBrowseBox_Base
 

Functions

static OUString lcl_CreateAutoMarkFileDlg (weld::Window *pParent, const OUString &rURL, const OUString &rFileString, bool bOpen)
 
 IMPL_LINK_NOARG (SwMultiTOXTabDialog, ShowPreviewHdl, weld::ToggleButton &, void)
 
 IMPL_LINK (SwAddStylesDlg_Impl, TreeSizeAllocHdl, const Size &, rSize, void)
 
 IMPL_LINK (SwAddStylesDlg_Impl, RadioToggleOnHdl, const row_col &, rRowCol, void)
 
 IMPL_LINK (SwAddStylesDlg_Impl, KeyInput, const KeyEvent &, rKEvt, bool)
 
 IMPL_LINK_NOARG (SwAddStylesDlg_Impl, OkHdl, weld::Button &, void)
 
 IMPL_LINK (SwAddStylesDlg_Impl, LeftRightHdl, weld::Button &, rBtn, void)
 
static long lcl_TOXTypesToUserData (CurTOXType eType)
 
static CurTOXType lcl_UserData2TOXTypes (sal_uInt16 nData)
 
 IMPL_LINK (SwTOXSelectTabPage, TOXTypeHdl, weld::ComboBox &, rBox, void)
 
 IMPL_LINK_NOARG (SwTOXSelectTabPage, ModifyListBoxHdl, weld::ComboBox &, void)
 
 IMPL_LINK_NOARG (SwTOXSelectTabPage, ModifyEntryHdl, weld::Entry &, void)
 
 IMPL_LINK_NOARG (SwTOXSelectTabPage, ModifySpinHdl, weld::SpinButton &, void)
 
 IMPL_LINK (SwTOXSelectTabPage, CheckBoxHdl, weld::ToggleButton &, rButton, void)
 
 IMPL_LINK_NOARG (SwTOXSelectTabPage, RadioButtonHdl, weld::ToggleButton &, void)
 
 IMPL_LINK (SwTOXSelectTabPage, LanguageListBoxHdl, weld::ComboBox &, rBox, void)
 
 IMPL_LINK_NOARG (SwTOXSelectTabPage, AddStylesHdl, weld::Button &, void)
 
 IMPL_LINK_NOARG (SwTOXSelectTabPage, MenuEnableHdl, weld::ToggleButton &, void)
 
 IMPL_LINK (SwTOXSelectTabPage, MenuExecuteHdl, const OString &, rIdent, void)
 
 IMPL_LINK_NOARG (SwTOXEdit, ModifyHdl, weld::Entry &, void)
 
 IMPL_LINK (SwTOXEdit, KeyInputHdl, const KeyEvent &, rKEvt, bool)
 
 IMPL_LINK_NOARG (SwTOXEdit, FocusInHdl, weld::Widget &, void)
 
 IMPL_LINK (SwTOXButton, KeyInputHdl, const KeyEvent &, rKEvt, bool)
 
 IMPL_LINK_NOARG (SwTOXButton, FocusInHdl, weld::Widget &, void)
 
 IMPL_LINK_NOARG (SwTOXEntryTabPage, ModifyClickHdl, weld::ToggleButton &, void)
 
 IMPL_LINK_NOARG (SwTOXEntryTabPage, ModifyHdl, LinkParamNone *, void)
 
 IMPL_LINK_NOARG (SwTOXEntryTabPage, EditStyleHdl, weld::Button &, void)
 
 IMPL_LINK (SwTOXEntryTabPage, RemoveInsertAuthHdl, weld::Button &, rButton, void)
 
 IMPL_LINK (SwTOXEntryTabPage, InsertTokenHdl, weld::Button &, rBtn, void)
 
 IMPL_LINK_NOARG (SwTOXEntryTabPage, AllLevelsHdl, weld::Button &, void)
 
 IMPL_LINK (SwTOXEntryTabPage, LevelHdl, weld::TreeView &, rBox, void)
 
 IMPL_LINK_NOARG (SwTOXEntryTabPage, SortKeyHdl, weld::ToggleButton &, void)
 
 IMPL_LINK (SwTOXEntryTabPage, TokenSelectedHdl, SwFormToken &, rToken, void)
 
 IMPL_LINK (SwTOXEntryTabPage, StyleSelectHdl, weld::ComboBox &, rBox, void)
 
 IMPL_LINK (SwTOXEntryTabPage, ChapterInfoHdl, weld::ComboBox &, rBox, void)
 
 IMPL_LINK (SwTOXEntryTabPage, ChapterInfoOutlineHdl, weld::SpinButton &, rEdit, void)
 
 IMPL_LINK (SwTOXEntryTabPage, NumberFormatHdl, weld::ComboBox &, rBox, void)
 
 IMPL_LINK (SwTOXEntryTabPage, TabPosHdl, weld::MetricSpinButton &, rEdit, void)
 
 IMPL_LINK (SwTOXEntryTabPage, FillCharHdl, weld::ComboBox &, rBox, void)
 
 IMPL_LINK (SwTOXEntryTabPage, AutoRightHdl, weld::ToggleButton &, rBox, void)
 
 IMPL_LINK_NOARG (SwTokenWindow, AdjustPositionsHdl, const Size &, void)
 
 IMPL_LINK_NOARG (SwTokenWindow, ScrollHdl, weld::ScrolledWindow &, void)
 
 IMPL_LINK (SwTokenWindow, ScrollBtnHdl, weld::Button &, rBtn, void)
 
 IMPL_LINK (SwTokenWindow, EditResize, SwTOXEdit &, rEdit, void)
 
 IMPL_LINK (SwTokenWindow, NextItemHdl, SwTOXEdit &, rEdit, void)
 
 IMPL_LINK (SwTokenWindow, TbxFocusHdl, SwTOXWidget &, rControl, void)
 
 IMPL_LINK (SwTokenWindow, NextItemBtnHdl, SwTOXButton &, rBtn, void)
 
 IMPL_LINK (SwTokenWindow, TbxFocusBtnHdl, SwTOXWidget &, rControl, void)
 
 IMPL_LINK_NOARG (SwTOXStylesTabPage, EditStyleHdl, weld::Button &, void)
 
 IMPL_LINK_NOARG (SwTOXStylesTabPage, AssignHdl, weld::Button &, void)
 
 IMPL_LINK_NOARG (SwTOXStylesTabPage, StdHdl, weld::Button &, void)
 
 IMPL_LINK_NOARG (SwTOXStylesTabPage, DoubleClickHdl, weld::TreeView &, void)
 
 IMPL_LINK_NOARG (SwTOXStylesTabPage, EnableSelectHdl, weld::TreeView &, void)
 
 IMPL_LINK_NOARG (SwAutoMarkDlg_Impl, OkHdl, Button *, void)
 

Variables

static const sal_Unicode aDeliStart = '['
 
static const sal_Unicode aDeliEnd = ']'
 
static const char * STR_TOKEN_ARY []
 
static const char * STR_TOKEN_HELP_ARY []
 

Macro Definition Documentation

#define ITEM_ALTERNATIVE   2

Definition at line 3581 of file cnttab.cxx.

Referenced by SwEntryBrowseBox::GetCellText(), and SwEntryBrowseBox::SaveModified().

#define ITEM_CASE   6
#define ITEM_COMMENT   5

Definition at line 3584 of file cnttab.cxx.

Referenced by SwEntryBrowseBox::GetCellText(), and SwEntryBrowseBox::SaveModified().

#define ITEM_PRIM_KEY   3

Definition at line 3582 of file cnttab.cxx.

Referenced by SwEntryBrowseBox::GetCellText(), and SwEntryBrowseBox::SaveModified().

#define ITEM_SEARCH   1

Definition at line 3580 of file cnttab.cxx.

Referenced by SwEntryBrowseBox::GetCellText(), and SwEntryBrowseBox::SaveModified().

#define ITEM_SEC_KEY   4

Definition at line 3583 of file cnttab.cxx.

Referenced by SwEntryBrowseBox::GetCellText(), and SwEntryBrowseBox::SaveModified().

#define ITEM_WORDONLY   7

Definition at line 3586 of file cnttab.cxx.

Referenced by SwEntryBrowseBox::GetCellText(), and SwEntryBrowseBox::SaveModified().

Typedef Documentation

Definition at line 139 of file cnttab.cxx.

Function Documentation

IMPL_LINK ( SwAddStylesDlg_Impl  ,
TreeSizeAllocHdl  ,
const Size ,
rSize  ,
void   
)

Definition at line 593 of file cnttab.cxx.

References i, and MAXLEVEL.

IMPL_LINK ( SwAddStylesDlg_Impl  ,
RadioToggleOnHdl  ,
const row_col &  ,
rRowCol  ,
void   
)

Definition at line 610 of file cnttab.cxx.

References i, MAXLEVEL, TRISTATE_FALSE, and TRISTATE_TRUE.

IMPL_LINK ( SwAddStylesDlg_Impl  ,
KeyInput  ,
const KeyEvent ,
rKEvt  ,
bool   
)

Definition at line 619 of file cnttab.cxx.

References vcl::KeyCode::GetCode(), KEY_ADD, KEY_LEFT, KEY_RIGHT, and KEY_SUBTRACT.

IMPL_LINK ( SwAddStylesDlg_Impl  ,
LeftRightHdl  ,
weld::Button ,
rBtn  ,
void   
)

Definition at line 668 of file cnttab.cxx.

References MAXLEVEL, TRISTATE_FALSE, and TRISTATE_TRUE.

IMPL_LINK ( SwTOXSelectTabPage  ,
TOXTypeHdl  ,
weld::ComboBox ,
rBox  ,
void   
)
IMPL_LINK ( SwTOXSelectTabPage  ,
CheckBoxHdl  ,
weld::ToggleButton ,
rButton  ,
void   
)
IMPL_LINK ( SwTOXSelectTabPage  ,
LanguageListBoxHdl  ,
weld::ComboBox ,
rBox  ,
void   
)

Definition at line 1315 of file cnttab.cxx.

IMPL_LINK ( SwTOXSelectTabPage  ,
MenuExecuteHdl  ,
const OString &  ,
rIdent  ,
void   
)

Definition at line 1361 of file cnttab.cxx.

References Dialog::Execute(), lcl_CreateAutoMarkFileDlg(), and RET_OK.

IMPL_LINK ( SwTOXEdit  ,
KeyInputHdl  ,
const KeyEvent ,
rKEvt  ,
bool   
)
IMPL_LINK ( SwTOXButton  ,
KeyInputHdl  ,
const KeyEvent ,
rKEvt  ,
bool   
)
IMPL_LINK ( SwTOXEntryTabPage  ,
RemoveInsertAuthHdl  ,
weld::Button ,
rButton  ,
void   
)

Definition at line 2145 of file cnttab.cxx.

References SwTOXWidget::GetType(), and TOKEN_AUTHORITY.

IMPL_LINK ( SwTOXEntryTabPage  ,
InsertTokenHdl  ,
weld::Button ,
rBtn  ,
void   
)
IMPL_LINK ( SwTOXEntryTabPage  ,
LevelHdl  ,
weld::TreeView ,
rBox  ,
void   
)

Definition at line 2285 of file cnttab.cxx.

References AUTH_FIELD_END, i, SwResId(), TOKEN_AUTHORITY, and TOX_AUTHORITIES.

IMPL_LINK ( SwTOXEntryTabPage  ,
TokenSelectedHdl  ,
SwFormToken ,
rToken  ,
void   
)
IMPL_LINK ( SwTOXEntryTabPage  ,
StyleSelectHdl  ,
weld::ComboBox ,
rBox  ,
void   
)

Definition at line 2441 of file cnttab.cxx.

References SwTOXWidget::GetType(), and nId.

IMPL_LINK ( SwTOXEntryTabPage  ,
ChapterInfoHdl  ,
weld::ComboBox ,
rBox  ,
void   
)

Definition at line 2462 of file cnttab.cxx.

References SwTOXWidget::GetType(), and nPos.

IMPL_LINK ( SwTOXEntryTabPage  ,
ChapterInfoOutlineHdl  ,
weld::SpinButton ,
rEdit  ,
void   
)

Definition at line 2475 of file cnttab.cxx.

References SwTOXWidget::GetType(), and rEdit.

IMPL_LINK ( SwTOXEntryTabPage  ,
NumberFormatHdl  ,
weld::ComboBox ,
rBox  ,
void   
)

Definition at line 2487 of file cnttab.cxx.

References SwTOXWidget::GetType(), and nPos.

IMPL_LINK ( SwTOXEntryTabPage  ,
TabPosHdl  ,
weld::MetricSpinButton ,
rEdit  ,
void   
)

Definition at line 2502 of file cnttab.cxx.

References SwTOXWidget::GetType(), rEdit, and TOKEN_TAB_STOP.

IMPL_LINK ( SwTOXEntryTabPage  ,
FillCharHdl  ,
weld::ComboBox ,
rBox  ,
void   
)

Definition at line 2516 of file cnttab.cxx.

References SwTOXWidget::GetType(), and TOKEN_TAB_STOP.

IMPL_LINK ( SwTOXEntryTabPage  ,
AutoRightHdl  ,
weld::ToggleButton ,
rBox  ,
void   
)

Definition at line 2534 of file cnttab.cxx.

References SwTOXWidget::GetType(), and TOKEN_TAB_STOP.

IMPL_LINK ( SwTokenWindow  ,
ScrollBtnHdl  ,
weld::Button ,
rBtn  ,
void   
)

Definition at line 3098 of file cnttab.cxx.

References SwTOXWidget::get_extents_relative_to(), x, and y.

IMPL_LINK ( SwTokenWindow  ,
EditResize  ,
SwTOXEdit ,
rEdit  ,
void   
)

Definition at line 3242 of file cnttab.cxx.

References rEdit.

IMPL_LINK ( SwTokenWindow  ,
NextItemHdl  ,
SwTOXEdit ,
rEdit  ,
void   
)

Definition at line 3249 of file cnttab.cxx.

References SwTOXWidget::GrabFocus(), and rEdit.

IMPL_LINK ( SwTokenWindow  ,
TbxFocusHdl  ,
SwTOXWidget ,
rControl  ,
void   
)

Definition at line 3278 of file cnttab.cxx.

References SwTOXWidget::GetType().

IMPL_LINK ( SwTokenWindow  ,
NextItemBtnHdl  ,
SwTOXButton ,
rBtn  ,
void   
)

Definition at line 3291 of file cnttab.cxx.

References SwTOXWidget::GrabFocus().

IMPL_LINK ( SwTokenWindow  ,
TbxFocusBtnHdl  ,
SwTOXWidget ,
rControl  ,
void   
)

Definition at line 3333 of file cnttab.cxx.

References SwTOXWidget::GetType().

IMPL_LINK_NOARG ( SwMultiTOXTabDialog  ,
ShowPreviewHdl  ,
weld::ToggleButton ,
void   
)
IMPL_LINK_NOARG ( SwAddStylesDlg_Impl  ,
OkHdl  ,
weld::Button ,
void   
)

Definition at line 638 of file cnttab.cxx.

References i, MAXLEVEL, RET_OK, TOX_STYLE_DELIMITER, and TRISTATE_TRUE.

IMPL_LINK_NOARG ( SwTOXSelectTabPage  ,
ModifyListBoxHdl  ,
weld::ComboBox ,
void   
)

Definition at line 1262 of file cnttab.cxx.

IMPL_LINK_NOARG ( SwTOXSelectTabPage  ,
ModifyEntryHdl  ,
weld::Entry ,
void   
)

Definition at line 1267 of file cnttab.cxx.

IMPL_LINK_NOARG ( SwTOXSelectTabPage  ,
ModifySpinHdl  ,
weld::SpinButton ,
void   
)

Definition at line 1272 of file cnttab.cxx.

IMPL_LINK_NOARG ( SwTOXSelectTabPage  ,
RadioButtonHdl  ,
weld::ToggleButton ,
void   
)

Definition at line 1305 of file cnttab.cxx.

IMPL_LINK_NOARG ( SwTOXSelectTabPage  ,
AddStylesHdl  ,
weld::Button ,
void   
)

Definition at line 1348 of file cnttab.cxx.

IMPL_LINK_NOARG ( SwTOXSelectTabPage  ,
MenuEnableHdl  ,
weld::ToggleButton ,
void   
)

Definition at line 1356 of file cnttab.cxx.

IMPL_LINK_NOARG ( SwTOXEdit  ,
ModifyHdl  ,
weld::Entry ,
void   
)

Definition at line 1508 of file cnttab.cxx.

IMPL_LINK_NOARG ( SwTOXEdit  ,
FocusInHdl  ,
weld::Widget ,
void   
)

Definition at line 1549 of file cnttab.cxx.

IMPL_LINK_NOARG ( SwTOXButton  ,
FocusInHdl  ,
weld::Widget ,
void   
)

Definition at line 1736 of file cnttab.cxx.

IMPL_LINK_NOARG ( SwTOXEntryTabPage  ,
ModifyClickHdl  ,
weld::ToggleButton ,
void   
)

Definition at line 1927 of file cnttab.cxx.

IMPL_LINK_NOARG ( SwTOXEntryTabPage  ,
ModifyHdl  ,
LinkParamNone ,
void   
)

Definition at line 1932 of file cnttab.cxx.

IMPL_LINK_NOARG ( SwTOXEntryTabPage  ,
EditStyleHdl  ,
weld::Button ,
void   
)

Definition at line 2132 of file cnttab.cxx.

IMPL_LINK_NOARG ( SwTOXEntryTabPage  ,
AllLevelsHdl  ,
weld::Button ,
void   
)

Definition at line 2260 of file cnttab.cxx.

References i.

IMPL_LINK_NOARG ( SwTOXEntryTabPage  ,
SortKeyHdl  ,
weld::ToggleButton ,
void   
)

Definition at line 2322 of file cnttab.cxx.

IMPL_LINK_NOARG ( SwTokenWindow  ,
AdjustPositionsHdl  ,
const Size ,
void   
)

Definition at line 3040 of file cnttab.cxx.

IMPL_LINK_NOARG ( SwTokenWindow  ,
ScrollHdl  ,
weld::ScrolledWindow ,
void   
)

Definition at line 3057 of file cnttab.cxx.

IMPL_LINK_NOARG ( SwTOXStylesTabPage  ,
EditStyleHdl  ,
weld::Button ,
void   
)
IMPL_LINK_NOARG ( SwTOXStylesTabPage  ,
AssignHdl  ,
weld::Button ,
void   
)

Definition at line 3513 of file cnttab.cxx.

References aDeliEnd, aDeliStart, aStr, and Modify.

IMPL_LINK_NOARG ( SwTOXStylesTabPage  ,
StdHdl  ,
weld::Button ,
void   
)

Definition at line 3533 of file cnttab.cxx.

References aDeliStart, aStr, Modify, and nPos.

IMPL_LINK_NOARG ( SwTOXStylesTabPage  ,
DoubleClickHdl  ,
weld::TreeView ,
void   
)

Definition at line 3547 of file cnttab.cxx.

References SwMultiTOXTabDialog::IsNoNum().

IMPL_LINK_NOARG ( SwTOXStylesTabPage  ,
EnableSelectHdl  ,
weld::TreeView ,
void   
)

Definition at line 3558 of file cnttab.cxx.

References SwMultiTOXTabDialog::IsNoNum().

IMPL_LINK_NOARG ( SwAutoMarkDlg_Impl  ,
OkHdl  ,
Button ,
void   
)
static OUString lcl_CreateAutoMarkFileDlg ( weld::Window pParent,
const OUString &  rURL,
const OUString &  rFileString,
bool  bOpen 
)
static

Definition at line 95 of file cnttab.cxx.

References ERRCODE_NONE, and SvtPathOptions::GetUserConfigPath().

Referenced by IMPL_LINK().

static long lcl_TOXTypesToUserData ( CurTOXType  eType)
static
static CurTOXType lcl_UserData2TOXTypes ( sal_uInt16  nData)
static

Variable Documentation

const sal_Unicode aDeliEnd = ']'
static

Definition at line 93 of file cnttab.cxx.

Referenced by SwTOXStylesTabPage::ActivatePage(), and IMPL_LINK_NOARG().

const sal_Unicode aDeliStart = '['
static

Definition at line 92 of file cnttab.cxx.

Referenced by SwTOXStylesTabPage::ActivatePage(), and IMPL_LINK_NOARG().

const char* STR_TOKEN_ARY[]
static
Initial value:
=
{
STR_TOKEN_ENTRY_NO,
STR_TOKEN_ENTRY,
STR_TOKEN_ENTRY,
STR_TOKEN_TAB_STOP,
nullptr,
STR_TOKEN_PAGE_NUMS,
STR_TOKEN_CHAPTER_INFO,
STR_TOKEN_LINK_START,
STR_TOKEN_LINK_END,
STR_TOKEN_AUTHORITY
}

Definition at line 2569 of file cnttab.cxx.

Referenced by SwTokenWindow::SwTokenWindow().

const char* STR_TOKEN_HELP_ARY[]
static
Initial value:
=
{
STR_TOKEN_HELP_ENTRY_NO,
STR_TOKEN_HELP_ENTRY,
STR_TOKEN_HELP_ENTRY,
STR_TOKEN_HELP_TAB_STOP,
STR_TOKEN_HELP_TEXT,
STR_TOKEN_HELP_PAGE_NUMS,
STR_TOKEN_HELP_CHAPTER_INFO,
STR_TOKEN_HELP_LINK_START,
STR_TOKEN_HELP_LINK_END,
STR_TOKEN_HELP_AUTHORITY
}

Definition at line 2583 of file cnttab.cxx.

Referenced by SwTokenWindow::SwTokenWindow().