Kaydet (Commit) e2d26860 authored tarafından Armin Le Grand's avatar Armin Le Grand Kaydeden (comit) Thorsten Behrens

screenshot: added functionality to dialog

Moved code to cui, added abstraction for AbstractDialog,
adapted rendering, changed selection, added better selection
visualization, added save ressources and dialog, creating
pure screenshot with annotation display

Change-Id: I533d9f559ee17cd46105b934bcf4beef87b96168
üst f9238c34
......@@ -32,6 +32,7 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/dialogs/hyperdlg.src \
cui/source/dialogs/multipat.src \
cui/source/dialogs/passwdomdlg.src \
cui/source/dialogs/screenshotannotationdlg.src \
cui/source/dialogs/scriptdlg.src \
cui/source/dialogs/svuidlg.src \
cui/source/options/connpooloptions.src \
......
......@@ -115,6 +115,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
cui/source/dialogs/multipat \
cui/source/dialogs/newtabledlg \
cui/source/dialogs/passwdomdlg \
cui/source/dialogs/screenshotannotationdlg \
cui/source/dialogs/pastedlg \
cui/source/dialogs/postdlg \
cui/source/dialogs/scriptdlg \
......
......@@ -144,6 +144,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/paraindentspacing \
cui/uiconfig/ui/paratabspage \
cui/uiconfig/ui/password \
cui/uiconfig/ui/screenshotannotationdialog \
cui/uiconfig/ui/pastespecial \
cui/uiconfig/ui/patterntabpage \
cui/uiconfig/ui/percentdialog \
......
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 .
*/
#include <cuires.hrc>
String RID_SVXSTR_SAVE_SCREENSHOT_AS
{
Text [ en-US ] = "Save Screenshot As...";
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -37,6 +37,7 @@
#include "linkdlg.hxx"
#include "postdlg.hxx"
#include "passwdomdlg.hxx"
#include "screenshotannotationdlg.hxx"
#include "cuihyperdlg.hxx"
#include "selector.hxx"
#include "SpellDialog.hxx"
......
......@@ -82,6 +82,7 @@
#include "acccfg.hxx"
#include "insrc.hxx"
#include "passwdomdlg.hxx"
#include "screenshotannotationdlg.hxx"
#include "hyphen.hxx"
#include "thesdlg.hxx"
#include "about.hxx"
......@@ -133,6 +134,7 @@ IMPL_ABSTDLG_BASE(AbstractLinksDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractSpellDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractSvxPostItDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractPasswordToOpenModifyDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractScreenshotAnnotationDlg_Impl);
// VclAbstractDialog2_Impl
......@@ -1594,5 +1596,12 @@ AbstractPasswordToOpenModifyDialog * AbstractDialogFactory_Impl::CreatePasswordT
return new AbstractPasswordToOpenModifyDialog_Impl( pDlg );
}
AbstractScreenshotAnnotationDlg* AbstractDialogFactory_Impl::CreateScreenshotAnnotationDlg(
vcl::Window * pParent,
Dialog& rParentDialog)
{
VclPtrInstance<ScreenshotAnnotationDlg> pDlg(pParent, rParentDialog);
return new AbstractScreenshotAnnotationDlg_Impl(pDlg);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -444,6 +444,12 @@ class AbstractPasswordToOpenModifyDialog_Impl : public AbstractPasswordToOpenMod
virtual bool IsRecommendToOpenReadonly() const override;
};
class ScreenshotAnnotationDlg;
class AbstractScreenshotAnnotationDlg_Impl : public AbstractScreenshotAnnotationDlg
{
DECL_ABSTDLG_BASE(AbstractScreenshotAnnotationDlg_Impl, ScreenshotAnnotationDlg)
};
//AbstractDialogFactory_Impl implementations
class AbstractDialogFactory_Impl : public SvxAbstractDialogFactory
{
......@@ -622,7 +628,9 @@ public:
virtual SvxAbstractInsRowColDlg* CreateSvxInsRowColDlg( vcl::Window* pParent, bool bCol, const OString& sHelpId ) override;
virtual AbstractPasswordToOpenModifyDialog * CreatePasswordToOpenModifyDialog( vcl::Window * pParent, sal_uInt16 nMinPasswdLen, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify ) override;
virtual AbstractPasswordToOpenModifyDialog * CreatePasswordToOpenModifyDialog(vcl::Window * pParent, sal_uInt16 nMinPasswdLen, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify) override;
virtual AbstractScreenshotAnnotationDlg* CreateScreenshotAnnotationDlg(vcl::Window * pParent, Dialog& rParentDialog) override;
};
#endif
......
......@@ -418,6 +418,7 @@
#define RID_SVXSTR_LOAD_ERROR (RID_SVX_START + 1265)
#define RID_SVXSTR_EDITHINT (RID_SVX_START + 1266)
#define RID_SVXSTR_SAVE_SCREENSHOT_AS (RID_SVX_START + 1267)
// Hangul/Hanja Dialog
#define RID_SVXSTR_HANGUL (RID_SVX_START + 1270)
......
/* -*- 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 .
*/
#ifndef INCLUDED_CUI_SOURCE_INC_SCREENSHANNDLG_HXX
#define INCLUDED_CUI_SOURCE_INC_SCREENSHANNDLG_HXX
#include <sfx2/basedlgs.hxx>
#include <memory>
class ScreenshotAnnotationDlg_Impl;
class ScreenshotAnnotationDlg : public SfxModalDialog
{
private:
std::unique_ptr< ScreenshotAnnotationDlg_Impl > m_pImpl;
ScreenshotAnnotationDlg(const ScreenshotAnnotationDlg &) = delete;
ScreenshotAnnotationDlg& operator=(const ScreenshotAnnotationDlg &) = delete;
public:
ScreenshotAnnotationDlg(
vcl::Window* pParent,
Dialog& rParentDialog);
virtual ~ScreenshotAnnotationDlg();
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -71,6 +71,10 @@ public:
virtual bool IsRecommendToOpenReadonly() const = 0;
};
class VCL_DLLPUBLIC AbstractScreenshotAnnotationDlg : public VclAbstractDialog
{
};
class VCL_DLLPUBLIC VclAbstractDialogFactory
{
public:
......@@ -82,6 +86,11 @@ public:
// creates instance of PasswordToOpenModifyDialog from cui
virtual AbstractPasswordToOpenModifyDialog* CreatePasswordToOpenModifyDialog( vcl::Window * pParent, sal_uInt16 nMinPasswdLen, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify ) = 0;
// creates instance of ScreenshotAnnotationDlg from cui
virtual AbstractScreenshotAnnotationDlg* CreateScreenshotAnnotationDlg(
vcl::Window* pParent,
Dialog& rParentDialog) = 0;
};
#endif
......
......@@ -19,7 +19,6 @@ $(eval $(call gb_UIConfig_add_uifiles,vcl,\
vcl/uiconfig/ui/printerpropertiesdialog \
vcl/uiconfig/ui/printprogressdialog \
vcl/uiconfig/ui/querydialog \
vcl/uiconfig/ui/screenshotannotationdialog \
))
# vim: set noet sw=4 ts=4:
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