diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2021-08-29 00:59:08 +1000 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-08-30 02:46:33 +0200 |
commit | 229136b7c9363bc758c9e925ccfd0c9bb34ceaec (patch) | |
tree | b5d2546256a9bb0e8740d242cce5e3c0cd3ee332 /vcl/source/text | |
parent | d350a1364a1c34b96d00f2f716c44882b7b57fe9 (diff) |
vcl: move TextLayoutCache into vcl::text namespace
Placed TextLayoutCache function into own source file and moved it into
the new vcl::text namespace. With this patch we will have these vcl::*
namespaces:
namespace vcl::bitmap
namespace vcl::CommandInfoProvider
namespace vcl::detail
namespace vcl::drawmode
namespace vcl::fileregistration
namespace vcl::filter
namespace vcl::font
namespace vcl::graphic
namespace vcl::lok
namespace vcl::pdf
namespace vcl::table
namespace vcl::test
namespace vcl::text
namespace vcl::unohelper
namespace vcl::unotools
Change-Id: Ia38c2d73715676a924cdbb0de6308a72a40ec3b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121206
Reviewed-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source/text')
-rw-r--r-- | vcl/source/text/TextLayoutCache.cxx | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/vcl/source/text/TextLayoutCache.cxx b/vcl/source/text/TextLayoutCache.cxx new file mode 100644 index 000000000000..00e9f9405358 --- /dev/null +++ b/vcl/source/text/TextLayoutCache.cxx @@ -0,0 +1,36 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * 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 <scrptrun.h> +#include <TextLayoutCache.hxx> + +namespace vcl::text +{ +TextLayoutCache::TextLayoutCache(sal_Unicode const* pStr, sal_Int32 const nEnd) +{ + vcl::ScriptRun aScriptRun(reinterpret_cast<const UChar*>(pStr), nEnd); + while (aScriptRun.next()) + { + runs.emplace_back(aScriptRun.getScriptStart(), aScriptRun.getScriptEnd(), + aScriptRun.getScriptCode()); + } +} +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |