diff options
author | AkshayWarrier <aksmen121@gmail.com> | 2024-02-02 02:18:24 +0530 |
---|---|---|
committer | Jim Raykowski <raykowj@gmail.com> | 2024-02-10 02:05:55 +0100 |
commit | ace21b4b2537a3cf2301fca2ac6f78d0612e911f (patch) | |
tree | 487ea76fce8226574fa97f587b2e798df15db155 /include | |
parent | 9af4b5254cbe6a6770ebe78ba14074266b05471e (diff) |
tdf#159372 svx: Add goto dialog
Adds a goto page/slide dialog for Impress and Draw similar to Writer.
To avoid duplicating code and ui, the dialog is created in svx/ and used in other modules.
The old goto dialog in Writer has now been replaced with this dialog.
Change-Id: I28f819f0d0734fb2bb08a7b99a628217ef66dba9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162913
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/sfxsids.hrc | 2 | ||||
-rw-r--r-- | include/svx/dialog/gotodlg.hxx | 46 |
2 files changed, 47 insertions, 1 deletions
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc index 176e500c55b3..e2fafac7321a 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -228,7 +228,7 @@ class SvxZoomItem; #define SID_UNPACK TypedWhichId<SfxBoolItem>(SID_SFX_START + 1662) // (SID_SFX_START + 1663) used further down #define SID_ATTR_TARGETLANG_STR (SID_SFX_START + 1664) - // FREE +#define SID_GO_TO_PAGE (SID_SFX_START + 1665) #define SID_OUTPUTSTREAM TypedWhichId<SfxUnoAnyItem>(SID_SFX_START + 1666) #define SID_IMAGE_ORIENTATION TypedWhichId<SfxImageItem>(SID_SFX_START + 1667) diff --git a/include/svx/dialog/gotodlg.hxx b/include/svx/dialog/gotodlg.hxx new file mode 100644 index 000000000000..304f1352b0db --- /dev/null +++ b/include/svx/dialog/gotodlg.hxx @@ -0,0 +1,46 @@ +/* -*- 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 . + */ + +#pragma once + +#include <svx/svxdllapi.h> +#include <vcl/weld.hxx> + +namespace svx +{ +class SVX_DLLPUBLIC GotoPageDlg final : public weld::GenericDialogController +{ +public: + GotoPageDlg(weld::Window* pParent, const OUString& title, const OUString& label, + sal_uInt16 curPagePos, sal_uInt16 pageCnt); + + sal_uInt16 GetPageSelection() const { return mxMtrPageCtrl->get_text().toUInt32(); } + +private: + sal_uInt16 mnMaxPageCnt; + + std::unique_ptr<weld::SpinButton> mxMtrPageCtrl; + std::unique_ptr<weld::Label> mxPageNumberLbl; + std::unique_ptr<weld::Label> mxPageLbl; + + DECL_LINK(PageModifiedHdl, weld::Entry&, void); +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |